From 0df506ee4a130f69dc69380de44942107e126fb0 Mon Sep 17 00:00:00 2001 From: nullquant Date: Mon, 13 May 2024 00:39:11 +0300 Subject: [PATCH] torch.load to comfy.utils.load_torch_file --- brushnet_nodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brushnet_nodes.py b/brushnet_nodes.py index ca4163d..1590016 100644 --- a/brushnet_nodes.py +++ b/brushnet_nodes.py @@ -44,6 +44,7 @@ ModelsToUnload = [comfy.sd1_clip.SD1ClipModel, comfy.ldm.models.autoencoder.AutoencoderKL ] + class BrushNetLoader: @classmethod @@ -171,7 +172,7 @@ class PowerPaintCLIPLoader: num_vectors_per_token = 10, ) - pp_text_encoder.load_state_dict(torch.load(pp_CLIP_file), strict=False) + pp_text_encoder.load_state_dict(comfy.utils.load_torch_file(pp_CLIP_file), strict=False) print('PowerPaint CLIP file: ', pp_CLIP_file)