mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-04-30 11:11:21 +00:00
fix: misc
This commit is contained in:
@@ -110,7 +110,7 @@ class ADetailerArgs(BaseModel, extra=Extra.forbid):
|
|||||||
def enable_check(*args: Any) -> bool:
|
def enable_check(*args: Any) -> bool:
|
||||||
if not args:
|
if not args:
|
||||||
return False
|
return False
|
||||||
a0 = args[0]
|
a0: bool | Mapping = args[0]
|
||||||
ad_model = ALL_ARGS[0].attr
|
ad_model = ALL_ARGS[0].attr
|
||||||
|
|
||||||
if isinstance(a0, Mapping):
|
if isinstance(a0, Mapping):
|
||||||
|
|||||||
@@ -355,14 +355,10 @@ class AfterDetailerScript(scripts.Script):
|
|||||||
)
|
)
|
||||||
|
|
||||||
all_inputs = [state] + w.tolist()
|
all_inputs = [state] + w.tolist()
|
||||||
if is_img2img:
|
target_button = img2img_submit_button if is_img2img else txt2img_submit_button
|
||||||
img2img_submit_button.click(
|
target_button.click(
|
||||||
fn=on_generate_click, inputs=all_inputs, outputs=state, queue=False
|
fn=on_generate_click, inputs=all_inputs, outputs=state, queue=False
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
txt2img_submit_button.click(
|
|
||||||
fn=on_generate_click, inputs=all_inputs, outputs=state, queue=False
|
|
||||||
)
|
|
||||||
|
|
||||||
infotext_fields = [
|
infotext_fields = [
|
||||||
(getattr(w, attr), name + suffix(n)) for attr, name in ALL_ARGS
|
(getattr(w, attr), name + suffix(n)) for attr, name in ALL_ARGS
|
||||||
|
|||||||
Reference in New Issue
Block a user