Merge branch 'comfyanonymous:master' into master

This commit is contained in:
patientx 2025-04-21 00:00:31 +03:00 committed by GitHub
commit d926896b55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -736,6 +736,7 @@ def load_controlnet_state_dict(state_dict, model=None, model_options={}):
return control
def load_controlnet(ckpt_path, model=None, model_options={}):
model_options = model_options.copy()
if "global_average_pooling" not in model_options:
filename = os.path.splitext(ckpt_path)[0]
if filename.endswith("_shuffle") or filename.endswith("_shuffle_fp16"): #TODO: smarter way of enabling global_average_pooling