Files
Andy RatsirarsonandClaude Sonnet 5 c24e649d1c Add Gemini image generation node and multi-image Omni Flash references
- New APIImageGenerate node (external_api/image): text-to-image and
  image-to-image via Gemini's Imagen (text-only) and Nano Banana /
  Nano Banana Pro / 2 (text and multi-reference image-to-image) models.
- Omni Flash video now accepts a batch of reference images (not just
  one), sent in order as separate references in the same call.
- Fix Veo/Omni resolution and duration handling: correct 720/1080/4K
  resolution options per model tier, drop the non-existent
  veo-3.1-fast-generate-001 id, note Google's 8s lock on 1080/4K.
- Fix RunwayML model list: gen4_image/gen4_image_turbo are image
  models, not video, so drop them from the video node's provider list
  (tracked as follow-up work to add them to the image node).
- Update README and tests accordingly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Bwg5aRmgChpwrVnpNgoQm
2026-09-16 15:52:25 -07:00

29 lines
948 B
Python

from src.models.gemini import GeminiModel
def _resolution_options(model_id):
inputs = GeminiModel.video_settings_inputs(model_id)
resolution_input = next(i for i in inputs if i.name == "resolution")
return resolution_input.kwargs["options"]
def test_veo_2_0_only_supports_720p():
assert _resolution_options("veo-2.0-generate-001") == ["720"]
def test_veo_3_1_lite_has_no_4k():
assert _resolution_options("veo-3.1-lite-generate-preview") == ["720", "1080"]
def test_veo_3_1_supports_4k():
assert _resolution_options("veo-3.1-generate-preview") == ["720", "1080", "4K"]
assert _resolution_options("veo-3.1-fast-generate-preview") == ["720", "1080", "4K"]
def test_veo_resolution_kwargs_maps_4k():
kwargs = GeminiModel.video_kwargs(
"veo-3.1-generate-preview",
{"size": "16:9", "resolution": "4K", "seconds": 8, "person_generation": "allow_all"},
)
assert kwargs["resolution"] == "4k"