1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-03 07:26:31 +08:00

Add DualClipLoader to load clip models for SDXL.

Update LoadClip to load clip models for SDXL refiner.
This commit is contained in:
comfyanonymous
2023-06-25 01:40:38 -04:00
parent b7933960bb
commit 20f579d91d
4 changed files with 67 additions and 11 deletions

View File

@@ -128,6 +128,9 @@ class SD1ClipModel(torch.nn.Module, ClipTokenWeightEncoder):
def encode(self, tokens):
return self(tokens)
def load_sd(self, sd):
return self.transformer.load_state_dict(sd, strict=False)
def parse_parentheses(string):
result = []
current_item = ""