Load Image & Scribble Editor
Draw on the image and let Gemini see it
- Image
- scribble_mask
A mask tells an inpaint model where to change something. This node tells the model what to change - by letting you draw directly on the image before it goes up to Gemini. It's the pack's Load Image + an HTML5 canvas editor in one: pick a file from your input folder, and a built-in editor opens where you can sketch, draw vector arrows, add text, and raster-scribble over the base image.
The output split is the clever part. Instead of flattening your drawing onto the photo, the node returns two separate things:
Image- the untouched base image.scribble_mask- your scribble layer as an RGBA image with a transparent background, so the drawing sits on its own plane.
Wire the first into the base image slot and the second into scribble on the pack's GeminiNanoBananaPro node, and the generator sends them to Google as separate parts - the model sees the photo and the overlay on top, which is exactly how you get controlled edits like "move this object here" or "make this part rounder" without burning your whole generation on a guess.
How it works
Under the hood the canvas in the pack's JS extension turns your drawing into a base64 PNG data URI, which the node decodes into a float RGBA tensor. Two details make it feel like a real editor rather than a one-shot loader: the node hashes the scribble data along with the image file in its change detection, so re-queueing after you draw a new line actually re-runs the generation instead of short-circuiting on an unchanged file; and the scribble layer ships with its alpha channel intact, so blank areas stay transparent and only your marks are visible to the model.
What you actually set
Just the one input: image - a dropdown of files in ComfyUI's input folder, with an upload widget for dropping in new ones. There's an eraser for fixing strokes and a save button so your scribble persists. Everything else is draw-and-queue.
Install
Same pack as the rest of the Nano Banana set:
cd ComfyUI/custom_nodes
git clone https://github.com/PATAGONIABIM/comfyui-NanoBananaPro_3DeLAB.git
cd comfyui-NanoBananaPro_3DeLAB
pip install -r requirements.txt
Restart ComfyUI, or install via ComfyUI Manager by searching comfyui-NanoBananaPro_3DeLAB. No extra dependencies beyond the pack's own (Pillow, numpy - it's just image math and a canvas).
Worth knowing
This node's editor is a nicer way to set up img2img and guided edits than fiddling with external masks, but it's an editing aid, not a mask: for region-gated inpainting (white = edit, black = keep) you still want the pack's Mask Editor flow via Load Image (Passthrough). If your scribble comes out as a solid black box instead of a clean overlay, check that you actually saved the canvas state before queuing - an empty drawing layer produces an empty RGBA tensor, and the model gets no direction at all.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Image | IMAGE | — |
| scribble_mask | IMAGE | — |