Diffusers documentation
ChronoEdit
ChronoEdit
NVIDIA ve Toronto Üniversitesi'nden Jay Zhangjie Wu, Xuanchi Ren, Tianchang Shen, Tianshi Cao, Kai He, Yifan Lu, Ruiyuan Gao, Enze Xie, Shiyi Lan, Jose M. Alvarez, Jun Gao, Sanja Fidler, Zian Wang, Huan Ling tarafından ChronoEdit: Towards Temporal Reasoning for Image Editing and World Simulation
Kısa özet: ChronoEdit, görüntü düzenlemeyi bir video üretimi görevi olarak yeniden çerçeveler ve zaman tutarlılığına sahip önceden eğitilmiş video modellerinden yararlanmak için girdi ve düzenlenmiş görüntüleri başlangıç/bitiş kareleri olarak kullanır. Zamanlama akıl yürütme aşaması, fiziksel olarak olası düzenlemeleri sağlamak ve düzenleme yörüngesini görselleştirmek için akıl yürütme jetonları (reasoning tokens) tanıtır.
Büyük üretken modellerdeki son gelişmeler, hem görüntü düzenlemeyi hem de bağlam içi görüntü üretimini büyük ölçüde iyileştirmiş olsa da, düzenlenmiş nesnelerin tutarlı kalmasını gerektiren fiziksel tutarlılığı sağlama konusunda kritik bir boşluk kalmaya devam etmektedir. Bu yetenek, dünya simülasyonu ile ilgili görevler için özellikle hayati önem taşır. Bu makalede, görüntü düzenlemeyi bir video üretim problemi olarak yeniden çerçeveleyen ChronoEdit adlı bir çerçeveyi sunuyoruz. Öncelikle, ChronoEdit girdi ve düzenlenmiş görüntüleri bir videonun ilk ve son kareleri olarak ele alarak, yalnızca nesne görünümünü değil, öğrenilen zamansal tutarlılık yoluyla hareket ve etkileşimin örtük fiziğini de yakalayan büyük önceden eğitilmiş video üretici modellerden yararlanmasına olanak tanır. İkinci olarak, ChronoEdit, çıkarım sırasında düzenlemeyi açıkça gerçekleştiren bir zamansal akıl yürütme aşaması sunar. Bu ayar altında, hedef kare, çözüm uzayını fiziksel olarak uygulanabilir dönüşümlerle sınırlayan olası bir düzenleme yörüngesini hayal etmek için akıl yürütme jetonlarıyla birlikte gürültüden arındırılır. Tam bir video render etmenin yüksek hesaplama maliyetinden kaçınmak için akıl yürütme jetonları birkaç adımın ardından düşürülür. ChronoEdit'i doğrulamak için, fiziksel tutarlılık gerektiren bağlamlar için görüntü-istek çiftlerinden oluşan yeni bir referans noktası olan PBench-Edit'i tanıtıyor ve ChronoEdit'in hem görsel sadakatte hem de fiziksel olasıllıkta en iyi mevcut baz çizgilerini aştığını gösteriyoruz. Kod ve modeller için proje sayfası: this https URL.
ChronoEdit hattı, ChronoEdit Ekibi tarafından geliştirilmiştir. Orijinal kod GitHub'da bulunabilir ve önceden eğitilmiş modeller Hugging Face'teki nvidia/ChronoEdit koleksiyonunda yer almaktadır.
Mevcut Modeller/LoRAs:
- nvidia/ChronoEdit-14B-Diffusers
- nvidia/ChronoEdit-14B-Diffusers-Upscaler-Lora
- nvidia/ChronoEdit-14B-Diffusers-Paint-Brush-Lora
Görsel Düzenleme
import torch
import numpy as np
from diffusers import AutoencoderKLWan, ChronoEditTransformer3DModel, ChronoEditPipeline
from diffusers.utils import export_to_video, load_image
from transformers import CLIPVisionModel
from PIL import Image
model_id = "nvidia/ChronoEdit-14B-Diffusers"
image_encoder = CLIPVisionModel.from_pretrained(model_id, subfolder="image_encoder", dtype=torch.float32)
vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", dtype=torch.float32)
transformer = ChronoEditTransformer3DModel.from_pretrained(model_id, subfolder="transformer", dtype=torch.bfloat16)
pipe = ChronoEditPipeline.from_pretrained(model_id, image_encoder=image_encoder, transformer=transformer, vae=vae, dtype=torch.bfloat16)
pipe.to("cuda") # or "mps", "xpu", "cpu"
image = load_image(
"https://huggingface.co/spaces/nvidia/ChronoEdit/resolve/main/examples/3.png"
)
max_area = 720 * 1280
aspect_ratio = image.height / image.width
mod_value = pipe.vae_scale_factor_spatial * pipe.transformer.config.patch_size[1]
height = round(np.sqrt(max_area * aspect_ratio)) // mod_value * mod_value
width = round(np.sqrt(max_area / aspect_ratio)) // mod_value * mod_value
print("width", width, "height", height)
image = image.resize((width, height))
prompt = (
"The user wants to transform the image by adding a small, cute mouse sitting inside the floral teacup, enjoying a spa bath. The mouse should appear relaxed and cheerful, with a tiny white bath towel draped over its head like a turban. It should be positioned comfortably in the cup’s liquid, with gentle steam rising around it to blend with the cozy atmosphere. "
"The mouse’s pose should be natural—perhaps sitting upright with paws resting lightly on the rim or submerged in the tea. The teacup’s floral design, gold trim, and warm lighting must remain unchanged to preserve the original aesthetic. The steam should softly swirl around the mouse, enhancing the spa-like, whimsical mood."
)
output = pipe(
image=image,
prompt=prompt,
height=height,
width=width,
num_frames=5,
num_inference_steps=50,
guidance_scale=5.0,
enable_temporal_reasoning=False,
num_temporal_reasoning_steps=0,
).frames[0]
Image.fromarray((output[-1] * 255).clip(0, 255).astype("uint8")).save("output.png")İsteğe bağlı olarak, fiziksel tutarlılığı iyileştirmek için zamansal akıl yürütmeyi etkinleştirin:
output = pipe(
image=image,
prompt=prompt,
height=height,
width=width,
num_frames=29,
num_inference_steps=50,
guidance_scale=5.0,
enable_temporal_reasoning=True,
num_temporal_reasoning_steps=50,
).frames[0]
export_to_video(output, "output.mp4", fps=16)
Image.fromarray((output[-1] * 255).clip(0, 255).astype("uint8")).save("output.png")8 Adımlı Distilasyon Lora ile Çıkarım
import torch
import numpy as np
from diffusers import AutoencoderKLWan, ChronoEditTransformer3DModel, ChronoEditPipeline
from diffusers.schedulers import UniPCMultistepScheduler
from diffusers.utils import export_to_video, load_image
from transformers import CLIPVisionModel
from PIL import Image
model_id = "nvidia/ChronoEdit-14B-Diffusers"
image_encoder = CLIPVisionModel.from_pretrained(model_id, subfolder="image_encoder", dtype=torch.float32)
vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", dtype=torch.float32)
transformer = ChronoEditTransformer3DModel.from_pretrained(model_id, subfolder="transformer", dtype=torch.bfloat16)
pipe = ChronoEditPipeline.from_pretrained(model_id, image_encoder=image_encoder, transformer=transformer, vae=vae, dtype=torch.bfloat16)
pipe.load_lora_weights("nvidia/ChronoEdit-14B-Diffusers", weight_name="lora/chronoedit_distill_lora.safetensors", adapter_name="distill")
pipe.fuse_lora(adapter_names=["distill"], lora_scale=1.0)
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=2.0)
pipe.to("cuda") # or "mps", "xpu", "cpu"
image = load_image(
"https://huggingface.co/spaces/nvidia/ChronoEdit/resolve/main/examples/3.png"
)
max_area = 720 * 1280
aspect_ratio = image.height / image.width
mod_value = pipe.vae_scale_factor_spatial * pipe.transformer.config.patch_size[1]
height = round(np.sqrt(max_area * aspect_ratio)) // mod_value * mod_value
width = round(np.sqrt(max_area / aspect_ratio)) // mod_value * mod_value
print("width", width, "height", height)
image = image.resize((width, height))
prompt = (
"The user wants to transform the image by adding a small, cute mouse sitting inside the floral teacup, enjoying a spa bath. The mouse should appear relaxed and cheerful, with a tiny white bath towel draped over its head like a turban. It should be positioned comfortably in the cup’s liquid, with gentle steam rising around it to blend with the cozy atmosphere. "
"The mouse’s pose should be natural—perhaps sitting upright with paws resting lightly on the rim or submerged in the tea. The teacup’s floral design, gold trim, and warm lighting must remain unchanged to preserve the original aesthetic. The steam should softly swirl around the mouse, enhancing the spa-like, whimsical mood."
)
output = pipe(
image=image,
prompt=prompt,
height=height,
width=width,
num_frames=5,
num_inference_steps=8,
guidance_scale=1.0,
enable_temporal_reasoning=False,
num_temporal_reasoning_steps=0,
).frames[0]
export_to_video(output, "output.mp4", fps=16)
Image.fromarray((output[-1] * 255).clip(0, 255).astype("uint8")).save("output.png")Birden Çok LoRA ile Çıkarım
import torch
import numpy as np
from diffusers import AutoencoderKLWan, ChronoEditTransformer3DModel, ChronoEditPipeline
from diffusers.schedulers import UniPCMultistepScheduler
from diffusers.utils import export_to_video, load_image
from transformers import CLIPVisionModel
from PIL import Image
model_id = "nvidia/ChronoEdit-14B-Diffusers"
image_encoder = CLIPVisionModel.from_pretrained(model_id, subfolder="image_encoder", dtype=torch.float32)
vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", dtype=torch.float32)
transformer = ChronoEditTransformer3DModel.from_pretrained(model_id, subfolder="transformer", dtype=torch.bfloat16)
pipe = ChronoEditPipeline.from_pretrained(model_id, image_encoder=image_encoder, transformer=transformer, vae=vae, dtype=torch.bfloat16)
pipe.load_lora_weights("nvidia/ChronoEdit-14B-Diffusers-Paint-Brush-Lora", weight_name="paintbrush_lora_diffusers.safetensors", adapter_name="paintbrush")
pipe.load_lora_weights("nvidia/ChronoEdit-14B-Diffusers", weight_name="lora/chronoedit_distill_lora.safetensors", adapter_name="distill")
pipe.fuse_lora(adapter_names=["paintbrush", "distill"], lora_scale=1.0)
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=2.0)
pipe.to("cuda") # or "mps", "xpu", "cpu"
image = load_image(
"https://raw.githubusercontent.com/nv-tlabs/ChronoEdit/refs/heads/main/assets/images/input_paintbrush.png"
)
max_area = 720 * 1280
aspect_ratio = image.height / image.width
mod_value = pipe.vae_scale_factor_spatial * pipe.transformer.config.patch_size[1]
height = round(np.sqrt(max_area * aspect_ratio)) // mod_value * mod_value
width = round(np.sqrt(max_area / aspect_ratio)) // mod_value * mod_value
print("width", width, "height", height)
image = image.resize((width, height))
prompt = (
"Turn the pencil sketch in the image into an actual object that is consistent with the image’s content. The user wants to change the sketch to a crown and a hat."
)
output = pipe(
image=image,
prompt=prompt,
height=height,
width=width,
num_frames=5,
num_inference_steps=8,
guidance_scale=1.0,
enable_temporal_reasoning=False,
num_temporal_reasoning_steps=0,
).frames[0]
export_to_video(output, "output.mp4", fps=16)
Image.fromarray((output[-1] * 255).clip(0, 255).astype("uint8")).save("output_1.png")ChronoEditPipeline
sınıf diffusers.ChronoEditPipeline
< source >( tokenizer: AutoTokenizertext_encoder: UMT5EncoderModelimage_encoder: CLIPVisionModelimage_processor: CLIPImageProcessorPiltransformer: ChronoEditTransformer3DModelvae: AutoencoderKLWanscheduler: FlowMatchEulerDiscreteScheduler )
Parametreler
- tokenizer (
T5Tokenizer) — T5'den gelen tokenizer, özellikle google/umt5-xxl varyantı. - text_encoder (
T5EncoderModel) — T5, özellikle google/umt5-xxl varyantı. - image_encoder (
CLIPVisionModel) — CLIP, özellikle clip-vit-huge-patch14 değişkeni. - transformer (WanTransformer3DModel) — Giriş latentlerini gürültüden arındırmak için koşullu Transformer.
- scheduler (UniPCMultistepScheduler) —
Kodlanmış görüntü latentlerini gürültüden arındırmak için
transformerile birlikte kullanılacak bir zamanlayıcı. - vae (AutoencoderKLWan) — Video'ları latent temsillere kodlamak ve bu temsillerden çözmek için kullanılan Varyasyonel Oto-Kodlayıcı (VAE) Modeli.
Wan kullanılarak görüntüden videoya üretim için Pipeline.
Bu model DiffusionPipeline sınıfından devralır. Tüm pipeline'lar için uygulanan genel yöntemlerin (indirme, kaydetme, belirli bir cihazda çalıştırma vb.) belgelerini üst sınıfın dokümantasyonunda bulabilirsiniz.
__call__
< source >( image: typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, list[PIL.Image.Image], list[numpy.ndarray], list[torch.Tensor]]prompt: str | list[str] = Nonenegative_prompt: str | list[str] = Noneheight: int = 480width: int = 832num_frames: int = 81num_inference_steps: int = 50guidance_scale: float = 5.0num_videos_per_prompt: int | None = 1generator: typing.Union[torch.Generator, list[torch.Generator], NoneType] = Nonelatents: typing.Optional[torch.Tensor] = Noneprompt_embeds: typing.Optional[torch.Tensor] = Nonenegative_prompt_embeds: typing.Optional[torch.Tensor] = Noneimage_embeds: typing.Optional[torch.Tensor] = Noneoutput_type: str | None = 'np'return_dict: bool = Trueattention_kwargs: dict[str, typing.Any] | None = Nonecallback_on_step_end: typing.Optional[typing.Callable[[int, int, NoneType], diffusers.callbacks.PipelineCallback | diffusers.callbacks.MultiPipelineCallbacks]] = Nonecallback_on_step_end_tensor_inputs: list = ['latents']max_sequence_length: int = 512enable_temporal_reasoning: bool = Falsenum_temporal_reasoning_steps: int = 0 ) → ~ChronoEditPipelineOutput or tuple
Parametreler
- image (
PipelineImageInput) — Üretimin koşullandırılacağı girdi görüntüsü. Bir görüntü, görüntü listesi veyatorch.Tensorolmalıdır. - prompt (
strveyalist[str], isteğe bağlı) — Görsel üretimi yönlendirmek için istem veya istemler. Tanımlanmadıysa bunun yerineprompt_embedsgeçirilmelidir. - negative_prompt (
strveyalist[str], isteğe bağlı) — Görsel üretimini yönlendirmemek için kullanılan istem veya istemler. Tanımlanmamışsa, bunun yerinenegative_prompt_embedsparametresinin geçirilmesi gerekir. Yönlendirme kullanılmadığında (yaniguidance_scaledeğeri1'den küçükse) yok sayılır. - height (
int, varsayılan480) — Oluşturulan videonun yüksekliği. - width (
int, varsayılan832) — Oluşturulan videonun genişliği. - num_frames (
int, varsayılan81) — Oluşturulan videodaki kare sayısı. - num_inference_steps (
int, varsayılan50) — Gürültü azaltma adım sayısı. Daha fazla gürültü azaltma adımı genellikle daha yavaş çıkarım pahasına daha yüksek kaliteli bir görüntüye yol açar. - guidance_scale (
float, varsayılan5.0) — Classifier-Free Diffusion Guidance makalesinde tanımlanan yönlendirme ölçeği.guidance_scale, Imagen Paper makalesindeki 2. denklemindekiwolarak tanımlanır. Yönlendirme ölçeği,guidance_scale > 1olarak ayarlanarak etkinleştirilir. Daha yüksek yönlendirme ölçeği,promptile yakından ilişkili görsellerin üretilmesini teşvik eder, genellikle daha düşük görsel kalitesi pahasına. - num_videos_per_prompt (
int, isteğe bağlı, varsayılan 1) — Her istem için oluşturulacak görüntü sayısı. - generator (
torch.Generatorveyalist[torch.Generator], isteğe bağlı) — Üretimi deterministik hale getirmek için kullanılan birtorch.Generator. - latents (
torch.Tensor, isteğe bağlı) — Gaussian dağılımdan örneklenen, gürültülü ve önceden oluşturulmuş latents; görüntü üretimi için girdi olarak kullanılabilir. Farklı istemlerle aynı üretimi ayarlamak için kullanılabilir. Sağlanmazsa, sağlanan rastgelegeneratorkullanılarak örneklemeye dayalı bir latents tensörü oluşturulur. - prompt_embeds (
torch.Tensor, isteğe bağlı) — Önceden oluşturulmuş metin gömme değerleri. Metin girdilerini kolayca ayarlamak (istifade ağırlıklandırma) için kullanılabilir. Sağlanmazsa, metin gömme değerleripromptgirdi argümanından üretilir. - negative_prompt_embeds (
torch.Tensor, isteğe bağlı) — Önceden oluşturulmuş metin gömme değerleri. Metin girdilerini (istek ağırlıklandırması) kolayca ayarlamak için kullanılabilir. Sağlanmazsa, metin gömme değerlerinegative_promptgirdi argümanından üretilir. - image_embeds (
torch.Tensor, isteğe bağlı) — Önceden oluşturulmuş gömme vektörleri. Görsel girdileri kolayca ayarlamak (ağırlıklandırma) için kullanılabilir. Sağlanmazsa, gömme vektörleriimagegirdi argümanından üretilir. - output_type (
str, isteğe bağlı, varsayılan"np") — Oluşturulan görüntünün çıktı biçimi.PIL.Imageveyanp.arrayarasında seçim yapın. - return_dict (
bool, isteğe bağlı, varsayılanTrue) — Düz bir tuple yerineChronoEditPipelineOutputdöndürülüp döndürülmemesi. - attention_kwargs (
dict, isteğe bağlı) — Belirtilirse, diffusers.models.attention_processor içindekiself.processoraltında tanımlananAttentionProcessor'a iletilen bir kwargs sözlüğü. - callback_on_step_end (
Callable,PipelineCallback,MultiPipelineCallbacks, isteğe bağlı) — Çıkarım sırasında her gürültü azaltma adımının sonunda çağrılan, aşağıdaki argümanlara sahip bir fonksiyon veyaPipelineCallback/MultiPipelineCallbacksalt sınıfı:callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict).callback_kwargs,callback_on_step_end_tensor_inputstarafından belirtilen tüm tensörlerin listesini içerecektir. - callback_on_step_end_tensor_inputs (
List, optional) — The list of tensor inputs for thecallback_on_step_endfunction. The tensors specified in the list will be passed ascallback_kwargsargument. You will only be able to include variables listed in the._callback_tensor_inputsattribute of your pipeline class. - max_sequence_length (
int, varsayılan512) — Metin kodlayıcısının (text encoder) maksimum dizi uzunluğu. İfade (prompt) bu uzunluktan uzunsa kırpılır. İfade bu uzunluktan kısaysa bu uzunluğa kadar dolgu (padding) yapılır. - enable_temporal_reasoning (
bool, isteğe bağlı, varsayılanFalse) — Zamansal akıl yürütmenin etkinleştirilip etkinleştirilmeyeceğini belirtir. - num_temporal_reasoning_steps (
int, isteğe bağlı, varsayılan0) — Zamansal akıl yürütme için etkinleştirilecek adım sayısı.
Dönüş değeri
~ChronoEditPipelineOutput veya tuple
return_dict True ise ChronoEditPipelineOutput döndürülür, aksi halde bir tuple döndürülür; bu yapıda ilk öğe üretilen görsellerin listesi, ikinci öğe ise ilgili üretilen görselin “not-safe-for-work” (nsfw) içerip içermediğini gösteren bool değerlerinin listesidir.
Üretim için pipeline'ın çağrı fonksiyonu.
Örnekler:
>>> import torch
>>> import numpy as np
>>> from diffusers import AutoencoderKLWan, ChronoEditTransformer3DModel, ChronoEditPipeline
>>> from diffusers.utils import export_to_video, load_image
>>> from transformers import CLIPVisionModel
>>> # Available models: nvidia/ChronoEdit-14B-Diffusers
>>> model_id = "nvidia/ChronoEdit-14B-Diffusers"
>>> image_encoder = CLIPVisionModel.from_pretrained(
... model_id, subfolder="image_encoder", torch_dtype=torch.float32
... )
>>> vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)
>>> transformer = ChronoEditTransformer3DModel.from_pretrained(
... model_id, subfolder="transformer", torch_dtype=torch.bfloat16
... )
>>> pipe = ChronoEditPipeline.from_pretrained(
... model_id, vae=vae, image_encoder=image_encoder, transformer=transformer, torch_dtype=torch.bfloat16
... )
>>> pipe.to("cuda")
>>> image = load_image("https://huggingface.co/spaces/nvidia/ChronoEdit/resolve/main/examples/3.png")
>>> max_area = 720 * 1280
>>> aspect_ratio = image.height / image.width
>>> mod_value = pipe.vae_scale_factor_spatial * pipe.transformer.config.patch_size[1]
>>> height = round(np.sqrt(max_area * aspect_ratio)) // mod_value * mod_value
>>> width = round(np.sqrt(max_area / aspect_ratio)) // mod_value * mod_value
>>> image = image.resize((width, height))
>>> prompt = (
... "The user wants to transform the image by adding a small, cute mouse sitting inside the floral teacup, enjoying a spa bath. The mouse should appear relaxed and cheerful, with a tiny white bath towel draped over its head like a turban. It should be positioned comfortably in the cup’s liquid, with gentle steam rising around it to blend with the cozy atmosphere. "
... "The mouse’s pose should be natural—perhaps sitting upright with paws resting lightly on the rim or submerged in the tea. The teacup’s floral design, gold trim, and warm lighting must remain unchanged to preserve the original aesthetic. The steam should softly swirl around the mouse, enhancing the spa-like, whimsical mood."
... )
>>> output = pipe(
... image=image,
... prompt=prompt,
... height=height,
... width=width,
... num_frames=5,
... guidance_scale=5.0,
... enable_temporal_reasoning=False,
... num_temporal_reasoning_steps=0,
... ).frames[0]
>>> export_to_video(output, "output.mp4", fps=16)encode_prompt
< source >( prompt: str | list[str]negative_prompt: str | list[str] | None = Nonedo_classifier_free_guidance: bool = Truenum_videos_per_prompt: int = 1prompt_embeds: typing.Optional[torch.Tensor] = Nonenegative_prompt_embeds: typing.Optional[torch.Tensor] = Nonemax_sequence_length: int = 226device: typing.Optional[torch.device] = Nonedtype: typing.Optional[torch.dtype] = None )
Parametreler
- prompt (
strveyalist[str], isteğe bağlı) — kodlanacak prompt - negative_prompt (
strveyalist[str], isteğe bağlı) — Görsel üretimini yönlendirmemek için kullanılan istem veya istemler. Tanımlanmamışsa, bunun yerinenegative_prompt_embedsparametresinin geçirilmesi gerekir. Yönlendirme kullanılmadığında (yaniguidance_scaledeğeri1'den küçükse) yok sayılır. - do_classifier_free_guidance (
bool, isteğe bağlı, varsayılanTrue) — Classifier free guidance kullanılacak mı? - num_videos_per_prompt (
int, isteğe bağlı, varsayılan 1) — Her prompt için oluşturulması gereken video sayısı. Sonuç gömme vektörlerinin yerleştirileceği torch cihazı - prompt_embeds (
torch.Tensor, isteğe bağlı) — Önceden oluşturulmuş metin gömme değerleri. Metin girdilerini kolayca ayarlamak için kullanılabilir, ör. prompt ağırlıklandırma. Sağlanmazsa, metin gömme değerleripromptgirdi argümanından oluşturulur. - negative_prompt_embeds (
torch.Tensor, isteğe bağlı) — Önceden oluşturulmuş negatif metin gömme değerleri. Metin girdilerini kolayca ayarlamak için kullanılabilir, ör. istem ağırlıklandırması. Sağlanmazsa, negative_prompt_embeds,negative_promptgirdi argümanından oluşturulur. - device — (
torch.device, isteğe bağlı): torch cihazı - dtype — (
torch.dtype, isteğe bağlı): torch dtype
İsteği metin kodlayıcı gizli durumlarına kodlar.
ChronoEditPipelineOutput
sınıf diffusers.pipelines.chronoedit.pipeline_output.ChronoEditPipelineOutput
< source >( frames: Tensor )
Parametreler
- frames (
torch.Tensor,np.ndarray, or list[list[PIL.Image.Image]]) — List of video outputs - It can be a nested list of lengthbatch_size,with each sub-list containing denoised PIL image sequences of lengthnum_frames.It can also be a NumPy array or Torch tensor of shape(batch_size, num_frames, channels, height, width).
ChronoEdit pipeline'leri için çıktı sınıfı.