Cloud Resize Images By Longer Edge
One number to get your input images cloud-ready
- images
- images
Model inputs have preferred resolutions, and images rarely arrive in them. Cloud Resize Images By Longer Edge is the pack's one-knob answer: it takes a CLOUD_IMAGE, scales it so the longer edge lands at a target length (default 1024), preserves aspect ratio, and hands back a CLOUD_IMAGE the rest of the cloud chain can actually use. Contributes a ResizeImagesByLongerEdge step to the assembled workflow JSON.
Why "longer edge" instead of width/height? Because for img2img and video work, aspect ratio matters more than absolute size - you want the biggest dimension normalized and the other one to fall wherever the ratio puts it. It's the same philosophy as the resize nodes you'll see in local Wan or LTX I2V templates: get the input into the model's comfort zone without cropping or smashing the composition. One input, one number, and your reference image stops being the thing that's silently degrading your results.
Inputs
images- aCLOUD_IMAGEhandle. In a video chain this is usually a start frame that came from the pack's local-image-to-cloud bridge (local pixels get uploaded once via/api/upload/image).longer_edge- INT, default 1024, range 1–8192. The target length for the image's longer side.
Output: images (CLOUD_IMAGE), resized.
Installation
Same pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Dobidop/ComfyUI-CloudAPI-worker
Copy config.json.example to config.json, add an API key from https://platform.comfy.org/profile/api-keys, restart. ComfyUI Manager has it under "ComfyUI-CloudAPI-worker"; deps are just requests, Pillow, safetensors.
Gotchas
- It's a dimension fix, not a compression fix. Cloud LTXV Preprocess handles image compression for the LTX I2V path; this node handles size. For a huge start image you may want both - resize to the model's preferred resolution, then compress.
- 1024 is a good general default, but "preferred resolution" is model-specific - some video models want 720 or 768 on the long side. Check the model card rather than assuming.
- Whole-pack reminder: it's a proof of concept from a small community project, so treat the included example workflows (like the Wan I2V one) as the tested wiring for how this node should slot into a chain.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | CLOUD_IMAGE | — | |
| longer_edge | INT | 10241–8192 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | CLOUD_IMAGE | — |