Meux Outpaint Size Preset Node
Outpainting math, done for you
- safe_left
- safe_right
- safe_top
- safe_bottom
- target_left
- target_right
- target_top
- target_bottom
The most annoying part of outpainting isn't the diffusion - it's the arithmetic. You want to expand a 512×768 image by 200px on each side, feed that into your canvas and pad nodes, and hit "latent size not divisible by 8" at the sampler. MeuxOutpaintSizePresetSafe exists to make that failure mode impossible: it's a pure size calculator that rounds each side's expansion up to a diffusion-safe value before you ever wire it into the graph.
How it works
The node takes how much you want to expand on each side and rounds each one up to the nearest multiple of your align value - 8 (the bare minimum for a latent) or 64 (the safer default most SDXL-class models like, since the VAE downsamples by 8 per side). Zero stays zero, which matters: if you only want to extend left and right, the top and bottom outputs come out as 0 and nothing pads them.
Inputs:
expand_left/expand_right/expand_top/expand_bottom- your desired raw expansion per side, 0–4096.align-8or64.
Outputs:
safe_left/safe_right/safe_top/safe_bottom- the rounded-up values you actually feed your padding/canvas node.target_left/target_right/target_top/target_bottom- the raw values you asked for, passed through so you can display or log both.
Installing it
Same pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/fchangjun/Comfyui_MultiSaveImage
cd Comfyui_MultiSaveImage
pip install -r requirements.txt
Or install via ComfyUI Manager by searching "Baidu Meux ComfyTools", then restart.
Why you'd actually reach for it
The honest pitch: this is a tiny convenience node, and you could absolutely do the rounding with any math node. What it buys you is one thing - you can't forget the rounding. If you outpaint regularly, wiring the safe_* outputs straight into your pad-and-outpaint workflow means the "not divisible by 8" error stops being a thing you see. The align choice is the only real decision, and 64 is the safe default.
One thing to know: it only computes sizes. It doesn't touch an image or latent - you feed its outputs into your canvas/pad nodes, which is exactly the point. For a pack that's clearly aimed at an internal production pipeline, this is the kind of "why did nobody ship this" utility that quietly saves you a headache on every run.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| expand_left | INT | 00–4096 | — |
| expand_right | INT | 00–4096 | — |
| expand_top | INT | 00–4096 | — |
| expand_bottom | INT | 00–4096 | — |
| align | COMBO | 64 | 2 options: 8, 64 |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| safe_left | INT | — |
| safe_right | INT | — |
| safe_top | INT | — |
| safe_bottom | INT | — |
| target_left | INT | — |
| target_right | INT | — |
| target_top | INT | — |
| target_bottom | INT | — |