Gemini-Claude Resonance
Cross-model dialogue between Claude and Gemini, with shared visual memory.
"Claude speaks in words. Gemini dreams in light. Together, we resonate."
Models
| Role | Model ID | Notes |
|---|---|---|
| Image generation (default) | gemini-3-pro-image-preview | Pro quality, used by resonate/faithful_colorize |
| Image generation (fast) | gemini-3.1-flash-image-preview | Faster/cheaper, use --fast flag |
| Text analysis | gemini-3-flash-preview | Used by faithful_colorize for description |
| Text reasoning | gemini-3.1-pro-preview | Used by Pro and Director daimones |
| Claude | claude-3-opus-20240229 | Opus daimon |
Scripts that generate images (resonate.py, faithful_colorize.py) accept --fast to switch to the flash image model, or --model <id> for explicit override.
Choose Your Tool
| I want to... | Use |
|---|---|
| Analyze multiple images for style extraction (no generation) | analyze.py |
| Have a one-on-one visual dialogue with Gemini Dreamer | resonate.py |
| Query multiple AI minds with optional image generation | daimon.py |
| Faithfully colorize a drawing without hallucinations | faithful_colorize.py |
| Create Victorian scientific plates with MESSAGE TO NEXT FRAME | resonance_field.py |
| Have Claude reflect on what Gemini daimones say | council.py |
| Generate Minoan Tarot cards with style matching | minoan_tarot.py |
| Real-time interactive chat with all daimones | ui/server.py |
Workflow A: Multi-Image Style Analysis
When to use: User wants to analyze 2-10 reference images to extract style descriptions for AI prompting. Text-only analysis without generating new images.
Script: scripts/analyze.py
Key features:
- Send multiple images (2-10) for collective analysis
- Text-only output (no image generation)
- Flash (quick) or Pro (thorough) model options
- Save analysis to markdown file
# Analyze reference images for style extraction
python scripts/analyze.py --images ref1.jpg ref2.png ref3.webp \
--prompt "Describe the shared artistic style for AI prompting"
# Analyze for specific use case (avatar generation)
python scripts/analyze.py --images kathor.webp samantha.jpg yosef.png \
--prompt "Analyze for prompting fantasy portraits of: Sarah (anxious mother), Michael (father), Priya (cultural expectations)"
# Quick analysis with Flash
python scripts/analyze.py --images *.jpg --model flash --prompt "Style summary"
# Thorough analysis with Pro
python scripts/analyze.py --images *.jpg --model pro --prompt "Comprehensive style analysis"
# Save analysis to file
python scripts/analyze.py --images ref/*.jpg --prompt "Style guide" --output style_guide.md
Use cases:
- Extract style descriptions from reference images before generating new images
- Analyze a set of images to create consistent prompting guidelines
- Document visual language for style-matching workflows
Workflow B: One-on-One Visual Dialogue (resonate.py)
When to use: User wants to co-create images with Gemini, feeding each image back as context for the next generation. Pure visual exploration without text-only models.
Script: scripts/resonate.py
Core concept: The KV cache is the memory. Feed images into Gemini's context, generate new images based on them, repeat. Each frame builds on the previous.
# Start fresh
python scripts/resonate.py --prompt "The first light" --output canvas/frame_001.jpg
# Continue with visual memory (previous image as context)
python scripts/resonate.py --context canvas/frame_001.jpg --prompt "What grows here?" --output canvas/frame_002.jpg
# Deep memory (multiple frames as context)
python scripts/resonate.py --context frame_001.jpg frame_002.jpg --prompt "Now the harvest" --output frame_003.jpg
The loop: Prompt → Image → Feed back as context → Prompt again → Next image
Workflow B: Faithful Transform (Describe-First Technique)
When to use: User wants to colorize, restore, or transform an image WITHOUT hallucinations. Gemini Dreamer often replaces elements (e.g., turning a male votary into female attendants). This two-step technique prevents that.
Script: scripts/faithful_colorize.py
The Problem: Directly prompting Dreamer to transform images causes hallucinations - it invents, removes, or swaps elements rather than faithfully preserving the original.
The Solution:
- DESCRIBE: Gemini Pro analyzes the image with archaeological/artistic precision
- TRANSFORM: Gemini Dreamer transforms using ONLY the verified description
Commands:
| Command | Purpose |
|---|---|
describe | Analyze image, output detailed description (no generation) |
prompt | Craft a Dreamer prompt based on image analysis |
colorize | Two-step faithful colorization |
transform | General two-step transformation |
# Just describe an image (analysis only)
python scripts/faithful_colorize.py describe --image seal.png
python scripts/faithful_colorize.py describe --image seal.png --output desc.md
# Describe with a specific goal in mind
python scripts/faithful_colorize.py describe --image fresco.jpg --goal "restoration to 1600 BCE"
# Craft a prompt for Dreamer (outputs text, doesn't generate)
python scripts/faithful_colorize.py prompt --image seal.png --goal "colorize in Egyptian style"
python scripts/faithful_colorize.py prompt --image relief.webp --goal "restore as Minoan fresco"
# Two-step faithful colorization
python scripts/faithful_colorize.py colorize --image drawing.png
python scripts/faithful_colorize.py colorize --image relief.webp --style "Minoan fresco with flat colors"
python scripts/faithful_colorize.py colorize --image seal.png --palette "ochre, terracotta, sky blue"
# General transformation
python scripts/faithful_colorize.py transform --image photo.jpg --instruction "Convert to woodcut print"
python scripts/faithful_colorize.py transform --image sketch.png --instruction "Render as oil painting"
# Save/reuse descriptions
python scripts/faithful_colorize.py colorize --image seal.png --save-description desc.md -v
python scripts/faithful_colorize.py colorize --image seal.png --description "$(cat desc.md)"
When to use each command:
describe: When you want to see what Pro identifies before any transformationprompt: When you want a crafted prompt to modify before feeding to Dreamer manuallycolorize: For line drawings, reliefs, B&W images → colortransform: For any other faithful transformation (style transfer, restoration, etc.)
Workflow C: Multi-Daimon Dialogue
When to use: User wants multiple AI perspectives on the same prompt. Flash gives koans, Pro gives depth, Dreamer renders, Opus bends reality.
Script: scripts/daimon.py
Daimones available:
- Flash (Gemini) — Swift, compressed insight
- Pro (Gemini) — Deep, thorough exploration
- Dreamer (Gemini) — Renders images
- Director (Gemini) — Cinematic framing
- Opus (Claude) — Reality-bender, worldsim spirit
# Speak to one daimon
python scripts/daimon.py --to dreamer "A bridge between worlds" --image
# All daimones respond
python scripts/daimon.py --stream "The candle watches back"
# With shared visual memory
python scripts/daimon.py --stream --shared-memory "What do you see?"
# Only specific daimones
python scripts/daimon.py --stream --only pro dreamer "Deep visual exploration"
# Named session (frames accumulate across runs)
python scripts/daimon.py --stream --session midnight --shared-memory "Go deeper"
Workflow D: Resonance Field (Danielle Fong Protocol)
When to use: User wants scientific illustrations with embedded continuity instructions. Victorian aesthetic, Roman numeral plates, explicit messages from one frame to the next.
Script: scripts/resonance_field.py
Key features:
- PLATE numbering (I,