Gemini Omni Flash ( gemini-omni-flash-preview ) یک مدل چندوجهی با کارایی بالا است که برای تولید، ویرایش و کنترل سینمایی ویدئو با سرعت بالا طراحی شده است. Gemini Omni بر اساس قابلیتهای اصلی زیر ساخته شده است که آن را از مدلهای ویدئویی قبلی متمایز میکند:
- چندوجهی بودن بومی: متن، تصویر، صدا و ویدیو را همزمان پردازش میکند و خروجی منسجمتر، سازگارتر و قابل کنترلتری به شما میدهد.
- ویرایش محاورهای: این قابلیت که توسط Interactions API فعال میشود، به شما امکان میدهد ویدیوهای خود را از طریق مکالمه زبان طبیعی به صورت مکرر اصلاح و ویرایش کنید. آنچه را که میخواهید تغییر دهید شرح دهید و مدل، ویرایش را اعمال میکند و در عین حال بخشهایی از ویدیو را که میخواهید نگه دارید، حفظ میکند.
- دانش جهانی: Gemini Omni درک فیزیک را با دانش Gemini از تاریخ، علم و زمینه فرهنگی ترکیب میکند و شکاف بین فوتورئالیسم و داستانسرایی معنادار را پر میکند.
تولید متن به ویدیو
از یک متن کوتاه، یک ویدیو بسازید. مدل بر اساس توضیحات متنی شما، ویدیویی با صدا تولید میکند. برای بهترین نتیجه، متنهای کوتاه را با جزئیاتی مانند شرح صحنه، حرکت دوربین، نورپردازی و حس و حال بنویسید.
پایتون
import base64
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-omni-flash-preview",
input="A marble rolling fast on a chain reaction style track, continuous smooth shot."
)
with open("marble.mp4", "wb") as f:
f.write(base64.b64decode(interaction.output_video.data))
جاوا اسکریپت
import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});
const interaction = await ai.interactions.create({
model: 'gemini-omni-flash-preview',
input: 'A marble rolling fast on a chain reaction style track, continuous smooth shot.',
});
if (interaction.output_video?.data) {
fs.writeFileSync('marble.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}
استراحت
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"input": "A marble rolling fast on a chain reaction style track, continuous smooth shot."
}'
طرحواره پاسخ REST
فیلد interaction.output_video فقط برای SDK قابل استفاده است. هنگام استفاده مستقیم از REST API، خروجی ویدیو را از آرایه steps دریافت کنید.
ساختار خام REST JSON:
{
"steps": [
{ "type": "user_input", "content": [{"type": "text", "text": "..."}] },
{ "type": "thought", "content": [{"text": "...", "type": "thought"}] },
{
"type": "model_output",
"content": [
{
"type": "video",
"mime_type": "video/mp4",
"data": "AAAAIGZ0eXBpc29t..." // Base64 encoded video data
}
]
}
],
"id": "v1_...",
"status": "completed",
"model": "gemini-omni-flash-preview",
"object": "interaction"
}
نسبت ابعاد کنترل
برای ایجاد ویدیوهای عمودی، aspect_ratio ) را روی "9:16" تنظیم کنید. نسبت تصویر پیشفرض افقی (16:9) است.
پایتون
import base64
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-omni-flash-preview",
input="A futuristic city with neon lights and flying cars, cyberpunk style",
response_format={
"type": "video", # optional
"aspect_ratio": "9:16" # Supported values: "9:16", "16:9"
}
)
with open("example.mp4", "wb") as f:
f.write(base64.b64decode(interaction.output_video.data))
جاوا اسکریپت
import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});
const interaction = await ai.interactions.create({
model: 'gemini-omni-flash-preview',
input: 'A futuristic city with neon lights and flying cars, cyberpunk style',
response_format: {
type: 'video', // optional
aspect_ratio: '9:16' // Supported values: '9:16', '16:9'
},
});
if (interaction.output_video?.data) {
fs.writeFileSync('example.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}
استراحت
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"input": "A futuristic city with neon lights and flying cars, cyberpunk style",
"response_format": {
"type": "video",
"aspect_ratio": "9:16"
}
}'
تولید تصویر به ویدیو
شما میتوانید یک تصویر مرجع به همراه متن خود ارائه دهید. بسته به متن شما، مدل تصمیم میگیرد که چگونه از تصویر استفاده کند. این برای زنده کردن عکسهای محصول، تصاویر یا عکسها مفید است.
مثال زیر نحوه استفاده از تصویر مرجع نقاشی یک ماهی که از آب بیرون میپرد را نشان میدهد:

با دستور زیر:
turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video
برای تولید یک ویدیوی واقعگرایانه از نقاشی.
پایتون
import base64
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-omni-flash-preview",
input=[
{"type": "image", "data": base64_image, "mime_type": "image/jpeg"},
{"type": "text", "text": "turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video"}
],
)
with open("clownfish.mp4", "wb") as f:
f.write(base64.b64decode(interaction.output_video.data))
جاوا اسکریپت
import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});
const interaction = await ai.interactions.create({
model: 'gemini-omni-flash-preview',
input: [
{ type: 'image', data: base64Image, mime_type: 'image/jpeg' },
{ type: 'text', text: 'turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video' }
]
});
if (interaction.output_video?.data) {
fs.writeFileSync('clownfish.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}
استراحت
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"input": [
{"type": "image", "data": "'"$BASE64_IMAGE"'", "mime_type": "image/jpeg"},
{"type": "text", "text": "turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video"}
]
}'
مرجع موضوعی
شما میتوانید ویدیویی تولید کنید که شامل موضوعات خاصی باشد که به عنوان تصاویر مرجع ارائه شدهاند. برای مثال، کد زیر نحوه ارائه ۲ تصویر از یک گربه و نخ را برای تولید ویدیویی از گربه در حال بازی با نخ نشان میدهد.
پایتون
import base64
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-omni-flash-preview",
input=[
{"type": "image", "data": cat_b64, "mime_type": "image/png"},
{"type": "image", "data": yarn_b64, "mime_type": "image/png"},
{"type": "text", "text": "A cat playfully batting at a ball of yarn."}
],
)
with open("cat.mp4", "wb") as f:
f.write(base64.b64decode(interaction.output_video.data))
جاوا اسکریپت
import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});
const interaction = await ai.interactions.create({
model: 'gemini-omni-flash-preview',
input: [
{ type: 'image', data: catData, mime_type: 'image/png' },
{ type: 'image', data: yarnData, mime_type: 'image/png' },
{ type: 'text', text: 'A cat playfully batting at a ball of yarn.' }
]
});
if (interaction.output_video?.data) {
fs.writeFileSync('cat.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}
استراحت
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"input": [
{"type": "image", "data": "'"$CAT_B64"'", "mime_type": "image/png"},
{"type": "image", "data": "'"$YARN_B64"'", "mime_type": "image/png"},
{"type": "text", "text": "A cat playfully batting at a ball of yarn."}
]
}'
پارامتر وظایف
از پارامتر task در video-config برای نشان دادن واضح رفتار مورد نظر استفاده کنید، برای مثال اگر میخواهید مدل از یک تصویر، ویدیویی تولید کند، میتوانید پارامتر را روی image_to_video تنظیم کنید. اگر این مقدار تنظیم نشده باشد، مدل از طریق prompt، آنچه را که میخواهید، استنباط خواهد کرد.
مقادیر مجاز زیر هستند:
-
text_to_video -
image_to_video -
reference_to_video -
edit
مثال زیر نحوه تنظیم این مورد را برای تصویر نشان داده شده قبلی به عنوان مثال ویدیو نشان میدهد.
پایتون
import base64
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-omni-flash-preview",
input=[
{"type": "image", "data": base64_image, "mime_type": "image/jpeg"},
{"type": "text", "text": "turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video"}
],
generation_config={
"video_config": {
"task": "image_to_video",
}
},
)
with open("example.mp4", "wb") as f:
f.write(base64.b64decode(interaction.output_video.data))
جاوا اسکریپت
import { GoogleGenAI } from "@google/genai";
import * as fs from 'fs';
const ai = new GoogleGenAI({});
const interaction = await ai.interactions.create({
model: 'gemini-omni-flash-preview',
input: [
{ type: 'image', data: base64Image, mime_type: 'image/jpeg' },
{ type: 'text', text: 'turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video' }
],
generationConfig: {
videoConfig: {
task: 'image_to_video',
}
}
});
if (interaction.output_video?.data) {
fs.writeFileSync('example.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}
استراحت
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"input": [
{
"type": "image",
"data": "'"$BASE64_IMAGE"'",
"mime_type": "image/jpeg"
},
{
"type": "text",
"text": "turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video"
}
],
"generation_config": {
"video_config": {
"task": "image_to_video"
}
}
}'
ویرایش ویدیوی رسمی
یک ویدیو تولید کنید و آن را به صورت تکراری با استفاده از دستورالعملهای تکمیلی ویرایش کنید. هر نوبت بر اساس نتیجه قبلی ساخته میشود. مدل، زمینه ویدیو را به خاطر میسپارد و تغییرات شما را اعمال میکند و در عین حال عناصری را که ذکر نکردهاید حفظ میکند. از previous_interaction_id برای ردیابی تاریخچه مکالمه و وضعیت ویدیوی تولید شده بدون بارگذاری مجدد ویدیوی قبلی استفاده کنید.
مثال زیر نحوه تولید اولین ویدیو و سپس ویرایش آن را نشان میدهد:
پایتون
import base64
from google import genai
client = genai.Client()
# Turn 1: Generate initial video
res1 = client.interactions.create(model="gemini-omni-flash-preview", input="A woman playing violin outdoors.")
# Turn 2: Edit the previous video
res2 = client.interactions.create(
model="gemini-omni-flash-preview",
previous_interaction_id=res1.id,
input="Make the violin invisible."
)
with open("example.mp4", "wb") as f:
f.write(base64.b64decode(res2.output_video.data))
جاوا اسکریپت
import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});
// Turn 1: Generate initial video
const res1 = await ai.interactions.create({
model: 'gemini-omni-flash-preview',
input: 'A woman playing violin outdoors.',
});
// Turn 2: Edit the previous video
const res2 = await ai.interactions.create({
model: 'gemini-omni-flash-preview',
previous_interaction_id: res1.id,
input: 'Make the violin invisible.',
});
if (res2.output_video?.data) {
fs.writeFileSync('example.mp4', Buffer.from(res2.output_video.data, 'base64'));
}
استراحت
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"previous_interaction_id": "'"$PREVIOUS_ID"'",
"input": "Make the violin invisible."
}'
نمونهای از ویدیوی اولیه:
نمونهای از ویدیوی ویرایششده:
هر نوبت در مکالمه یک ویدیوی جدید تولید میکند. این مدل، زمینه را از نوبتهای قبلی درک میکند و به شما امکان میدهد تغییرات تدریجی مانند تنظیم نورپردازی و تعویض پسزمینه را بدون توصیف مجدد کل صحنه انجام دهید.
ویدیوهای خودتان را ویرایش کنید
ویدیوهای خود را با استفاده از Files API آپلود کنید تا بتوانید آنها را با Gemini Omni Flash ویرایش کنید.
مثال زیر نحوه ویرایش ویدیوی اصلی زیر را نشان میدهد:
پایتون
import time
import base64
from google import genai
client = genai.Client()
# Upload video using the file API
video_file = client.files.upload(file="Video.mp4")
while video_file.state == "PROCESSING":
print('Waiting for video to be processed.')
time.sleep(10)
video_file = client.files.get(name=video_file.name)
if video_file.state == "FAILED":
raise ValueError(video_file.state)
print(f'Video processing complete: ' + video_file.uri)
# Edit your video
interaction = client.interactions.create(
model="gemini-omni-flash-preview",
input=[
{"type": "document", "uri": video_file.uri},
{"type": "text", "text": "When the person touches the mirror, make the mirror ripple beautifully like liquid, and the person's arm turns into reflective mirror material"}
],
)
with open("example.mp4", "wb") as f:
f.write(base64.b64decode(interaction.output_video.data))
جاوا اسکریپت
import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});
// Upload video using the file API
let videoFile = await ai.files.upload({
file: 'Video.mp4',
});
while (videoFile.state === 'PROCESSING') {
console.log('Waiting for video to be processed.');
await new Promise(r => setTimeout(r, 10000));
videoFile = await ai.files.get({ name: videoFile.name });
}
if (videoFile.state === 'FAILED') {
throw new Error(videoFile.state);
}
console.log('Video processing complete: ' + videoFile.uri);
// Edit your video
const interaction = await ai.interactions.create({
model: 'gemini-omni-flash-preview',
input: [
{ type: 'document', uri: videoFile.uri },
{ type: 'text', text: "When the person touches the mirror, make the mirror ripple beautifully like liquid, and the person's arm turns into reflective mirror material" }
],
});
if (interaction.output_video?.data) {
fs.writeFileSync('example.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}
استراحت
#!/bin/bash
VIDEO_B64=$(encode_file "$VIDEO_FILE")
curl -sS -w "\n[HTTP %{http_code}]\n" "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "x-goog-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d @- <<EOF > video_editing_response.json
{
"model": "gemini-omni-flash-preview",
"input": [
{
"type": "user_input",
"content": [
{
"type": "video",
"mime_type": "video/mp4",
"data": "$VIDEO_B64"
},
{
"type": "text",
"text": "When the person touches the mirror, make the mirror ripple beautifully like liquid, and the person's arm turns into reflective mirror material"
}
]
}
],
"response_format": { "type": "video" }
}
EOF
نمونهای از ویدیوی ویرایششده:
بازیابی ویدیوها با یک URI
از پارامتر delivery="uri" در response_format برای بازیابی ویدیوهای تولید شدهای که بزرگتر از ۴ مگابایت هستند استفاده کنید. این یک URI میزبانی شده توسط گوگل را برمیگرداند که میتوانید تا زمان ACTIVE ویدیو قبل از دانلود، از آن نمونهبرداری کنید.
پایتون
import time
from google import genai
client = genai.Client()
# 1. Request video via URI delivery
interaction = client.interactions.create(
model="gemini-omni-flash-preview",
input="A beautiful sunset.",
response_format={"type": "video", "delivery": "uri"}
)
# 2. Extract file name and poll for ACTIVE state
video_output = interaction.output_video
file_name = video_output.uri.split("/")[-1] # Extract ID
print("Waiting for video processing...")
while True:
f_info = client.files.get(name=f"files/{file_name}")
if f_info.state.name == "ACTIVE":
break
elif f_info.state.name == "FAILED":
raise RuntimeError("Generation failed.")
time.sleep(5)
# 3. Download the final video
video_bytes = client.files.download(file=video_output.uri)
with open("output.mp4", "wb") as f:
f.write(video_bytes)
جاوا اسکریپت
import { GoogleGenAI } from '@google/genai';
const ai = new GoogleGenAI({});
// 1. Request video via URI delivery
const interaction = await ai.interactions.create({
model: 'gemini-omni-flash-preview',
input: 'A beautiful sunset.',
response_format: { type: 'video', delivery: 'uri' },
});
// 2. Extract file name and poll for ACTIVE state
const videoOutput = interaction.output_video;
const fileId = videoOutput.uri.match(/files\/([a-zA-Z0-9]+)/)[1];
const name = `files/${fileId}`;
console.log("Waiting for video processing...");
while (true) {
const fInfo = await ai.files.get({ name });
if (fInfo.state.name === 'ACTIVE') break;
if (fInfo.state.name === 'FAILED') throw new Error("Generation failed.");
await new Promise(r => setTimeout(r, 5000));
}
// 3. Download the final video
await ai.files.download({
file: videoOutput,
downloadPath: 'output.mp4',
});
console.log("💾 Saved video to output.mp4");
استراحت
#!/bin/bash
# 1. Initial request to generate the video
RESPONSE=$(curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-omni-flash-preview",
"input": "A beautiful sunset over a calm ocean.",
"response_format": {"type": "video", "delivery": "uri"}
}')
# Extract FILE_ID from the URI (e.g., "files/abc-123" -> "abc-123")
FILE_URI=$(echo $RESPONSE | jq -r '.output_video.uri')
FILE_ID=$(echo $FILE_URI | cut -d'/' -f2)
echo "Video requested (ID: $FILE_ID). Waiting for processing..."
# 2. Polling loop
while true; do
# Get current file status
STATUS_JSON=$(curl -s -X GET "https://generativelanguage.googleapis.com/v1beta/files/$FILE_ID?key=$API_KEY")
STATE=$(echo $STATUS_JSON | jq -r '.state')
if [ "$STATE" == "ACTIVE" ]; then
echo "Processing complete! Downloading..."
break
elif [ "$STATE" == "FAILED" ]; then
echo "Error: Generation failed."
exit 1
else
echo "Current state: $STATE... (waiting 5s)"
sleep 5
fi
done
# 3. Final download
curl -L -X GET "https://generativelanguage.googleapis.com/v1beta/files/$FILE_ID:download?alt=media&key=$API_KEY" \
--output "output.mp4"
echo "Done! Video saved to output.mp4"
ساختار خام REST JSON (URI):
{
"steps": [
{ "type": "user_input", "content": [{"type": "text", "text": "..."}] },
{ "type": "thought", "content": [{"text": "...", "type": "thought"}] },
{
"type": "model_output",
"content": [
{
"type": "video",
"mime_type": "video/mp4",
"uri": "https://generativelanguage.googleapis.com/v1beta/files/...:download?alt=media"
}
]
}
],
"id": "v1_...",
"status": "completed",
"model": "gemini-omni-flash-preview",
"object": "interaction"
}
بهترین شیوهها
- استفاده از تحویل URI برای ویدیوهای بزرگ: برای ویدیوهای بزرگتر از ۴ مگابایت (در صورت وجود >۷۲۰p)، از
delivery="uri"درresponse_formatاستفاده کنید تا از محدودیتهای اندازه بار داده جلوگیری شود. - عملکرد بهینه: برای تولید سریعتر و همزمان یکتایی،
background=false،store=falseوstream=falseرا تنظیم کنید. توجه داشته باشید که تنظیمstore=falseبه این معنی است که ویدیوی تولید شده در نوبتهای بعدی با استفاده ازprevious_interaction_idقابل ویرایش نخواهد بود. - دقت سریع: برای جزئیات بیشتر به بخش راهنمای سریع مراجعه کنید.
محدودیتها
- آپلود و ویرایش تصاویر حاوی افراد زیر سن قانونی در منطقه اقتصادی اروپا، سوئیس و بریتانیا پشتیبانی نمیشود.
- آپلود و ویرایش تصاویری که حاوی افراد قابل تشخیص خاصی هستند پشتیبانی نمیشود.
- ویرایش ویدیوهای آپلود شده در حال حاضر برای کاربران منطقه اقتصادی اروپا (EEA)، سوئیس و بریتانیا در دسترس نیست (ویرایش ویدیوهای تولید شده توسط این مدل پشتیبانی میشود).
- آپلود منابع صوتی در نسخه فعلی API پشتیبانی نمیشود.
- ارجاعات ویدیویی تا مدت زمان ۳ ثانیه توسط طرح API پذیرفته میشوند، اما در حال حاضر به درستی توسط مدل پردازش نمیشوند.
- ارجاع یا استدلال در چندین ویدیو پشتیبانی نمیشود. تلاش برای ایجاد چند ویدیو ممکن است منجر به کاهش عملکرد مدل یا خروجیهای غیرمنتظره شود.
- افزونهی ویدیو و درونیابی ویدیو (تولید ویدیو بین فریم اول و آخر) پشتیبانی نمیشوند.
- ویرایش صدا پشتیبانی نمیشود.
- توان عملیاتی ارائه شده پشتیبانی نمیشود.
- دستورالعملهای سیستم، دما،
top_p، توالیهای توقف و پیامهای منفی پشتیبانی نمیشوند (میتوانید پیامهای منفی خود را در پیام معمولی قرار دهید: مثلاً «کار X را انجام ندهید»). - استفاده از ویدیوهای یوتیوب به عنوان منبع رسانه پشتیبانی نمیشود.
جزئیات فنی
- تمام ویدیوهای تولید شده شامل واترمارک SynthID هستند که برای بینندگان نامرئی است اما میتوان آن را به صورت برنامهنویسی برای تأیید اصالت شناسایی کرد.
- زمان تولید ویدیو بسته به مدت زمان، وضوح تصویر و بار فعلی API متفاوت است. ویدیوهای طولانیتر و با وضوح بالاتر زمان بیشتری برای تولید نیاز دارند.
- فیلترهای ایمنی محتوا هم برای پیامهای ورودی و هم برای ویدیوهای تولید شده اعمال میشوند (و به منطقه شما بستگی دارند). پیامهایی که سیاستهای استفاده را نقض میکنند، مسدود خواهند شد.
- انگلیسی (EN) کاملاً پشتیبانی میشود، اما زبانهای دیگر ارزیابی نشدهاند، بنابراین ممکن است کار کنند اما نتایج میتوانند متفاوت باشند.
راهنمای سریع Gemini Omni Flash
این بخش شامل نکات و مثالهایی در مورد چگونگی فعال کردن مؤثر Gemini Omni Flash است.
تک صحنه
به طور پیشفرض، Omni Flash سعی میکند ویدیویی با چند نمای مختلف ایجاد کند. این برنامه تلاش میکند تا بر اساس موضوع، روایتی جالب خلق کند.
اگر نیاز دارید که ویدیوی خروجی شامل یک صحنه باشد، باید این را از طریق دستور زیر درخواست کنید:
- در یک صحنهی بیوقفه
- در یک نمای پیوسته
- بدون حذف صحنه
برای مثال:
Continuous, unbroken handheld shot of a fluffy tabby cat sitting on a sunny windowsill, looking out into a leafy garden. The cat's tail twitches slowly, and its ears rotate slightly toward ambient noises. Sunbeams illuminate dust motes in the air. Sound design: Gentle breeze, distant bird chirps. No dialogue.
حذف عناصر ناخواسته
اگر ویدیوی تولید شده حاوی چیزهایی است که نمیخواهید، برای جلوگیری از آنها، دستورالعملهای منفی سادهای را در آن بگنجانید:
- بدون دیالوگ
- بدون تزئینات
- بدون جلوههای صوتی اضافی
درخواستهایی برای ویرایش
دستورالعملهای ساده برای ویرایش ویدیو بهترین عملکرد را دارند. دستورالعملهای بیش از حد توصیفی میتوانند منجر به تغییرات ناخواسته شوند.
در ادامه نمونههای بیشتری از دستورات ویرایشی ساده آمده است:
- این ویدیو را انیمه کنید
- یه کلاه شیک سر این آدم بذار
- نورپردازی را تغییر دهید تا چشمگیرتر شود
- متن روی تابلو را به «Omni Flash» تغییر دهید.
هنگام ویرایش بخش خاصی از ویدیو، برای حفظ انسجام بصری، عبارت "Keep everything else the same" را اضافه کنید.
در ادامه چند مثال برای نشان دادن نحوهی بهکارگیری این تکنیک ارائه شده است:
- اجتناب:
In the video of the man sitting on the sofa, please add a small black cat that runs from the right side of the screen, jumps onto his lap, and then he starts to stroke its head while looking down.- سادهسازی:
Add a cat that jumps onto his lap, he begins to pet it. Keep everything else the same.
- سادهسازی:
- اجتناب کنید:
Please remove the cell phone that the person is holding in their hand and fill in the background so it looks like they are just holding their hand empty.- سادهسازی:
Make the phone invisible. Keep everything else the same.
- سادهسازی:
پخش صدا
به طور پیشفرض، مدل سعی میکند یک آهنگ صوتی مناسب برای ویدیو تولید کند. این ممکن است همیشه آن چیزی نباشد که شما میخواهید. میتوانید از دستور خود برای توصیف نوع صوتی که میخواهید استفاده کنید. این امر به ویژه در صورتی که میخواهید در ویدیوی خود موسیقی داشته باشید، مهم است:
- موسیقی پس زمینه آرام را در نظر بگیرید
- این ویدیو ریتم تکنوی پرانرژی دارد
- صدا، صدای ضعیف و ضعیف رادیویی است که در پسزمینه پخش میشود و آهنگی را پخش میکند.
رویدادهای زمانبندی
شما میتوانید در زمانهای مشخصی از ویدیو، اتفاقاتی را پیشبینی کنید، نیازی به دستور زبان خاصی نیست و میتوانید از زبان طبیعی استفاده کنید. این قابلیت به ویژه در ایجاد کاتهای صحنه، ریتم یا سکانسهای سریع خودتان مفید است. برای مثال به موارد زیر مراجعه کنید:
- بعد از ۳ ثانیه، زنی وارد صحنه میشود.
- در ثانیه ۵، همخوانی در صدای پسزمینه شروع میشود.
- هر ۲ ثانیه یک قاب جدید برش داده میشود.
- در یک سکانس تیراندازی سریع، هر نیم ثانیه (۱۲ فریم با سرعت ۲۴ فریم در ثانیه) صحنه به مکان جدیدی تغییر میکند.
همچنین میتوانید از سینتکس timecode استفاده کنید:
[0-3s] A person is walking
[3-6s] They stop and turn around
[6-10s] They start running
متای درخواست
میتوانید از Gemini Omni Flash بخواهید که به ویژگیهای کلی یا اصول تولید ویدیو توجه کند:
- برای خلق صحنهای بسیار غنی، پرجزئیات اما کاملاً طبیعی، جزئیات ریز، حالت چهره و زمانبندی را در نظر بگیرید.
- در توصیف شخصیتها و محیطها نهایت دقت را به خرج دهید. اصول طراحی لباس را برای شخصیتها به کار ببرید. در مورد افراد، اقلام و اشیاء موجود در صحنه بسیار دقیق باشید.
- جزئیات مناسب و زیادی را در عناصر پسزمینه بگنجانید تا صحنه واقعی و طبیعی به نظر برسد.
- یک ویدیوی سریع بسازید که هر ثانیه یک
[thing]کمیاب متفاوت را نشان دهد، موسیقی شاد داشته باشد و متنی برای برچسبگذاری آن چیز اضافه کند.
متن در ویدیوها
میتوانید از شما بخواهید که در ویدیوی خود متن قرار دهید و Gemini Omni آن را به روشی صحیح و خوانا رندر خواهد کرد. اگر متن طبیعی در ویدیوی شما، حتی در عناصر پسزمینه، وجود داشته باشد، میتواند به تعریف آنچه باید گفته شود، کمک کند.
- هر کلمه روی صفحه نمایش در هر زمان: «آیا، تو، میدانستی، که، اومنی، میتواند، انجام دهد، فوقالعاده، متن؟» هر کلمه برای ۱ ثانیه با سبک انیمیشنی متفاوت ظاهر میشود. بدون دیالوگ.
- یک تابلوی خیابانی هست که روی آن نوشته شده: «این یک نسل هوش مصنوعی از Omni است»، یک مغازه هست که روی آن نوشته شده: «هر آنچه که به هوش مصنوعی نیاز دارید»، یک ماشین هم هست که پلاکش «OMN111» است.
استفاده از برچسبها در اعلانها برای تنظیم نقشهای تصویر
شما میتوانید از برچسبها برای اتصال رسانههای آپلود شده به نقشهای تولید خاص استفاده کنید. این به شما امکان میدهد مشخص کنید که آیا هر تصویر یک فریم اولیه است یا یک مرجع.
۱. تگهای ساده (توصیه میشود)
برای موارد سادهای که نقشهای تصویر از طریق اعلان فرمان مشخص هستند، میتوانید تصاویر را مستقیماً به نقشها متصل کنید:
-
<FIRST_FRAME>: از تصویر به عنوان فریم شروع ویدیو استفاده میکند، برای مثال:<FIRST_FRAME> a woman is walking -
<IMAGE_REF_N>: از تصویر به عنوان مرجع استفاده میکند، برای مثال:in the style of <IMAGE_REF_0> a woman <IMAGE_REF_1> is walking(ارجاع سبک از تصویر اول و ارجاع موضوع از تصویر دوم را ترکیب میکند). ارجاعات تصویر از ۰ شروع میشوند.
مثال زیر شامل ۶ تصویر مرجع است:
[0-3s] A studio fashion sequence. Starting with woman <IMAGE_REF_0>, she is holding <IMAGE_REF_1>
[3-6s] Then we see the man <IMAGE_REF_2> holding <IMAGE_REF_3>
[6-10s] And finally another woman <IMAGE_REF_4> who is holding <IMAGE_REF_5> while walking.
۲. اعلانهای صریح
برای موارد پیچیدهتر با چندین تصویر و چندین نقش، میتوانید از برچسبهای پیشوند صریح همراه با پسوندهای دستورالعمل زبان طبیعی استفاده کنید.
- اعلام منابع و تصاویر مرجع :
-
[# Sources <FIRST_FRAME>@Image1] از تصویر اول به عنوان فریم شروع استفاده خواهد کرد. -
[# References <IMAGE_REF_0>@Image1] از تصویر اول به عنوان مرجع استفاده خواهد کرد. -
[# References <IMAGE_REF_1>@Image2] از تصویر دوم به عنوان مرجع استفاده خواهد کرد. -
[# References <IMAGE_REF_0>@Image1 <IMAGE_REF_1>@Image2]از هر دو تصویر به عنوان مرجع استفاده خواهد کرد. -
[# Sources <FIRST_FRAME>@Image1] [# References <IMAGE_REF_0>@Image2]از تصویر اول به عنوان فریم شروع و تصویر دوم به عنوان مرجع استفاده خواهد کرد.
-
- دستورالعملهای راهنما : دستورالعملهای راهنما را در انتهای درخواست خود اضافه کنید:
- برای فریم شروع:
"Use this image as the starting frame." - برای تصاویر مرجع:
"Use the given image(s) as references for video generation. The images should not be used as literal initial frames."
- برای فریم شروع:
مثال اعلان گسترشیافته:
[# Sources <FIRST_FRAME>@Image1] [# References <IMAGE_REF_0>@Image2] a woman <IMAGE_REF_0> is walking. Use Image1 as the starting frame. Use Image2 as a reference for the video generation.
قدم بعدی چیست؟
- با آزمایش در Omni Quickstart Colab، کار با Gemini Omni Flash را شروع کنید.
- با «مقدمهای بر طراحی سریع» یاد بگیرید که چگونه دستورالعملهای بهتری بنویسید.