This commit is contained in:
Christo 2026-05-09 23:59:17 +03:00 committed by GitHub
commit c3c003d4c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -300,9 +300,12 @@ def _calc_cond_batch(model: BaseModel, conds: list[list[dict]], x_in: torch.Tens
transformer_options = model.current_patcher.apply_hooks(hooks=hooks) transformer_options = model.current_patcher.apply_hooks(hooks=hooks)
if 'transformer_options' in model_options: if 'transformer_options' in model_options:
transformer_options = comfy.patcher_extension.merge_nested_dicts(transformer_options, # Hook-derived patches must stack on top of model patches, so
model_options['transformer_options'], # model's transformer_options is dict1 (existing) and the
copy_dict1=False) # hook-derived dict is dict2 (extends model's lists).
transformer_options = comfy.patcher_extension.merge_nested_dicts(model_options['transformer_options'],
transformer_options,
copy_dict1=True)
if patches is not None: if patches is not None:
transformer_options["patches"] = comfy.patcher_extension.merge_nested_dicts( transformer_options["patches"] = comfy.patcher_extension.merge_nested_dicts(