Gemini Style Transfer
Gemini Style Transfer
- image
- image
- cost_info
- cache_key
Most "style transfer" you've seen in ComfyUI is local: a texture warp or a ControlNet pass that layers a look onto pixels. Gemini Style Transfer does something different - it hands your image to Gemini's image model along with the visual DNA of a real master photographer, and the model reinterprets the photo in that photographer's language. Give it a snapshot and Alec Soth's Sleeping by the Mississippi, and you get the same scene shot the way Soth would have shot it: the color, the grain, the distance, the melancholy.
The style library is the selling point. The pack ships 77 photographer/variant presets in its data/styles/ directory, and multi-variant photographers show up as "Photographer / Variant" - Alec Soth has Sleeping by the Mississippi, Niagara, Songbook, and Broken Manual; Alex Webb has Haiti, Mexico, Cuba, and Istanbul; Boris Savelev has Secret City, Kodachrome Darkness, Pigment on Gesso, and Geometric Shadow. These aren't random tags; each one is a hand-written style DNA prompt describing that body of work's color, light, composition, and grain.
How it works
At import time the node loads every style module from data/styles/, builds the dropdown, and maps each entry to its DNA prompt. When you run it, the source image goes in as reference along with the style DNA and your chosen intensity, and Gemini regenerates the image. intensity maps to how aggressively the style is applied - subtle is a whisper of the style, moderate clear but gentle, full an authentic transformation, extreme pushes abstract/painterly. The cache_key it emits folds in style, intensity, model, seed, aspect ratio, resolution, and any direction you gave it, so it plays nice with the API Optimizer's Hash Vault.
The inputs that matter
image(required) - the source photo you're transforming.style- the 77-preset dropdown, the whole point of the node.intensity- subtle / moderate / full / extreme. Start atfulland back off if the model is fighting your subject.direction(optional) - creative guidance on top of the style: "focus on the red umbrella as the accent," "make it a snowy scene," "emphasize the reflection in the window." Leave it empty for pure style interpretation.model- the same three image tiers as the pack's generator, same pricing story: Pro ~$0.13–0.24, 3.1 Flash ~$0.05–0.15, 2.5 Flash ~$0.04 at 1K only.aspect_ratio- defaults toauto, which preserves your source's proportions; pick an explicit ratio if you want a crop.seed- sent to the API, so this side of the pack is actually reproducible.
Outputs
image (IMAGE) is your restyled photo - save or preview it like any other image. cost_info (STRING) shows the estimated USD and elapsed time, and cache_key (STRING) feeds the caching workflow.
Installing it and gotchas
Same pack as everything else in this suite - Manager search "ComfyUI-Gemini-Direct", or:
cd ComfyUI/custom_nodes/
git clone https://github.com/jeremieLouvaert/ComfyUI-Gemini-Direct.git
pip install -r ComfyUI-Gemini-Direct/requirements.txt
Restart, set your key (gemini_api_key.txt, GEMINI_API_KEY, or the api_key input), make sure billing is on. The styles ship inside the repo, so a full clone gets them - if the dropdown ever reads "(no styles loaded)", the data/styles/ folder didn't come along.
The honest caveats: this is a regeneration, not a filter, so the model can drift from your subject when the style is aggressive - that's what intensity is for. And it costs like a full image generation per run, not pennies. The whole pack leans heavily documentary/editorial, so if your taste runs to clean commercial gloss, several of these presets will fight you.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Source image to transform into the selected style. | |
| style | COMBO | Alec Soth / Sleeping by the Mississippi | Master photographer style and variant. Multi-variant styles show as 'Photographer / Variant'. |
| intensity | COMBO | full | How aggressively to apply the style. subtle = whisper of style, moderate = clear but gentle, full = authentic transformation, extreme = abstract/painterly. |
| model | COMBO | gemini-3-pro-image-preview | Pro = best quality ($0.13-0.24) | 3.1 Flash = balanced ($0.05-0.15) | 2.5 Flash = cheapest ($0.04, 1K only) |
| seed | INT | 00–18446744073709550000 | Seed for reproducibility |
| aspect_ratio | COMBO | auto | Output aspect ratio. 'auto' preserves source proportions. |
| resolution | COMBO | 2K | Output resolution. |
| directionopt | STRING | Optional creative direction to guide the transformation. Examples: 'focus on the red umbrella as the accent', 'make it a snowy scene', 'emphasize the reflection in the window'. Leave empty for pure style interpretation. | |
| api_keyopt | STRING | — | |
| timeout_secopt | INT | 12010–600 | HTTP timeout (seconds) for the Gemini API call. Default 120s. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| cost_info | STRING | — |
| cache_key | STRING | — |