Skip to content

Commit 8075756

Browse files
committed
Typecheck fix.
1 parent db824a0 commit 8075756

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ai_diffusion/workflow.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,14 +429,15 @@ def encode_text_prompt(
429429
cond: Conditioning,
430430
clip: Clip,
431431
regions: Output | None,
432-
input_image: Output = None,
433-
control_layers: list[Control] = None,
434-
arch: Arch = None,
432+
input_image: Output | None = None,
433+
control_layers: list[Control] | tuple[Control] = (),
434+
arch: Arch | None = None,
435435
):
436436
if arch is not None and input_image is not None and arch.is_qwen_like and arch.is_edit:
437437
positive = cond.positive.encode_text(cond.style_prompt)
438438
negative = cond.negative.encode(w, clip)
439439

440+
assert input_image is not None and arch is not None
440441
extra_input = [c.image for c in control_layers if c.mode.is_ip_adapter] if control_layers else []
441442
if len(extra_input) == 0:
442443
if arch == Arch.qwen_e_p:

0 commit comments

Comments
 (0)