Load ImageX Adv
Crop, resize, and pad at the loader instead of in a chain of nodes
- image
- mask
- inverted_mask
- width
- height
The problem with feeding images into a diffusion model is that models are picky about size. SDXL wants 1024×1024, a portrait model wants 832×1216, a ControlNet wants its input at exactly the training resolution - and your source photo is almost never that. Normally you solve it with a chain of Resize, Crop, and Pad nodes strung between the loader and the sampler. Load ImageX Adv collapses all of that into the loader itself: you crop and resize visually inside the node, and the picture that comes out the other side is already the shape your model wants.
What it is
This is the big sibling of the plain Load ImageX in the same pack, sitting in WorkflowX/Image Loader. Same thumbnail-browser picking, same file handling, but the loader carries a small image editor with it. Where the plain version just loads, this one processes: interactive crop, resize to fit or cover, aspect-ratio presets, snapping, resampling, and padding with a color fill.
How it works
Two required inputs, and this is the part to understand:
- image - the file picker, same nested-folder catalog and Browse Thumbnails as Load ImageX.
- workflowx_state - a serialized JSON string. Look at the default value and you'll see the whole editor:
mode,max_mp,longest_side,fit_w/fit_h,cover_w/cover_h,crop_anchor,ratio_preset,pad_color,crop_rect, and more.
That state string is UI-managed - the README and the node docs are explicit: don't wire it or hand-edit it. You click the editor buttons on the node, drag a crop box, pick a ratio, and the frontend serializes your choices back into that JSON. It then travels with the workflow file itself, which is the same philosophy as ComfyUI embedding the graph in a PNG: the recipe is in the workflow, validated server-side so a reloaded file renders deterministically, even though the source image is a separate file that has to exist on disk.
Outputs that matter
Five sockets, and all of them are useful:
- image (
IMAGE) - the processed batch, already cropped/resized/padded. - mask (
MASK) - the alpha/padding mask. If you padded, the padded region shows up here, which is exactly what an outpainting workflow needs. - inverted_mask (
MASK) - literally one minus the mask, handed to you so you don't add a node to invert it. - width / height (
INT) - the final pixel dimensions. Wire these into nodes that want to know the canvas size you ended up with.
The processing happens per-frame in the backend (EXIF-transposed, batch-friendly), and change detection hashes both the file and the state - so editing your crop re-runs the node without you having to touch anything.
When to reach for it
- You want every input normalized to a fixed resolution before a model that demands one - no resize chain, just the editor.
- You're prepping an outpainting or inpainting job and want the pad/crop mask for free.
- You want to see the crop before it hits the sampler instead of guessing with numeric widgets.
One default to know about: allow_upscale starts false, so it won't blow a small image up unless you switch it on. Predictable, and a good default.
Installing and troubleshooting
Same as the whole pack: ComfyUI Manager → search "WorkflowX Configurator", or:
cd ComfyUI/custom_nodes
git clone https://github.com/haroonaslam/WorkflowX-Configurator
Restart, then hard-refresh the browser - the editor buttons are frontend JavaScript, and a stale page shows a node with no buttons. If the crop editor isn't doing anything after you click Apply, check that the workflowx_state field actually updated (it's a long JSON blob in the node); if it didn't, refresh the page and try again. WorkflowX is a young pack with no real community footprint yet, so treat yourself as the beta tester - but the state-validation design means a saved workflow behaves the same on every machine, which is more than most loader chains can promise.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | Selected through the WorkflowX thumbnail browser. | |
| workflowx_state | STRING | {"version":1,"mode":"off","max_mp":1.0,"longest_side":1024,"scale_factor":1.0,"fit_w":1024,"fit_h":1024,"cover_w":1024,"cover_h":1024,"cover_action":"fill","crop_anchor":"center","ratio_preset":"1:1","ratio_w":1.0,"ratio_h":1.0,"pad_color":"#808080","pad_top":0,"pad_bottom":0,"pad_left":0,"pad_right":0,"output_snap":0,"resample":"auto","allow_upscale":false,"crop_enabled":false,"crop_snap":0,"crop_rect":null} | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Processed image batch. |
| mask | MASK | Processed alpha/padding mask. |
| inverted_mask | MASK | One minus the processed mask. |
| width | INT | Final output width in pixels. |
| height | INT | Final output height in pixels. |