Skip to content

Commit 651e2b6

Browse files
committed
[Partner Nodes] feat(Google-Omni): add support for Omni 1.1 model
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
1 parent 7773972 commit 651e2b6

2 files changed

Lines changed: 318 additions & 2 deletions

File tree

comfy_api_nodes/apis/gemini.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,32 @@ class GeminiInteractionMediaPart(BaseModel):
256256
mime_type: str | None = Field(None)
257257

258258

259+
class GeminiInteractionVideoConfig(BaseModel):
260+
task: str | None = Field(
261+
None, description="One of: text_to_video, image_to_video, reference_to_video, edit, extend."
262+
)
263+
264+
259265
class GeminiInteractionGenerationConfig(BaseModel):
260266
temperature: float | None = Field(None, ge=0.0, le=2.0)
261267
top_p: float | None = Field(None, ge=0.0, le=1.0)
268+
video_config: GeminiInteractionVideoConfig | None = Field(None)
269+
270+
271+
class GeminiInteractionResponseFormat(BaseModel):
272+
type: Literal["video"] = "video"
273+
resolution: str | None = Field(None, description="One of: 360p, 720p, 1080p, 4k.")
274+
aspect_ratio: str | None = Field(None, description="One of: 16:9, 9:16.")
275+
delivery: str | None = Field(
276+
None, description="Set to 'uri' to receive a Files API URI instead of inline base64 data."
277+
)
262278

263279

264280
class GeminiInteractionRequest(BaseModel):
265281
model: str = Field(...)
266282
input: list[GeminiInteractionTextPart | GeminiInteractionMediaPart] = Field(...)
267283
generation_config: GeminiInteractionGenerationConfig | None = Field(None)
284+
response_format: GeminiInteractionResponseFormat | None = Field(None)
268285

269286

270287
class GeminiInteractionModalityTokens(BaseModel):
@@ -299,3 +316,9 @@ class GeminiInteraction(BaseModel):
299316
)
300317
steps: list[GeminiInteractionStep] | None = Field(None)
301318
usage: GeminiInteractionUsage | None = Field(None)
319+
320+
321+
class GeminiFile(BaseModel):
322+
name: str | None = Field(None, description="Resource name of the file, in the form 'files/<id>'.")
323+
uri: str | None = Field(None)
324+
state: str | None = Field(None, description="One of: PROCESSING, ACTIVE, FAILED.")

0 commit comments

Comments
 (0)