萌宝AI·加载图片
Paste a screenshot straight onto the canvas
- image
- mask
The stock Load Image node makes you put files in ComfyUI/input and pick them from a dropdown. That's fine until your workflow is "screenshot the reference, drag it in, iterate" twelve times an hour. MengBaoLoadImage (萌宝AI·加载图片) exists for that loop: click to upload, drag a file on, or hit Ctrl+V right on the node. It also does something the stock node can't - it can pull from the pack's material library instead of a file, which is the difference between "some image I have" and "my product shot, the one I always use."
What comes out
Two outputs, and they're the two you'd expect: image (IMAGE, batch of one) and mask (MASK). Alpha handling follows the ComfyUI convention - if the source has an alpha channel, it becomes the mask (inverted, 1 - alpha, same as core Load Image), so transparent regions read as 0 and opaque as 1. Transparent PNGs therefore arrive ready for compositing rather than as a black box. When there's no alpha, you get an all-zero mask rather than nothing, so a workflow that always wires the mask doesn't break on a JPEG.
The input is a bit unusual by design: a single image STRING that holds whichever source you picked - a file path, a material reference, a pasted data URL, or raw base64. The UI manages it for you; you never type into it. That's also why the README warns that workflows store the path or material ID, not the pixels. Send a workflow to a friend and they'll get a missing file unless they have that image too.
Details that reward knowing
- It re-reads the file when the file changes. The node's cache key is the file's modification time, so you can overwrite
reference.pngon disk, hit run, and get the new image without clearing the node or restarting. Small thing, saves a lot of clicking. - Uploads land in
ComfyUI/input/mengbao/, not the usual input root. Useful when you're cleaning up directories. - "Clear image" only clears the node's selection. It does not delete the file, and that's deliberate - the README says so because "clear" reads like a delete.
- EXIF orientation is applied. Phone photos that are flagged as rotated load upright instead of sideways. Stock ComfyUI gets this wrong often enough that it's worth noting.
- The legacy node ID is gone. The old
WANGLoadImageUploadPasteis no longer registered when this pack loads. Workflows built on the old standalone loader need the new node re-added and rewired; its decoder survives only as internal code.
Installing it
One of 17 nodes in ComfyUI-MengBaoAI (Corkery520, MIT, Registry id mengbaoai). Manager: search MengBaoAI, mengbaoai or 萌宝AI. CLI: comfy node install mengbaoai. Git path while the Registry release settles:
cd ComfyUI/custom_nodes
git clone https://github.com/Corkery520/ComfyUI-MengBaoAI.git
cd ComfyUI-MengBaoAI
python -m pip install -r requirements.txt
Requirements are numpy, Pillow, requests. Pillow does the decoding here. If you're on a portable Windows build, use its interpreter:
cd ComfyUI\custom_nodes\ComfyUI-MengBaoAI
..\..\..\python_embeded\python.exe -m pip install -r requirements.txt
Restart ComfyUI, then search 加载图片, 粘贴图片, or MengBaoLoadImage. If you previously ran WANG_load_image_nodes, disable it - the README lists it among the plugins that duplicate node IDs and HTTP routes.
Things that bite
- Empty node, run pressed: you get
Please upload an image or select a material first.It's not a crash, but the error arrives at execution time, not when you clicked. - Ctrl+V goes to whatever's hovered or focused. With several upload targets on screen - the node, a material library panel, an output node's placeholder - the paste lands in the focused one. Click the node you actually mean.
- Long screenshots load full-size, uncropped. This node previews the whole original rather than thumbnailing it, which is the right choice for locating coordinates, but it means a 40,000-pixel-tall screenshot is genuinely that big going downstream. Constrain it if you don't need the height.
- The path is not portable. Archiving a workflow without its images is a workflow that won't load on the next machine.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |