mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
Made CLIP input optional in LoRA Loader, enabling compatibility with Hunyuan workflows
This commit is contained in:
@@ -18,7 +18,7 @@ class LoraManagerLoader:
|
||||
return {
|
||||
"required": {
|
||||
"model": ("MODEL",),
|
||||
"clip": ("CLIP",),
|
||||
# "clip": ("CLIP",),
|
||||
"text": (IO.STRING, {
|
||||
"multiline": True,
|
||||
"dynamicPrompts": True,
|
||||
@@ -75,11 +75,12 @@ class LoraManagerLoader:
|
||||
logger.warning(f"Unexpected loras format: {type(loras_data)}")
|
||||
return []
|
||||
|
||||
def load_loras(self, model, clip, text, **kwargs):
|
||||
def load_loras(self, model, text, **kwargs):
|
||||
"""Loads multiple LoRAs based on the kwargs input and lora_stack."""
|
||||
loaded_loras = []
|
||||
all_trigger_words = []
|
||||
|
||||
clip = kwargs.get('clip', None)
|
||||
lora_stack = kwargs.get('lora_stack', None)
|
||||
# First process lora_stack if available
|
||||
if lora_stack:
|
||||
|
||||
@@ -2,16 +2,13 @@ import os
|
||||
import logging
|
||||
import asyncio
|
||||
import json
|
||||
import re
|
||||
from typing import List, Dict, Optional, Any
|
||||
from datetime import datetime
|
||||
from ..config import config
|
||||
from .recipe_cache import RecipeCache
|
||||
from .lora_scanner import LoraScanner
|
||||
from .civitai_client import CivitaiClient
|
||||
from ..utils.utils import fuzzy_match
|
||||
import sys
|
||||
from contextlib import asynccontextmanager
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -35,6 +35,10 @@ app.registerExtension({
|
||||
// Enable widget serialization
|
||||
node.serialize_widgets = true;
|
||||
|
||||
node.addInput('clip', 'CLIP', {
|
||||
"shape": 7
|
||||
});
|
||||
|
||||
node.addInput("lora_stack", 'LORA_STACK', {
|
||||
"shape": 7 // 7 is the shape of the optional input
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user