Weight syntax: - Grammar: `(arg:SIGNED_NUMBER)` parses to a WeightedGroup - emph(text|w) is a function-style alias for the same - Nested weights multiply: ((cat:1.2):0.5) -> 0.6, matching A1111 - Weights are emitted in the (token, weight) tuples that comfy's stock encode_token_weights already applies post-transformer To make per-position weight indexing work, rows are now always exactly max_length entries: a multi-slot Action emits as one (action, w) entry followed by (ACTION_CONTINUATION, w) placeholders that process_tokens drops before handing to super().process_tokens. This replaces the previous variable-length-row + padding-math. PromptLang Inspect: - New node: CLIP + text -> STRING report of per-slot weight, L2 norm, and top-k nearest vocab tokens for the resolved embedding - lib/inspect.py uses the wrapper's stored attr name (cond.clip / tok.clip) rather than hardcoding 'clip_l', and uses the tokenizer's inv_vocab for decode Fix: parse_numeric_arg now rejects WeightedGroup (was only Action). SegOrAction widened to include WeightedGroup.
16 lines
470 B
Python
16 lines
470 B
Python
from .nodes import BuildGif, PromptLangInspect, SpecialClipLoader
|
|
|
|
NODE_CLASS_MAPPINGS = {
|
|
"Build Gif": BuildGif,
|
|
"Special CLIP Loader": SpecialClipLoader,
|
|
"PromptLang Inspect": PromptLangInspect,
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"Build Gif": "Build GIF (KepPromptLang)",
|
|
"Special CLIP Loader": "Special CLIP Loader (KepPromptLang)",
|
|
"PromptLang Inspect": "PromptLang Inspect",
|
|
}
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
|