Nodes/Nilor Nodes by Nilor Corp/๐Ÿ‘บ Remap Float List
ComfyUI Node

๐Ÿ‘บ Remap Float List

Rescale a whole list of floats from one range to another, without touching each value

By nilor-corpยทCreated 2 years agoยทUpdated 6 months agoยท 6
๐Ÿ‘บ Remap Float List
    • remapped_floats
    โ—„list_of_floatsโ€”โ–บ
    โ—„min_input0.00โ–บ
    โ—„max_input1.00โ–บ
    โ—„min_output0.00โ–บ
    โ—„max_output1.00โ–บ

    Somewhere in your workflow you have a list of strengths, weights, or curve values that live in the wrong range. Maybe your noise schedule generates 0โ€“1 floats but your CFG-strength curve needs to sit between 1 and 7. Maybe your LoRA weight animation wants 0.5โ€“1.5 instead of 0โ€“1. You could add a multiply-and-add per value and pray you did the arithmetic right, or you could hand the whole list to ๐Ÿ‘บ Remap Float List and tell it "input lives in 0โ€“1, I want it in 1โ€“7" and be done.

    It's a linear remap, plain and simple: min_input/max_input describe the range your floats are in, min_output/max_output the range you want them in. Every value gets stretched or squeezed proportionally, so the shape of your curve is preserved - the relationships between values stay intact, only the scale changes. That's the whole pitch, and it's genuinely useful whenever you're animating a parameter across a batch and the generator's range doesn't match the consumer's.

    Inputs and output

    • list_of_floats - the values to rescale. Comes in as a FLOAT list, so wire it from whatever generates your list of floats.
    • min_input / max_input - the range you believe your input is in. Defaults are 0 and 1.
    • min_output / max_output - the range you want out. Defaults 0 and 1, i.e. a no-op pass-through if you leave everything default.
    • remapped_floats (FLOAT output) - the rescaled list, same length as the input.

    Installing it

    This is part of Nilor Nodes (nilor-corp/nilor-nodes), not a standalone install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/nilor-corp/nilor-nodes
    

    Or via ComfyUI Manager โ†’ search "Nilor Nodes" โ†’ install โ†’ restart. No model downloads. The pack's requirements.txt is heavier than this node deserves (boto3, fastapi, huggingface_hub, openexr all get installed regardless), and the README lists Kijai's comfyui-kjnodes as a prerequisite - fair, since that's where most float-list generators actually come from. None of that is a reason to skip it; just don't be surprised by the install footprint.

    Troubleshooting

    The one real trap is in the math: if max_input and min_input are equal, the node raises a ValueError rather than silently dividing by zero. So if you hit an error with "max_input and min_input cannot be the same value" in it, you told it the input range is a point - double-check what your generator is actually producing. Also worth knowing: the pack has essentially no community presence, so when something looks wrong, the source and README are your only docs. And because the remap is linear, feeding it a value outside the input range won't clamp it - it'll happily extrapolate. Sometimes that's what you want, sometimes it's how you get a strength of 1.7 and a blown-out image.

    CategoryNilor Nodes ๐Ÿ‘บ/Generators

    Inputs (5)

    NameTypeDefaultDescription
    list_of_floatsFLOATโ€”
    min_inputFLOAT0.00โ€”
    max_inputFLOAT1.00โ€”
    min_outputFLOAT0.00โ€”
    max_outputFLOAT1.00โ€”

    Outputs (1)

    NameTypeDescription
    remapped_floatsFLOATโ€”