flow_auto_pixel
Conditional auto-resize (deprecated node in Apt_Preset)
- image
- image
This one lives in the pack's own "Deprecated" bucket, so treat it as legacy - if you're building something new, check whether the pack's current image-processing nodes (the README's "Image processing" section describes a preprocess ā generate ā recover combo it's actively developing) cover the same ground before reaching for this. That said, here's what it does, because a lot of existing workflows still have it wired in.
What it does
It's a conditional image resizer: check a condition against the incoming image, then take one of two resize paths depending on whether it's true or false. threshold_type picks the test - (W+H) < threshold, W*H < threshold, width <= height, or width > height - and pixels_threshold is the number it's tested against. Whichever branch fires, the image gets scaled by a separate factor per branch (low_pixels_True for the true case, high_pixels_False for false) using its own interpolation method (upscale_method_True / upscale_method_False, each a pick of bicubic, nearest-exact, bilinear, area, or lanczos), and the result is finally snapped to a multiple of divisible_by - the standard ComfyUI requirement that dimensions divide cleanly for VAE encode/decode to behave.
Put plainly: it's a one-node "if this image is small/big/portrait/landscape, resize it this way instead of that way" branch, useful for a workflow that has to handle inconsistent input sizes without a human deciding per image.
Inputs and output
- image (IMAGE, required) - what gets tested and resized.
- threshold_type + pixels_threshold - the condition.
- upscale_method_True / upscale_method_False and low_pixels_True / high_pixels_False - the resize behavior per branch.
- divisible_by (INT, default 8) - final dimension rounding.
- model_name (enum) is also a required field, but our capture of this node showed it with zero available choices - it's likely populated from a models folder that was empty at capture time. If you see the same empty dropdown, it means the node expects something in a specific ComfyUI models subfolder before it'll let you pick anything; the README doesn't document which one for this particular field, so if it blocks you, check the pack's GitHub issues for the exact folder before assuming your install is broken.
- image (IMAGE, output) - the resized result.
Installing it
Search ComfyUI-Apt_Preset in ComfyUI Manager, or clone manually: cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git, then restart. The README's dependency step is "double-click install.bat" - Windows-first, no requirements.txt visible, so on Linux/Mac crack open that file to see what it installs and replicate it by hand in your venv. This node doesn't need the pack's heavier optional extras (GGUF, Advanced-ControlNet, nunchaku, downloaded segmentation models) - those serve other nodes in this large pack.
Common issues
Because it's deprecated, don't be surprised if it behaves oddly or gets less attention from the author going forward - deprecated nodes in actively developed packs are the first thing to silently break on an upstream ComfyUI API change, since nobody's testing against them anymore.
The model_name field with an empty choice list is the most likely thing to trip you up on a fresh install - an enum with nothing in it usually means ComfyUI is reading a folder that doesn't exist yet or has nothing in it. Check your ComfyUI/models/ subfolders against what other nodes in this pack expect.
And the pack-wide caveat: it's one Python package with a large surface area, so an import error anywhere can take the whole pack - including this node - offline. If it's missing after install, check the ComfyUI console at boot for the real traceback rather than re-running the install steps blind.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 0 options: | |
| image | IMAGE | ā | |
| threshold_type | COMBO | 4 options: (W+H) < threshold, W*H < threshold, width <= height, width > height | |
| pixels_threshold | INT | 0ā90000 | ā |
| upscale_method_True | COMBO | 5 options: bicubic, nearest-exact, bilinear, area, lanczos | |
| upscale_method_False | COMBO | 5 options: bicubic, nearest-exact, bilinear, area, lanczos | |
| low_pixels_True | FLOAT | 1.000.01ā16 | ā |
| high_pixels_False | FLOAT | 1.000.01ā16 | ā |
| divisible_by | INT | 80ā512 | ā |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | ā |