diff --git a/loaders.py b/loaders.py index 51044f93..bd775fc9 100644 --- a/loaders.py +++ b/loaders.py @@ -174,8 +174,8 @@ class FunPackDiffusionModelLoader: "about the weights changes and an ordinary generation is " "unaffected — the model simply gains the ability to read a " "key/value cache. It still needs a LoRA trained for that " - "pattern (load it with FunPack Apply LoRA Weights like any " - "other): the base H3 weights have never seen a cache, so " + "pattern — load it with FunPack LoRA Loader like any other " + "LoRA: the base H3 weights have never seen a cache, so " "without one the chunked lane runs out of distribution. Use " "the full non-pruned checkpoint."}), "fp16_accumulation": ("BOOLEAN", { diff --git a/model_management.py b/model_management.py index cfdb1467..1afce65e 100644 --- a/model_management.py +++ b/model_management.py @@ -718,13 +718,19 @@ class FunPackApplyLoraWeights: class FunPackLoraLoader: - """Loads the LoRA stack prepared by FunPack Apply LoRA Weights.""" + """Loads and applies LoRAs. Complete on its own — the stack input is optional. + + The `lora_list` on this node is the ordinary way in: pick files, they are applied. A + FunPack Apply LoRA Weights stack is only needed when the strengths are prompt-specific + and trained, which is a narrower case than it used to read as. + """ CATEGORY = "FunPack/Model Management" RETURN_TYPES = ("MODEL", "CLIP", LORA_STACK_TYPE, "STRING") RETURN_NAMES = ("MODEL", "CLIP", "lora_stack", "status") FUNCTION = "load_loras" - DESCRIPTION = "Loads LoRAs from a FunPack LoRA stack without doing any learning." + DESCRIPTION = ("Loads and applies LoRAs. Pick files in its own list — a stack node is " + "only needed for prompt-specific trained strengths.") def __init__(self): self.raw_lora_cache = OrderedDict() diff --git a/raven_causal.py b/raven_causal.py index 9e5c0aa1..acdeedfd 100644 --- a/raven_causal.py +++ b/raven_causal.py @@ -294,7 +294,8 @@ def build_session(model, positive, latent, *, sink=2, window=2, storage="cpu_pin if not hasattr(diffusion, "forward_chunk") or not hasattr(diffusion, "prefill_text"): return None, ("the loaded model is a stock bidirectional H3. Switch on `chunk_causal` " "on FunPack Diffusion Model Loader, and load a LoRA trained for the " - "chunked pattern with FunPack Apply LoRA Weights.") + "chunked pattern with FunPack LoRA Loader — it applies on its own, no " + "stack node needed.") blocks = getattr(diffusion, "blocks", None) if not blocks: return None, "the loaded model exposes no DiT blocks to cache" diff --git a/tests/test_h3_causal_loader.py b/tests/test_h3_causal_loader.py index f63f368f..301c8264 100644 --- a/tests/test_h3_causal_loader.py +++ b/tests/test_h3_causal_loader.py @@ -111,3 +111,44 @@ def test_a_comfy_without_h3_declines_instead_of_raising(monkeypatch): fake.model.diffusion_model = diffusion ok, note = hc.make_causal(fake) assert ok is False and "no MiniMax H3" in note + + +# ── which node the user is actually sent to ───────────────────────────────── +# +# FunPack LoRA Loader loads AND applies, from its own file list. FunPack Apply LoRA Weights is +# the optional stack producer for prompt-specific trained strengths. Naming the second one as +# the way in sends the user to add a node they do not need. + +def test_the_loader_message_names_the_lora_loader(): + tip = _fields()["chunk_causal"][1]["tooltip"] + assert "FunPack LoRA Loader" in tip + assert "Apply LoRA Weights" not in tip + + +def test_the_sampler_message_names_the_lora_loader(): + import inspect + import raven_causal + src = inspect.getsource(raven_causal.build_session) + assert "FunPack LoRA Loader" in src + assert "Apply LoRA Weights" not in src + + +def test_the_lora_loader_does_not_advertise_itself_as_stack_only(): + """Its description used to read as though a stack node were required.""" + import model_management + text = model_management.FunPackLoraLoader.DESCRIPTION + assert "only needed" in text or "own list" in text + + +def test_the_stack_input_is_optional(): + """If it were required, 'the loader applies them on its own' would be false.""" + import model_management + spec = model_management.FunPackLoraLoader.INPUT_TYPES() + assert "lora_stack" in spec.get("optional", {}) + assert "lora_stack" not in spec.get("required", {}) + + +def test_the_file_list_is_the_required_way_in(): + import model_management + spec = model_management.FunPackLoraLoader.INPUT_TYPES() + assert "lora_list" in spec.get("required", {})