Diffusers documentation

ChronoEdit

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.42.1).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

LoRA

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:

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

< >

( 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 transformer ile 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__

< >

( 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 veya torch.Tensor olmalıdır.
  • prompt (str veya list[str], isteğe bağlı) — Görsel üretimi yönlendirmek için istem veya istemler. Tanımlanmadıysa bunun yerine prompt_embeds geçirilmelidir.
  • negative_prompt (str veya list[str], isteğe bağlı) — Görsel üretimini yönlendirmemek için kullanılan istem veya istemler. Tanımlanmamışsa, bunun yerine negative_prompt_embeds parametresinin geçirilmesi gerekir. Yönlendirme kullanılmadığında (yani guidance_scale değeri 1'den küçükse) yok sayılır.
  • height (int, varsayılan 480) — Oluşturulan videonun yüksekliği.
  • width (int, varsayılan 832) — Oluşturulan videonun genişliği.
  • num_frames (int, varsayılan 81) — Oluşturulan videodaki kare sayısı.
  • num_inference_steps (int, varsayılan 50) — 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ılan 5.0) — Classifier-Free Diffusion Guidance makalesinde tanımlanan yönlendirme ölçeği. guidance_scale, Imagen Paper makalesindeki 2. denklemindeki w olarak tanımlanır. Yönlendirme ölçeği, guidance_scale > 1 olarak ayarlanarak etkinleştirilir. Daha yüksek yönlendirme ölçeği, prompt ile 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.Generator veya list[torch.Generator], isteğe bağlı) — Üretimi deterministik hale getirmek için kullanılan bir torch.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 rastgele generator kullanı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ğerleri prompt girdi 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ğerleri negative_prompt girdi 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örleri image girdi 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.Image veya np.array arasında seçim yapın.
  • return_dict (bool, isteğe bağlı, varsayılan True) — Düz bir tuple yerine ChronoEditPipelineOutput döndürülüp döndürülmemesi.
  • attention_kwargs (dict, isteğe bağlı) — Belirtilirse, diffusers.models.attention_processor içindeki self.processor altında tanımlanan AttentionProcessor'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 veya PipelineCallback / MultiPipelineCallbacks alt sınıfı: callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict). callback_kwargs, callback_on_step_end_tensor_inputs tarafından belirtilen tüm tensörlerin listesini içerecektir.
  • callback_on_step_end_tensor_inputs (List, optional) — The list of tensor inputs for the callback_on_step_end function. The tensors specified in the list will be passed as callback_kwargs argument. You will only be able to include variables listed in the ._callback_tensor_inputs attribute of your pipeline class.
  • max_sequence_length (int, varsayılan 512) — 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ılan False) — Zamansal akıl yürütmenin etkinleştirilip etkinleştirilmeyeceğini belirtir.
  • num_temporal_reasoning_steps (int, isteğe bağlı, varsayılan 0) — 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

< >

( 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 (str veya list[str], isteğe bağlı) — kodlanacak prompt
  • negative_prompt (str veya list[str], isteğe bağlı) — Görsel üretimini yönlendirmemek için kullanılan istem veya istemler. Tanımlanmamışsa, bunun yerine negative_prompt_embeds parametresinin geçirilmesi gerekir. Yönlendirme kullanılmadığında (yani guidance_scale değeri 1'den küçükse) yok sayılır.
  • do_classifier_free_guidance (bool, isteğe bağlı, varsayılan True) — 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ğerleri prompt girdi 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_prompt girdi 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

< >

( 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 length batch_size, with each sub-list containing denoised PIL image sequences of length num_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ı.

Update on GitHub