NBP Gemini Composite
Labeled reference groups so one image doesn't hijack the shot
- product_image_1
- product_image_2
- product_image_3
- product_image_4
- character_image_1
- character_image_2
- character_image_3
- character_image_4
- reference_image_1
- reference_image_2
- reference_image_3
- reference_image_4
- reference_image_5
- reference_image_6
- IMAGE
- STRING
This is the sibling node to NBP Gemini Image 2, and the one you'll reach for when your references have jobs. A product shot from four angles, a person in a specific outfit, a backdrop you want the mood from - if you throw all of those at a plain image-generation call, the strongest input tends to run the show. The Composite node exists to stop that. It labels each reference with a role before the model ever sees it, so a character stays a character and a product angle stays a product angle.
What it actually is
Same API-node machinery as the Image 2 node - same Gemini models, same Comfy-account auth, same prepaid credits - with one structural difference. Instead of a single images input you get fixed, named slots in three groups:
- product_image_1–4 - the subject from different angles
- character_image_1–4 - the person and/or outfit to feature
- reference_image_1–6 - style, mood, environment, anything else
Wire only the slots you actually have; empty ones are skipped cleanly. That's the whole point - you're describing the composition's roles, not just dumping images at the model.
How the role-labeling works
The source is refreshingly simple about it. The node builds the API message with explicit text markers between groups - --- Product Images ---, then product angle 1, the image, product angle 2, the image, and so on - so Gemini is told what each picture is for instead of guessing. The default system_prompt leans on the same discipline: use all references faithfully, maintain product accuracy and character likeness, pull the mood and environment from the additional refs. Every reference goes up inline as a base64 PNG (first frame of each tensor), then the request hits the same /proxy/vertexai/gemini/<model> endpoint with the same generation config as the Image 2 node.
The inputs that matter
- prompt - ships with a sensible default that composes character + outfit + product, using the extra refs for background and lighting. Rewrite it for your actual shot; it's just instructions.
- model - same dropdown as the rest of the pack:
gemini-3-pro-image-preview(Pro, best quality and cost),gemini-3.1-flash-image-preview(Nano Banana 2), and the older 2.5 preview/stable pair. - seed, aspect_ratio, resolution - defaults are 42, 1:1, 1K. Note this node defaults to 1:1, not
auto; switch toautoif you want it to match an input. - temperature / top_p / top_k / response_modalities - shared with Image 2; leave them alone unless you're debugging.
- system_prompt - advanced, but the default is genuinely good at enforcing the role discipline.
Outputs are IMAGE (the generated image) and STRING (the model's reasoning, populated only in IMAGE+TEXT mode).
Installing it
Same pack, same trivial install. No extra Python dependencies - it runs on comfy_api_nodes, which ships with ComfyUI.
cd ComfyUI/custom_nodes
git clone https://github.com/SorenWeile/nbpOpenNode-ComfyUI
…or search nbpOpenNode-ComfyUI in ComfyUI Manager, then restart. The node lands under api node → image → Gemini.
Honest takes
- "Product accuracy" is best-effort, not pixel-perfect. Nano Banana Pro composes references impressively, but reviewers keep calling it "unimaginative" - it faithfully assembles what you hand it rather than inventing genius lighting. For e-commerce and character shots that's usually a solid first pass; plan to push the result through your local stack (upscaler, face detailer) after.
- It costs the same as any closed-model call. Metered, prepaid, per-image. 4K on the Pro model is the pricier tier, and it's easy to burn a session's worth of credits iterating on a composition.
- One image per slot, effectively. Each slot sends its first frame; feed single images rather than batches if you want predictable behavior.
- Google's filter applies. These are Google's models behind your Comfy credentials; refusals happen, and there's no local override.
If you've ever fought the "donor image dominates" problem in identity or product compositing, this is the rare node that names the problem in its input layout. Same ecosystem trust caveat as its sibling - the pack is new and the author has no footprint yet - but the mechanism is clean and honest about what it does.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Take the character you are provided with and add the given outfit to it. Then add the product to the character. Use the additional reference images for the background and lighting. | Describe the scene, composition, or edits to apply. |
| model | COMBO | gemini-3-pro-image-preview | Gemini image model to use. |
| seed | INT | 420–2147483647 | Best-effort reproducibility seed. |
| aspect_ratio | COMBO | 1:1 | Output aspect ratio. |
| resolution | COMBO | 1K | Output resolution. 2K/4K uses the Gemini native upscaler. |
| temperature | FLOAT | 1.000–2 | Randomness. Lower = more predictable, higher = more creative. |
| top_p | FLOAT | 0.950–1 | Nucleus sampling threshold. |
| top_k | INT | 401–100 | Token pool size limit per step. |
| response_modalities | COMBO | IMAGE | 'IMAGE+TEXT' returns the model's reasoning alongside the image. |
| product_image_1opt | IMAGE | Product angle 1. | |
| product_image_2opt | IMAGE | Product angle 2. | |
| product_image_3opt | IMAGE | Product angle 3. | |
| product_image_4opt | IMAGE | Product angle 4. | |
| character_image_1opt | IMAGE | Character or outfit reference 1. | |
| character_image_2opt | IMAGE | Character or outfit reference 2. | |
| character_image_3opt | IMAGE | Character or outfit reference 3. | |
| character_image_4opt | IMAGE | Character or outfit reference 4. | |
| reference_image_1opt | IMAGE | Additional reference 1 (style, mood, environment, etc.). | |
| reference_image_2opt | IMAGE | Additional reference 2. | |
| reference_image_3opt | IMAGE | Additional reference 3. | |
| reference_image_4opt | IMAGE | Additional reference 4. | |
| reference_image_5opt | IMAGE | Additional reference 5. | |
| reference_image_6opt | IMAGE | Additional reference 6. | |
| system_promptopt | STRING | You are an expert image-generation engine. You must ALWAYS produce an image. You will receive structured reference images grouped by role: - Product images show the subject from different angles. - Character/outfit images show the person and clothing to feature. - Additional reference images provide style, mood, environment, or other context. Use ALL provided references faithfully. Maintain product accuracy, character likeness, and outfit details. Apply mood and environment from additional references. Prioritize generating the visual representation above any text or conversational requests. | System-level instructions shaping the model's behavior. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | Generated image. |
| STRING | STRING | Any text the model returned alongside the image. |