Added None check in calc_cond_uncond_batch_wrapper (uncond can be None)

This commit is contained in:
Jedrzej Kosinski
2024-03-22 01:50:07 -05:00
parent 448d746334
commit a9a0082d7c
+2
View File
@@ -562,6 +562,8 @@ def calc_cond_uncond_batch_wrapper(model, cond, uncond, x_in, timestep, model_op
# check if conds or unconds contain lora_hook
contains_lora_hooks = False
for cond_uncond in [cond, uncond]:
if cond_uncond is None:
continue
for t in cond_uncond:
if "lora_hook" in t:
contains_lora_hooks = True