Switch to Nano Banana 2 Lite images and Gemini Omni Flash GIFs#67
Merged
Conversation
… Flash Replace OpenAI gpt-image-2 with gemini-3.1-flash-lite-image for all static image generation. Replace the sprite-sheet GIF approach with Gemini Omni Flash (gemini-omni-flash-preview) video generation, ffmpeg frame extraction, and per-frame magenta chroma keying into animated GIFs. Co-authored-by: Anshu Chimala <achimala@gmail.com>
The project previously used GOOGLE_API_KEY for Nano Banana Pro before it was removed in the Modernize model providers commit. Co-authored-by: Anshu Chimala <achimala@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gemini-3.1-flash-lite-image) via the Gemini Interactions API instead of OpenAIgpt-image-2.gemini-omni-flash-preview) to generate a short video, then sample frames with ffmpeg, chroma-key each frame against magenta, and encode to GIF — replacing the old N×N sprite sheet approach.GeminiClient,GEMINI_API_KEYconfig, and wires it through/img,/gif,/gifemoji,/emoji, scrapbook, image-of-day, and the agentgenerate_imagetool.Changes
src/gemini/client.ts— image + video generation via Interactions API, with polling for video completionsrc/utils/image-processing.ts—processVideoToGif()replacesprocessGifEmojiGrid(); updatedbuildGifPrompt()for video instead of grid layoutOpenAIClient(chat/embeddings unchanged)Setup
Add to your environment:
Requires
ffmpeg/ffprobeon the host for GIF frame extraction (already present in the deployment environment).Testing
pnpm buildpnpm lintpnpm test run