ComfyUI Node

萌宝AI·电商设置

One form that writes the prompt for an 8-image product set

By Corkery520·Created 3 days ago·Updated 3 days ago· 0
萌宝AI·电商设置
    • user_prompt
    • aspect_ratio
    • quantity
    • settings_json
    product_name
    copy_information
    special_requirements
    product_size
    language中文
    quantity8
    aspect_ratio9:16
    usage详情页
    page_content中等
    font_style自动判断
    reverse_pages自动判断
    model_setting自动判断
    model_appearance_count自动判断

    Generating a product page isn't one prompt, it's a brief: who the customer is, what the copy says, how many images, what ratio, whether a model appears, how the type should look, whether to slip in a few "reverse" back-of-pack shots. Type that as prose every time and you'll drift - image three will have a model in it when you didn't want one, and half the set will invent a certification badge that doesn't exist.

    MengBaoEcommerceSettings (萌宝AI·电商设置) is a form that compiles to a prompt. Fill in the fields once, and it emits a structured instruction set plus machine-readable settings for the rest of the graph to consume. It's the least glamorous node in the pack and arguably the most useful for anyone producing listing images weekly.

    What you fill in

    Four free-text fields - product_name, copy_information, special_requirements, product_size - plus seven dropdowns: language (Chinese, English, German, French, Japanese, Korean, Portuguese), quantity (1–25), aspect_ratio (1:1 through 9:16), usage (main image, main + detail, detail page, poster, seeding image, other), page_content (concise / medium / rich), font_style (twelve options from minimal sans-serif to vintage art), and reverse_pages and model_setting / model_appearance_count.

    The compiler does real work with the last three, and the rules are visible in the source:

    • Reverse pages (the back-of-pack / lifestyle shots) are only allowed when usage includes 详情页 - detail page. Otherwise you get zero regardless of what you asked for. The ceiling is min(3, quantity // 4), so a 4-image set can't have one and a 16-image set caps at three. On auto, it recommends zero under five images, one under ten, two under sixteen, three above that.
    • Model appearance clamps to the quantity and is nulled entirely when model_setting is "no model".
    • page_content carries an explicit density directive - concise means one hero subject per image, rich allows two to four support groups but forbids inventing data to fill space.

    The anti-hallucination clause

    This is the bit worth stealing even if you don't install the pack. When a field is blank, the generated prompt says so and forbids the model from filling the gap: missing copy becomes "only use verifiable product facts, do not write unverified claims or specs", missing size becomes "do not infer real product dimensions from photo pixels or whitespace", and it ends with a line stating that all selling points, parameters, certifications, test data, materials, sales volume and usage effects must come from user-supplied information or verifiable fact.

    Anyone who has shipped a listing image with an invented "clinically proven" badge will understand why each of those clauses exists.

    Inputs and outputs

    Everything is a widget; nothing to wire in. Four outputs:

    • user_prompt - the compiled STRING, the one you route into MengBaoImageAPI's prompt
    • aspect_ratio - a STRING echoing the selection (9:16 and friends)
    • quantity - an INT, wire it straight into batch_size on the generation node
    • settings_json - the resolved settings as indented JSON, including the internally computed reverse_page_mode, reverse_page_count and model_appearance_count

    user_promptprompt and quantitybatch_size is the honest wiring, and it's type-clean. The generation node's own enum widgets (aspect ratio, resolution, quality) still control the actual output geometry - the aspect_ratio output is there for logging or for nodes that take a string, not for magically setting the model. Set the ratio on the generator to match.

    Installing it

    Part of ComfyUI-MengBaoAI (Corkery520, 17 nodes, 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
    

    numpy, Pillow, requests - this node is pure Python string assembly, so the install cost is the pack's, not this node's. Restart ComfyUI, then search 电商设置, MengBaoEcommerceSettings, or 萌宝. Note the field labels are Chinese-first and follow ComfyUI's locale setting; the values stay Chinese in the compiled prompt (the output language directive handles what language appears in the images).

    Things that bite

    • It generates a brief, not images. Nothing here calls an API. Pair it with a generation node - and one that can actually honour "8 consistent images", which means a cloud model or a very disciplined local workflow with a fixed seed and reference image.
    • quantity of 25 is a big bill. It's an INT wired to batch_size, and batch_size is a loop of single billable API calls. Start at three.
    • Consistency is still on you. The prompt demands stable product appearance, structure and packaging text across the set. The generator does its best; check the results, and use the replica chain if you need a specific product to survive across pages.
    • The blank-field clauses are protective, not magic. The model still occasionally invents. If a claim is legally sensitive, put it in special_requirements and verify the output before publishing.
    Category萌宝AI/电商

    Inputs (13)

    NameTypeDefaultDescription
    product_nameSTRING
    copy_informationSTRING
    special_requirementsSTRING
    product_sizeSTRING
    languageCOMBO中文7 options: 中文, 英语, 德语, 法语, 日语, 韩语, +1
    quantityINT81–25
    aspect_ratioCOMBO9:167 options: 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, +1
    usageCOMBO详情页6 options: 主图, 主图+详情页, 详情页, 海报, 种草图, 其它
    page_contentCOMBO中等3 options: 精简, 中等, 丰富
    font_styleCOMBO自动判断12 options: 自动判断, 现代极简无衬线字体, 人文温柔无衬线字体, 高级时尚衬线字体, 东方雅致宋体字体, 新中式书法展示字体, +6
    reverse_pagesCOMBO自动判断5 options: 自动判断, 不插入, 插入1张, 插入2张, 插入3张
    model_settingCOMBO自动判断4 options: 自动判断, 不使用模特, 女性模特, 男性模特
    model_appearance_countCOMBO自动判断26 options: 自动判断, 1, 2, 3, 4, 5, +20

    Outputs (4)

    NameTypeDescription
    user_promptSTRING
    aspect_ratioSTRING
    quantityINT
    settings_jsonSTRING