diff --git a/js/impact-pack.js b/js/impact-pack.js index 1e6d75d..1da4720 100644 --- a/js/impact-pack.js +++ b/js/impact-pack.js @@ -546,6 +546,7 @@ app.registerExtension({ // Preventing validation errors from occurring in any situation. node.widgets[combo_id].serializeValue = () => { return "Select the LoRA to add to the text"; } + node.widgets[combo_id+1].serializeValue = () => { return "Select the Wildcard to add to the text"; } } if(node.comfyClass == "ImpactWildcardProcessor" || node.comfyClass == "ImpactWildcardEncode") { diff --git a/modules/impact/config.py b/modules/impact/config.py index 84503a5..ec37037 100644 --- a/modules/impact/config.py +++ b/modules/impact/config.py @@ -2,7 +2,7 @@ import configparser import os -version = "V4.18.5" +version = "V4.18.6" dependency_version = 14 diff --git a/modules/impact/impact_pack.py b/modules/impact/impact_pack.py index fd45d3a..fda58ba 100644 --- a/modules/impact/impact_pack.py +++ b/modules/impact/impact_pack.py @@ -1943,6 +1943,14 @@ class ImpactWildcardEncode: RETURN_NAMES = ("model", "clip", "conditioning", "populated_text") FUNCTION = "doit" + @staticmethod + def process_with_loras(**kwargs): + return impact.wildcards.process_with_loras(**kwargs) + + @staticmethod + def get_wildcard_list(): + return impact.wildcards.get_wildcard_list() + def doit(self, *args, **kwargs): populated = kwargs['populated_text'] model, clip, conditioning = impact.wildcards.process_with_loras(populated, kwargs['model'], kwargs['clip']) diff --git a/modules/impact/wildcards.py b/modules/impact/wildcards.py index 65c34d5..5c8977d 100644 --- a/modules/impact/wildcards.py +++ b/modules/impact/wildcards.py @@ -271,7 +271,7 @@ def resolve_lora_name(lora_name_cache, name): return x -def process_with_loras(wildcard_opt, model, clip): +def process_with_loras(wildcard_opt, model, clip, clip_encoder=None): lora_name_cache = [] pass1 = process(wildcard_opt) @@ -305,5 +305,8 @@ def process_with_loras(wildcard_opt, model, clip): print(f"LORA NOT FOUND: {lora_name}") print(f"CLIP: {pass2}") - return model, clip, nodes.CLIPTextEncode().encode(clip, pass2)[0] + if clip_encoder is None: + return model, clip, nodes.CLIPTextEncode().encode(clip, pass2)[0] + else: + return model, clip, clip_encoder.encode(clip, pass2)[0]