加载重置图像🐠meeeyo.com
One node that loads an image, resizes it, and hands you a mask
- image
- mask
- info
The stock LoadImage node in ComfyUI does one job and then you're off to a resize node, an image-to-mask node, and half a dozen wires you didn't want. LoadAndAdjustImage collapses that into a single drop: it loads a file from your input folder, optionally resizes it to a preset or a max dimension, and - because it reads the alpha channel - hands you a ready-made mask output too. If you're building an img2img or inpaint workflow and your source images have transparency, this one node replaces three.
It's part of ComfyUI_StringOps, which is a bit of a misnomer: the pack started as text utilities and has since grown file and image helpers. That means you'll find this node living in the same pack as the text stuff, branded 🐠meeeyo.com like everything else in it. It's a small Chinese-market pack, so don't expect a community around it - but the image loader itself is genuinely useful and needs no extra models.
How it works
Under the hood it's Pillow plus a few resize strategies. You pick a size_option and the node figures out a target size, then resizes with bilinear filtering. The interesting part is the mask: if the image has an alpha channel, the node extracts it and outputs 1 - alpha as a MASK - that's the standard ComfyUI convention where white is opaque. No alpha? You get an all-black mask, which is usually exactly what an inpaint workflow wants as its "nothing masked" starting point.
It also handles animated images frame-by-frame (GIF/APNG get split into a batch), auto-corrects EXIF orientation, and the info output is a small status string telling you the file path, original size, and the size it ended up at. Handy when you can't tell why an image "came out wrong" - the answer is usually in there.
The inputs that matter
Only three, and only one is fiddly:
- image - pick from files already in
ComfyUI/input, or upload one from the widget. - size_option - the drop-down that does the heavy lifting:
No Change(passthrough),Custom(scale to fitmax_dimension),Million Pixels(~1MP, rounded to multiples of 8),Small/Medium/Large(aspect-aware buckets like 768×512 landscape vs 512×768 portrait vs 768×768 square), and fixed video presets like720P-H(1280×720) and480×832. - max_dimension - only read when
size_optionisCustom; it's the longest side your image is allowed to be. Set to 0 and... don't, set it to something like 1024.
Outputs are image (IMAGE), mask (MASK), and info (STRING). Wire the image and mask into a VAE encode + latent mask, and you've got a clean inpaint start.
Installing it
From ComfyUI Manager, search ComfyUI_StringOps and install. Or the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/MeeeyoAI/ComfyUI_StringOps.git
Restart ComfyUI. No models to download, nothing heavy - the dependencies (Pillow, numpy, torch) already ship with ComfyUI, so this node installs silently. It's one of the easier installs you'll do.
Where people get burned
The "resize" here is mostly downscale - Custom fits within max_dimension, it won't blow your image up to fill it. If you expected upscaling, you'll be disappointed; pair it with an upscale node instead. And because every node in this pack returns a "changed" flag that never caches, the node re-reads the file on every run - fine for a loader, just don't assume a cached result.
One more honest note: the node's in-UI description is just a promo line advertising the author's WeChat, not documentation. Everything above comes from reading the actual source, because the UI won't tell you.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png | |
| max_dimension | INT | 00–4096 | — |
| size_option | COMBO | No Change | 12 options: No Change, Custom, Million Pixels, Small, Medium, Large, +6 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| info | STRING | — |