Nodes/Shinsplat/Tensor Toys (Shinsplat)
ComfyUI Node

Tensor Toys (Shinsplat)

The experimental conditioning controller — read the warning before you dig

By Shinsplat·Created 2 years ago·Updated 2 years ago· 47
Tensor Toys (Shinsplat)
    • _control
    • help
    ◄ordercond_lerp, cond_lerp_tokens, cond_expand, cond_weight, cond_scale, cond_invert►
    ◄templateempty►
    ◄nameempty►
    ◄enabledtrue►
    ◄cond_weightfalse►
    ◄cond_expandfalse►
    ◄cond_invertfalse►
    ◄cond_scalefalse►
    ◄cond_lerpfalse►
    ◄cond_lerp_tokensfalse►
    ◄pooled_fillfalse►
    ◄cond_weight_methods+0.0, *1.0, /1, -0.0►
    ◄cond_weight_map111110000000►
    ◄cond_weight_defaulttrue►
    ◄cond_expand_amount4►
    ◄cond_expand_map11►
    ◄cond_expand_defaulttrue►
    ◄expand_threshold10►
    ◄cond_invert_map1000►
    ◄cond_invert_defaultfalse►
    ◄cond_scale_factor0.00►
    ◄cond_scale_map001►
    ◄cond_scale_defaultfalse►
    ◄cond_lerp_factor0.50►
    ◄cond_lerp_map001►
    ◄cond_lerp_defaultfalse►
    ◄pooled_weight0.00►

    This is the most honest node description in the pack. The author opens the Tensor Toys README with "I'm giving you a shovel, what you find is your own fault," a warning that digging into model internals can surface material you didn't ask for, and a note that no negative-prompt stack will save you. Tensor Toys is not a tuning knob - it's an experimental controller that manipulates the conditioning tensors before they reach the sampler, and it's designed to take you somewhere past what your prompt describes. If that's the kind of day you want, this node and its helper nodes are a genuinely unique toybox.

    How it works

    Tensor Toys generates a Python dictionary - the _control output - that you pipe into Clip Tokens Encode (Shinsplat)'s control_ input. That dictionary tells the token encoder how to prepare (or withhold) token weights before the tensors go to the KSampler. There's a template system: template loads a named parameter set, name saves the current setup, and you can hand templates to other people. The order field (default cond_lerp, cond_lerp_tokens, cond_expand, cond_weight, cond_scale, cond_invert) controls the sequence the operations apply in.

    The cond_* toggles turn operations on: cond_weight applies math to token weights (cond_weight_methods like +0.0, *1.0, /1, -0.0), cond_expand duplicates tokens (cond_expand_amount), cond_invert flips them, cond_scale scales, cond_lerp / cond_lerp_tokens interpolate toward a reference, and pooled_fill / pooled_weight poke at the pooled vector. Each operation has a _map string and a _default fallback deciding which positions in the sequence get affected - this is genuinely fiddly, and the README's own example workflow (in the pack's work-flows/ folder) is the fastest way to see a working configuration.

    One deliberate note from the author: using a zero weight with no prompt gives you "themed" output based on whatever the model was trained on - effectively steering by data leakage rather than text.

    The inputs that matter

    Honestly: enabled, template/name (save/load your configs), and one cond_* toggle at a time. The full 27-input schema is real but is a laboratory, not a daily driver - start with cond_scale or cond_lerp and one _map string, and read the help output before stacking features.

    Outputs: _control (the dictionary for Clip Tokens Encode) and help.

    How to install it

    Ships in ComfyUI-Shinsplat:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Shinsplat/ComfyUI-Shinsplat
    

    or ComfyUI Manager, then restart. No extra deps.

    Common issues

    • "It changed everything and I don't know why" - that's the intended experience, per the docs. Revert to a saved template or turn enabled off; the node still passes a harmless controller through.
    • The _map strings don't do what you expect - they're positional bit-masks over the token sequence; 111110000000 isn't a count, it's a mask. The author's own Tensor_Toys.txt is the only real documentation, and it expects you to experiment.
    • Unexpected content - the README warning applies. This tool goes beyond your prompts by design.
    Categoryadvanced/shinsplat

    Inputs (27)

    NameTypeDefaultDescription
    orderSTRINGcond_lerp, cond_lerp_tokens, cond_expand, cond_weight, cond_scale, cond_invert—
    templateSTRINGempty—
    nameSTRINGempty—
    enabledBOOLEANtrue—
    cond_weightBOOLEANfalse—
    cond_expandBOOLEANfalse—
    cond_invertBOOLEANfalse—
    cond_scaleBOOLEANfalse—
    cond_lerpBOOLEANfalse—
    cond_lerp_tokensBOOLEANfalse—
    pooled_fillBOOLEANfalse—
    cond_weight_methodsSTRING+0.0, *1.0, /1, -0.0—
    cond_weight_mapSTRING111110000000—
    cond_weight_defaultBOOLEANtrue—
    cond_expand_amountINT4-18446744073709550000–18446744073709550000—
    cond_expand_mapSTRING11—
    cond_expand_defaultBOOLEANtrue—
    expand_thresholdINT101–18446744073709550000—
    cond_invert_mapSTRING1000—
    cond_invert_defaultBOOLEANfalse—
    cond_scale_factorFLOAT0.00-18446744073709550000–18446744073709550000—
    cond_scale_mapSTRING001—
    cond_scale_defaultBOOLEANfalse—
    cond_lerp_factorFLOAT0.500–1—
    cond_lerp_mapSTRING001—
    cond_lerp_defaultBOOLEANfalse—
    pooled_weightFLOAT0.00-18446744073709550000–18446744073709550000—

    Outputs (2)

    NameTypeDescription
    _controlSTRING—
    helpSTRING—