diff --git a/adetailer/args.py b/adetailer/args.py index d637920..86f6d4e 100644 --- a/adetailer/args.py +++ b/adetailer/args.py @@ -41,14 +41,14 @@ class ADetailerArgs(BaseModel, extra=Extra.forbid): ad_confidence: confloat(ge=0.0, le=1.0) = 0.3 ad_mask_min_ratio: confloat(ge=0.0, le=1.0) = 0.0 ad_mask_max_ratio: confloat(ge=0.0, le=1.0) = 1.0 - ad_dilate_erode: int = 32 + ad_dilate_erode: int = 4 ad_x_offset: int = 0 ad_y_offset: int = 0 ad_mask_merge_invert: Literal["None", "Merge", "Merge and Invert"] = "None" ad_mask_blur: NonNegativeInt = 4 ad_denoising_strength: confloat(ge=0.0, le=1.0) = 0.4 ad_inpaint_only_masked: bool = True - ad_inpaint_only_masked_padding: NonNegativeInt = 0 + ad_inpaint_only_masked_padding: NonNegativeInt = 32 ad_use_inpaint_width_height: bool = False ad_inpaint_width: PositiveInt = 512 ad_inpaint_height: PositiveInt = 512 @@ -79,7 +79,7 @@ class ADetailerArgs(BaseModel, extra=Extra.forbid): key: str, pops: list[str] | None = None, cond: Any = None, - ): + ) -> None: if pops is None: pops = [key] if key not in p: @@ -91,7 +91,7 @@ class ADetailerArgs(BaseModel, extra=Extra.forbid): for k in pops: p.pop(k, None) - def extra_params(self, suffix: str = ""): + def extra_params(self, suffix: str = "") -> dict[str, Any]: if self.ad_model == "None": return {} diff --git a/adetailer/ui.py b/adetailer/ui.py index 37adfb7..97e3fa3 100644 --- a/adetailer/ui.py +++ b/adetailer/ui.py @@ -174,9 +174,7 @@ def one_ui_group( for attr in ALL_ARGS.attrs: widget = getattr(w, attr) on_change = partial(on_widget_change, attr=attr) - widget.change( - fn=on_change, inputs=[state, widget], outputs=[state], queue=False - ) + widget.change(fn=on_change, inputs=[state, widget], outputs=state, queue=False) all_inputs = [state, *w.tolist()] target_button = i2i_button if is_img2img else t2i_button