Skip to content

feat: add seed support for image, video, and music generation#101

Draft
caffeinum wants to merge 3 commits intomainfrom
feat/support-imagen-seed-for-all-providers
Draft

feat: add seed support for image, video, and music generation#101
caffeinum wants to merge 3 commits intomainfrom
feat/support-imagen-seed-for-all-providers

Conversation

@caffeinum
Copy link
Copy Markdown
Contributor

Summary

Adds seed prop support across all media generation to enable reproducible results.

  • Add seed?: number to React components (<Image seed={...}>, <Video seed={...}>, <Music seed={...}>)
  • Update renderers to pass seed to generate functions
  • Extend MusicModelV3CallOptions to include seed parameter

Provider Support

Provider Image Video Music
FAL ✅ Already supported ✅ LTX-2 + WAN models N/A
Google ⚠️ Warning (unsupported) ✅ Veo models N/A
Together ✅ Already supported N/A N/A
Higgsfield ✅ Now supported N/A N/A
OpenAI N/A ⚠️ Warning (Sora unsupported) N/A
ElevenLabs N/A N/A ⚠️ Warning (unsupported)

Usage

// React components
<Image 
  prompt="a sunset over mountains" 
  model={fal.imageModel("flux-schnell")}
  seed={42}
/>

<Video 
  prompt={{ text: "ocean waves", images: [img] }}
  model={fal.videoModel("wan-2.5")}
  seed={12345}
/>

// AI SDK
const { video } = await generateVideo({
  model: fal.videoModel("ltx-2-19b-distilled"),
  prompt: "cyberpunk city",
  seed: 42,
});

Files Changed

  • src/react/types.ts - Add seed to ImageProps, VideoProps, MusicProps
  • src/react/renderers/image.ts - Pass seed to generateImage
  • src/react/renderers/video.ts - Pass seed to generateVideo
  • src/react/renderers/music.ts - Pass seed to generateMusic
  • src/ai-sdk/music-model.ts - Add seed to MusicModelV3CallOptions
  • src/ai-sdk/generate-music.ts - Pass seed through to model
  • src/ai-sdk/providers/fal.ts - Extend video seed support to WAN models
  • src/ai-sdk/providers/higgsfield.ts - Add seed support for Soul images
  • src/ai-sdk/providers/elevenlabs.ts - Add warning for unsupported seed

- Add seed prop to React components (ImageProps, VideoProps, MusicProps)
- Update renderers to pass seed to generate functions
- Add seed to MusicModelV3CallOptions and generateMusic
- FAL: extend seed support to WAN models in addition to LTX-2
- Higgsfield: pass seed to API for image generation
- ElevenLabs: add warning that seed is unsupported for music
- Google video model already supports seed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 31, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/support-imagen-seed-for-all-providers

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant