-
-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config structure #745
config structure #745
Conversation
@zyddnys """Set the convolution kernel size of the text erasure area to completely clean up text residues"""
kernel_size: int = 3
"""By how much to extend the text mask to remove left-over text pixels of the original image."""
mask_dilation_offset: int = 0 |
oh and which file extension should the config have? toml, yml, json? I used json for now |
# Conflicts: # manga_translator/__main__.py
@zyddnys would be great if you could look over it. the goal was to make it easier to use. you could have different config files for different use cases, the arguments are grouped by category and the args now have specific arguments for specific modes. This makes it easier to distinguish between configs specific for translation & specific for modes. there are some exceptions like pre-dict, post-dict & kernel-size. the dicts are loaded before the translator is initialized & the kernel-size is set in the constructor so I left it alone. The enums make it easier to write specific documentation for each translator/detector/inpainter/.... I haven't checked if there are other tools for documentation, but pydantic can be used to generate json-schema. im pretty sure there are other tools that can generate a more readable format for the readme from json-schema of python classes. I found this. https://coveooss.github.io/json-schema-for-humans/#/ which could be useful |
conflict now |
# Conflicts: # manga_translator/args.py # manga_translator/manga_translator.py
@zyddnys resolved now |
the args are too messed up. There are way too many options. that's why I converted it to a class structure. Instead of having tons of arguments it would make more sense to have a config file for everything. it's not loaded anywhere so its just the structure. the code would need to be changed a bit, but not much. it also adds typesafty