萌宝AI·图片反推
It reads the picture and tells you what's swappable
- image
- analysis
- reverse_prompt
The e-commerce problem this node solves is embarrassingly concrete. You have a product image that works - layout, lighting, composition, the little badge in the corner, the price tag, the slogan. You want the same picture with a different product, a different slogan, a different price. You cannot re-prompt your way there from scratch; you'd have to describe everything the original did. So instead you make a machine look at the original and write that description down.
MengBaoImageReverse (萌宝AI·图片反推) is that first step: it sends the image to a vision model and gets back a structured analysis - the composition, plus a list of individually addressable elements with their names, descriptions and the text they carry. Two outputs come back: the analysis structure (a custom MENGBAO_REPLICA_ANALYSIS type that only this pack understands) and a flat reverse_prompt string. The analysis is what you wire onward; the string is there if you want to read or reuse it.
This is not a local interrogator. It's not WD14 tags, not a CLIP caption, and you can't run it without a key. It's a paid vision call - Gemini-family models through the reseller endpoint - which is why the node has a whole caching and fallback apparatus sticking out of it.
The click-first ritual
Wire an IMAGE into image, then press Identify Image in the node's UI. That button submits the reverse node and whatever upstream it needs, and nothing downstream - your generation step doesn't run, and you don't pay for it. Then, when you run the workflow, request_id carries the analysis you already made, and the node pulls it from cache instead of re-billing you.
Run without having clicked the button and it refuses, with Click Analyze Image in the Image Reverse node first. That error is the whole reason request_id exists as an input at all, so don't be tempted to hand-edit it.
Two constraints on the input: it wants exactly one image, not a batch - feeding a batch raises an explicit error - and if the source image changes on disk, the cached analysis is invalidated and you're asked to identify again.
Models and failure behaviour
The vision calls use gem-3.7-flash, with one fallback to gem-3.8-flash. The switching rules are documented and unusually clear, so here they are compressed: it switches on connection failures, timeouts, HTTP 429, HTTP 5xx, and a model that is plainly unavailable. It does not switch on a missing key, 401/403, insufficient balance, bad parameters, a safety refusal, or unparseable JSON - because retrying those just fails twice and bills twice. Each request gets 180 seconds and at most one attempt per model. The UI shows which model actually answered.
Only the global API key is used here. A key typed on the image-generation node does nothing for this node, so if reverse insists the key is empty, go save one in the pack's global key node.
Where it fits
Reverse is stage one of a three-node chain: MengBaoLoadImage → MengBaoImageReverse → MengBaoImageReplicaSettings, whose prompt and replica_settings outputs wire into MengBaoImageAPI's matching inputs. MengBaoReplicaAudit is the optional fourth node that proofreads the result.
Analysis results, source assets and drafts live under ComfyUI/user/mengbaoai/replication/. The workflow stores references to those assets by ID rather than embedding images, so moving the graph to another machine means moving that folder too.
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 release 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; no model files, nothing compiled. Restart ComfyUI, then search 图片反推, Image Reverse, or 图片复刻. Disable the old standalone WANG plugins first if you have them.
Things that bite
- A timeout may still have been billed. The README says it plainly: the primary call can time out after the upstream job has already started, and the fallback can add its own charge. Don't reflexively re-run.
- Reversed text is not trustworthy. Packaging, stylised lettering and small print get misread. The whole point of the settings node is that a human corrects them before any generation happens.
- The analysis isn't a reconstruction. The pack is explicit that it doesn't promise pixel-level fidelity. It's a description of layout and elements, and it goes into a generator as a prompt.
- It's a paid call on someone else's server. Same caveat as any vision node: your product image leaves the machine, so don't use it on client material you can't hand to a third party.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| request_id | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| analysis | MENGBAO_REPLICA_ANALYSIS | — |
| reverse_prompt | STRING | — |