Adjust List Size | Akatz
Force a float list to exactly the length your workflow wants
- output_list
Adjust List Size is one of those little plumbing nodes you don't think about until a workflow refuses to run because two lists don't line up. It takes a list of floats and forces it to a target length - padding with the last value if it's too short, trimming from the end if it's too long.
In ComfyUI's animation and scheduling world, list lengths are the number one source of "everything should work but doesn't." A brightness schedule with 97 values feeding a node that expects one value per frame of a 100-frame batch will either error or misalign silently. This node is the blunt instrument that makes them match: say "I need exactly N values," and it guarantees it.
How it works
Nothing clever, which is the point. If the list is shorter than batch_size, it extends it by repeating the final value - so a schedule that ends at 0.5 stays at 0.5 for the extra frames, which is usually the least surprising behavior. If it's longer, it keeps the first batch_size values and drops the rest. The one edge case worth knowing: an empty list pads with 0.0, not an error.
Inputs and output
float_list- the incoming FLOAT list.batch_size- the exact length you want out, default 10, up to 10000.
Output is output_list, a FLOAT list of exactly batch_size values.
That's it. It's a "match this schedule to my frame count" fixer, and it slots right after whichever node produced a ragged-length schedule and before the node that's strict about lengths.
Installing it
It ships in akatz-ai/ComfyUI-AKatz-Nodes alongside all the other Akatz nodes. Install once via ComfyUI Manager (search "AKatz") or:
cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/ComfyUI-AKatz-Nodes
cd ComfyUI-AKatz-Nodes
pip install -r requirements.txt
Restart ComfyUI after. No models, no downloads; the pack's requirements are just numpy, torch, opencv-python and pydub.
When you'd actually use it
The pattern is: an audio or keyframe schedule comes out of a source node at a length that doesn't match your frame count, and the downstream node (a dilation scheduler, an IPAdapter weights list, a KSampler override list) needs exact alignment. Throw this in between and set batch_size to your frame count. It's not glamorous, but it's the difference between a workflow that runs and one that dies on an index-out-of-range deep in a node you don't want to debug.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| float_list | FLOAT | — | |
| batch_size | INT | 101–10000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_list | FLOAT | — |