From dd6e280ae4219096df6946df16ea854bf3ab69f3 Mon Sep 17 00:00:00 2001 From: Ken Simpson Date: Fri, 3 May 2024 15:36:22 -0700 Subject: [PATCH] Fixed issue #49 upstream by cloning the model before patching it --- brushnet_nodes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/brushnet_nodes.py b/brushnet_nodes.py index d8702cc..2645daf 100644 --- a/brushnet_nodes.py +++ b/brushnet_nodes.py @@ -169,6 +169,10 @@ class BrushNet: def model_update(self, model, vae, image, mask, brushnet, positive, negative, scale, start_at, end_at): + # Make a copy of the model so that we're not patching it everywhere in + # the workflow. + model = model.clone() + is_SDXL = False if isinstance(model.model.model_config, comfy.supported_models.SD15): print('Base model type: SD1.5')