Nodes/Neural Atelier/NA - Sketch to Photo Orchestrator
ComfyUI Node

NA - Sketch to Photo Orchestrator

Turn a Flat Garment Sketch Into a Photoreal Product Shot (for a Price)

By valsecchi75·Created 6 months ago·Updated 6 months ago· 0
NA - Sketch to Photo Orchestrator
  • talent_image
  • flat_sketch_image
  • material_image
  • pattern_image
  • template_master_1
  • template_master_2
  • image
  • log
  • flash_request_json
  • nanobana_request_json
prompt_profile01_Sketch_to_Photo
brief_text
gemini_api_key
api_key_statusNot Verified
image_modelNano Banana Pro (gemini-3-pro-image-preview)
aspect_ratio1:1
resolution1K
top_p0.95
rerun_nonce0

This is the node Neural Atelier is named after. NA - Sketch to Photo Orchestrator takes a technical flat sketch - the boring line drawing a patternmaker draws - and turns it into a photorealistic product shot, with a ghost mannequin view, an isometric schematic, or an editorial campaign photo if you prefer. It's aimed squarely at fashion e-commerce and product photography, and it does the whole job with Google's cloud models, not a local checkpoint.

How it works - two-stage, and that's the clever bit. The pipeline is: sketch + brief + reference images → Gemini 3 Flash → one perfect prompt → Nano Banana → final image. ComfyUI runs all the usual local stuff (torch, samplers, VRAM), but the actual generation happens on Google's paid Gemini API. First, Gemini 3 Flash (gemini-3-flash-preview) receives a master prompt from the pack's configs/ folder - each of the 42 profiles is a hand-written "you are a senior fashion tech engineer" system prompt - plus your brief_text and any images you've attached. Flash is forced to reply with a single strict JSON object, {"nano_banana_prompt": "..."}. That generated prompt then goes to the image model, default Nano Banana Pro (gemini-3-pro-image-preview), alongside your images as references, with your chosen aspect_ratio, resolution, and top_p. The image comes back as a normal IMAGE tensor you can save or feed into the rest of your graph.

Nano Banana Pro is worth knowing about even if you never touch this node: it's Google's flagship image model, native 4K output, strong at editing from multiple reference images (the KB doc on closed-source models has the full background). The flip side: it's heavily censored, and every image costs real money - roughly $0.04–$0.24 per image depending on resolution. Recolor and re-run workflows add up fast.

The inputs that matter (it's a lot - start here):

  • prompt_profile - the 42-profile dropdown that sets the whole job (sketch-to-photo, ghost mannequin, exploded view, e-commerce pack…). This is the single most important knob.
  • brief_text - your creative brief. Flash treats it as authoritative for color, material, and fit.
  • gemini_api_key - your Google AI API key. Or set the GEMINI_API_KEY env var and leave it blank.
  • image_model, aspect_ratio, resolution (1K/2K/4K), top_p (default 0.95) - generation settings.
  • rerun_nonce - bump this (or hit the "🔄 Re-run from here" button the pack adds) to force a fresh API call; ComfyUI caches node output, and the node's IS_CHANGED only fires on this value.
  • Optional reference slots: talent_image, flat_sketch_image, material_image, pattern_image, template_master_1, template_master_2.

Outputs: image (wire to Save Image), plus three strings worth keeping around: log (the run summary with timings), and flash_request_json / nanobana_request_json - the exact request payloads sent to Google. If you're debugging why a shot went sideways, those two JSONs are your audit trail.

Install (same for the whole pack): ComfyUI Manager → search "Neural Atelier", or

cd ComfyUI/custom_nodes
git clone https://github.com/valsecchi75/comfyui_neural_atelier
cd comfyui_neural_atelier && pip install -r requirements.txt

then restart ComfyUI. Only deps are google-genai, Pillow, torch, numpy - no model files to download, because the models live on Google's side.

Where people get burned: missing or bad API key is the #1 failure - the node returns a tiny 64×64 black image plus an error in log, which reads as "it broke" rather than "my key is wrong." Run the pack's NA - Verify API Key node (or the Verify button on the node) first. Expect Google's safety filters to reject some prompts outright - fashion is usually fine, but the model is strict about IP and celebrities. And watch your bill: at 4K, a long iteration session is genuinely not free. Start at 1K while you dial in the prompt profile.

CategoryNeural Atelier

Inputs (15)

NameTypeDefaultDescription
prompt_profileCOMBO01_Sketch_to_Photo42 options: 01_Sketch_to_Photo, 02_Ghost_Mannequin, 03_Hanger, 04_Grid_2x2, 05_Grid_3x3, 06_Isometric_Schematic, +36
brief_textSTRING
gemini_api_keySTRING
api_key_statusSTRINGNot Verified
image_modelCOMBONano Banana Pro (gemini-3-pro-image-preview)2 options: Nano Banana Pro (gemini-3-pro-image-preview), Nano Banana 2 (gemini-3.1-flash-image-preview)
aspect_ratioCOMBO1:110 options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, +4
resolutionCOMBO1K3 options: 1K, 2K, 4K
top_pFLOAT0.950–1
rerun_nonceINT00–999999
talent_imageoptIMAGE
flat_sketch_imageoptIMAGE
material_imageoptIMAGE
pattern_imageoptIMAGE
template_master_1optIMAGE
template_master_2optIMAGE

Outputs (4)

NameTypeDescription
imageIMAGE
logSTRING
flash_request_jsonSTRING
nanobana_request_jsonSTRING