ComfyUI Node

萌宝AI·素材库

A real asset library that hands pixels to the graph

By Corkery520·Created 3 days ago·Updated 3 days ago· 0
萌宝AI·素材库
    • image
    • mask
    material_id

    Anyone doing recurring commercial work in ComfyUI hits the same wall: the input folder becomes a landfill of product_final_v3_USE_THIS.png, and you spend more time hunting for the right reference image than generating. MengBaoMaterialLibrary (萌宝AI·素材库) is the pack's answer - a categorised, searchable, favouritable library of images that lives in your ComfyUI user directory and outputs the selected asset as a normal IMAGE plus MASK, ready to wire into anything.

    It is functionally the same node as MengBaoLoadImage from the consumer side: one material_id input, image and mask outputs. The difference is where the pixels come from. Load Image is "this file"; Material Library is "the thing I saved, with a name and a category."

    Managing the library

    The library lives in the pack's shared floating toolbar along with the prompt library and generation history - one draggable panel, switched between three tabs. Inside, you import in batches (up to 20 files at a time), and the accepted formats and limits are documented: PNG, JPEG, WebP and BMP, up to 32 MB per file and up to 100 megapixels. You can search by name, filter by category, mark favourites, rename, move between categories, and delete.

    The default categories are 角色 / 产品 / 参考 / 背景 / 字体 / 白底 / 未分类 - character, product, reference, background, font, white-background, uncategorised. You can add your own. One rule worth remembering: deleting a category doesn't delete images, it drops them back to uncategorised. That's the correct default and it's easy to forget mid-cleanup.

    Storage shape: originals, thumbnails and an index live under ComfyUI/user/mengbaoai/materials/, and are kept separate from the pack's generation history and from any other tool's asset store. The README notes the library deliberately doesn't read or write the "AI drawing board" project's materials, so nothing here can corrupt work from another plugin.

    Using it in a graph

    Drag the node in, open the picker from the node itself, choose a material, run. The mask output behaves exactly like Load Image's: alpha becomes the mask, zeros when the source is opaque. That makes it a drop-in for anything downstream that expects a pair - inpainting, compositing, or a "swap the product" pipeline alongside the pack's replica nodes.

    material_id is a stable string, and that's what the workflow stores - not the image. So a shared workflow plus the materials/ directory will reproduce; the workflow on its own won't. Back up ComfyUI/user/mengbaoai/ if you'd cry about losing the library.

    Installing it

    ComfyUI-MengBaoAI, 17 nodes, Corkery520, MIT, Registry id mengbaoai. Manager search: MengBaoAI, mengbaoai, 萌宝AI. CLI: comfy node install mengbaoai. Git while the Registry listing is pending:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Corkery520/ComfyUI-MengBaoAI.git
    cd ComfyUI-MengBaoAI
    python -m pip install -r requirements.txt
    

    Three dependencies - numpy, Pillow, requests. The library's HTTP routes are part of the pack's backend, so restart ComfyUI after installing or the panel will render with nothing behind it. After any update, press Ctrl+F5 to refresh the front-end scripts, which the pack's own docs treat as a normal step rather than a troubleshooting one. In the canvas search box, 素材库, Material Library, or MengBaoMaterialLibrary will find it.

    Since this node's data is user-directory state, a fresh install on a second machine starts empty - no migration tool beyond copying the folder.

    Things that bite

    • The node raises Please select a material first. if material_id is blank. Expected, but it surfaces at run time.
    • Deleting from the library doesn't reach into existing workflows. A workflow holding a deleted ID errors on run; the node caches on the file's modification time.
    • Feature creep is real. This is an asset manager inside a node graph, and it's easy to end up with a 400-item library and no naming discipline. Categories plus a search habit solve it, but the panel will hold whatever you feed it.
    • The mask is your alpha, not an AI cutout. If the source has a background, mask is empty. Pair it with a background removal node first for cutout-style masking.
    Category萌宝AI/图像处理

    Inputs (1)

    NameTypeDefaultDescription
    material_idSTRING

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    maskMASK