From 4661d1db5aa774f972bc270f2a1e5f8cf20ea978 Mon Sep 17 00:00:00 2001 From: Jedrzej Kosinski Date: Wed, 15 Oct 2025 17:34:36 -0700 Subject: [PATCH] Bring patches changes from _calc_cond_batch into _calc_cond_batch_multigpu --- comfy/samplers.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/comfy/samplers.py b/comfy/samplers.py index e0e0296f8..ed702304c 100755 --- a/comfy/samplers.py +++ b/comfy/samplers.py @@ -481,17 +481,10 @@ def _calc_cond_batch_multigpu(model: BaseModel, conds: list[list[dict]], x_in: t copy_dict1=False) if patches is not None: - # TODO: replace with merge_nested_dicts function - if "patches" in transformer_options: - cur_patches = transformer_options["patches"].copy() - for p in patches: - if p in cur_patches: - cur_patches[p] = cur_patches[p] + patches[p] - else: - cur_patches[p] = patches[p] - transformer_options["patches"] = cur_patches - else: - transformer_options["patches"] = patches + transformer_options["patches"] = comfy.patcher_extension.merge_nested_dicts( + transformer_options.get("patches", {}), + patches + ) transformer_options["cond_or_uncond"] = cond_or_uncond[:] transformer_options["uuids"] = uuids[:]