Skip to content

Commit d9dc02a

Browse files
authored
Support "lite" version of alibaba-pai Z-Image Controlnet (Comfy-Org#11849)
* reduced number of control layers (3) compared to full model
1 parent c543ad8 commit d9dc02a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

comfy_extras/nodes_model_patch.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,10 @@ def load_model_patch(self, name):
244244
elif 'control_all_x_embedder.2-1.weight' in sd: # alipai z image fun controlnet
245245
sd = z_image_convert(sd)
246246
config = {}
247+
if 'control_layers.4.adaLN_modulation.0.weight' not in sd:
248+
config['n_control_layers'] = 3
249+
config['additional_in_dim'] = 17
250+
config['refiner_control'] = True
247251
if 'control_layers.14.adaLN_modulation.0.weight' in sd:
248252
config['n_control_layers'] = 15
249253
config['additional_in_dim'] = 17

0 commit comments

Comments
 (0)