Quote:Ok, but if I change the param list to something like
Code:
chroma_smoothing_enabled=True, chroma_smoothing_param=[0.1,0.2,0.6,0.65]
'Yes', then I could better integrate it in the ui and wouldn't have to check for 'True'. (this should be done for all parameters)
You might also want to think about shortening the parameter names.
(just a suggestion, since having parameters with multiple underscores usually is bad)
Maybe instead of 'chroma_smoothing_enabled' and 'chroma_smoothing_param', better something like 'chr_smooth' and 'chroma_sp'?
So:
Code:
clip: vs.VideoNode, color_method: int = 2, merge_weight: float = 0.4, deoldify_params: list = [0, 24, 1.0, 0.0], ddcolor_params: list = [1, 24, 1.0, 0.0], ddcolor_tweaks: list = [False, 0.4, 0.4, 0.0, 1.0, 1.0, True, 1], combine_params: list = [False, 0.6, 2.0, 0.15, 0.2, 0.3, 0.6, 1.0], darkness: list = [False, 0.2, 0.8], chroma_resize: bool = True, device_index: int = 0, np_threads: int = 8, torch_hub_dir: str = model_dir) -> vs.VideoNode:
could become, something like:
Code:
clip: vs.VideoNode, method: int = 2, mweight: float = 0.4, deoldify_p: list = [0, 24, 1.0, 0.0], ddcolor_p: list = [1, 24, 1.0, 0.0], ddcolor_tweak: bool = False, ddcolor_tweakp: list = [0.4, 0.4, 0.0, 1.0, 1.0, True, 1], combine_p: list = [0.6, 2.0, 0.15, 0.2, 0.3, 0.6, 1.0], dark: bool = True, dark_p: list = [0.2, 0.8], chr_rez: bool = True, device_idx: int = 0, np: int = 8, torch_dir: str = model_dir) -> vs.VideoNode:
combine_parameters should always be 'True' when the method index > 1, so having an extra parameter to enable it is unnecessary.
and
Code:
ddeoldify_stabilizer(clip: vs.VideoNode, chroma_smoothing: list = [False, 0.1, 0.2, 0.5, 0.8], chroma_stabilizer: list = [True, 5, 'arithmetic', 1, 60, 0.5, 0.8, 0], chroma_limiter: list = [False, 0.02], chroma_resize: list = [True, 24]) -> vs.VideoNode:
could become something like:
Code:
ddeoldify_stab(clip: vs.VideoNode, chr_smooth: bool = False, chr_smoothp: list = [0.1, 0.2, 0.5, 0.8], chr_stab: bool = True, chr_stabp: list = [5, 'arithmetic', 1, 60, 0.5, 0.8, 0], chr_limit: bool = False, chr_limitp: list = [0.02], chr_rez: bool = True, chr_rezp: list = [True, 24]) -> vs.VideoNode:
Quote:If you prefer I can try to reduce the number parameters, in order to do not exceed the number of parameters included in ver. 2.x
The 2.x already had way to many parameters.
The problem is:
a. integrating (and always changing, testing, adding interactions, setting tool-tips, etc.) for tons of parameter is a pain.
b. having tons of parameters makes a filter not really usable, since users will just blindly flip switches and ask for help so that others tweak their settings.
Cu Selur