fix(loaders): point at FunPack LoRA Loader, which applies on its own

Every message about loading the chunk-causal adapter named FunPack Apply LoRA
Weights. That is the wrong node: it is the optional stack producer for
prompt-specific trained strengths. FunPack LoRA Loader loads AND applies from
its own file list, and always has — so the instruction sent the user to add a
node they do not need.

Its own description read the same way ("Loads LoRAs from a FunPack LoRA
stack"), which is where the confusion came from. Both it and the docstring now
say the stack is the narrow case, not the way in.

Tests: 1767 passed (+5).
This commit is contained in:
digital-garbage
2026-08-26 19:00:58 +03:00
parent c1f33a6d26
commit 2790a6263d
4 changed files with 53 additions and 5 deletions
+2 -2
View File
@@ -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", {
+8 -2
View File
@@ -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()
+2 -1
View File
@@ -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"
+41
View File
@@ -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", {})