Buckets:

mishig's picture
|
download
raw
26.5 kB

Apache Lisansı, 2.0 Sürümü ("Lisans") altında lisanslanmıştır;

bu dosyayı, Lisansa uygun olarak kullanabilirsiniz.

Lisansın bir kopyasını şu adresten edinebilirsiniz

http://www.apache.org/licenses/LICENSE-2.0

Uygulanabilir yasa gerektirmedikçe veya yazılı olarak anlaşılmadıkça, yazılım

Lisans kapsamında dağıtılan, "OLDUĞU GİBİ" esasına göre dağıtılır,

HİÇBİR TÜR AÇIK VEYA ZIMMİ GARANTİ VEYA ŞART İÇERMEZ.

İzinleri ve

lisans kapsamındaki kısıtlamalar. -->

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[[diffusers.ChronoEditPipeline]]

diffusers.ChronoEditPipeline[[diffusers.ChronoEditPipeline]]

diffusers.ChronoEditPipeline(tokenizer: AutoTokenizer, text_encoder: UMT5EncoderModel, image_encoder: CLIPVisionModel, image_processor: CLIPImageProcessorPil, transformer: ChronoEditTransformer3DModel, vae: AutoencoderKLWan, scheduler: FlowMatchEulerDiscreteScheduler)

Kaynak

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 varyantı.

transformer (WanTransformer3DModel) : Girdi latentlerini gürültüden arındırmak için kullanılan 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 latent temsillerden video'lara çö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ınmıştı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[[diffusers.ChronoEditPipeline.call]]

__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] = None, negative_prompt: str | list[str] = None, height: int = 480, width: int = 832, num_frames: int = 81, num_inference_steps: int = 50, guidance_scale: float = 5.0, num_videos_per_prompt: int | None = 1, generator: typing.Union[torch.Generator, list[torch.Generator], NoneType] = None, latents: typing.Optional[torch.Tensor] = None, prompt_embeds: typing.Optional[torch.Tensor] = None, negative_prompt_embeds: typing.Optional[torch.Tensor] = None, image_embeds: typing.Optional[torch.Tensor] = None, output_type: str | None = 'np', return_dict: bool = True, attention_kwargs: dict[str, typing.Any] | None = None, callback_on_step_end: typing.Optional[typing.Callable[[int, int, NoneType], diffusers.callbacks.PipelineCallback | diffusers.callbacks.MultiPipelineCallbacks]] = None, callback_on_step_end_tensor_inputs: list = ['latents'], max_sequence_length: int = 512, enable_temporal_reasoning: bool = False, num_temporal_reasoning_steps: int = 0)

Kaynak

Parametreler:

image (PipelineImageInput) : Üretimi koşullandırmak için girdi olarak kullanılan görüntü. 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ımlanmamışsa, bunun yerine prompt_embeds geçirilmelidir.

negative_prompt (str veya list[str], isteğe bağlı) : Görsel üretimi yönlendirmemek için kullanılan istem veya istemler. Tanımlanmazsa, 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) : Üretilen videonun yüksekliği.

width (int, varsayılan 832) : Üretilen videonun genişliği.

num_frames (int, varsayılan 81) : Üretilen 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'de tanımlanan yönlendirme ölçeği. guidance_scale, Imagen Paper'deki 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, genellikle daha düşük görüntü kalitesi pahasına, prompt ile yakından ilişkili görüntülerin üretilmesini teşvik eder.

num_videos_per_prompt (int, isteğe bağlı, varsayılan 1) : Her istem için üretilecek görsel sayısı.

generator (torch.Generator veya list[torch.Generator], isteğe bağlı) : Üretimi deterministik hale getirmek için bir torch.Generator.

latents (torch.Tensor, isteğe bağlı) : Görsel üretimi için girdi olarak kullanılacak, Gauss dağılımından örneklenen önceden oluşturulmuş gürültülü latensler. Farklı istemlerle aynı üretimi ayarlamak için kullanılabilir. Sağlanmazsa, sağlanan rastgele generator kullanılarak örneklem yoluyla bir latens tensörü oluşturulur.

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 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örsel gömme (embedding) değerleri. Görsel girdileri (ağırlıklandırma) kolayca ayarlamak için kullanılabilir. Sağlanmazsa, görsel gömme değerleri image girdi argümanından üretilir.

output_type (str, isteğe bağlı, varsayılan "np") : Üretilen 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çinde self.processor altında tanımlanan AttentionProcessor'a iletilen bir kwargs sözlüğü.

callback_on_step_end (Callable, PipelineCallback, MultiPipelineCallbacks, opsiyonel) : Çıkarım sırasında her gürültü azaltma adımının sonunda çağrılan, PipelineCallback veya MultiPipelineCallbacks alt sınıfı olan bir fonksiyon. Aşağıdaki argümanlarla çağrılır: callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict). callback_kwargs, callback_on_step_end_tensor_inputs tarafından belirtildiği üzere 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 maksimum dizi uzunluğu. İfade bu uzunluktan uzunsa kısaltılır. İfade bu uzunluktan kısaysa bu uzunluğa kadar dolgu yapılır.

enable_temporal_reasoning (bool, isteğe bağlı, varsayılan False) : Zamanlama çıkarımının etkinleştirilip etkinleştirilmeyeceği.

num_temporal_reasoning_steps (int, isteğe bağlı, varsayılan 0) : Zamanlama çıkarımını etkinleştirmek için adım sayısı.

Dönüş: ~ChronoEditPipelineOutput veya tuple

return_dict True ise ChronoEditPipelineOutput döndürülür, aksi takdirde bir tuple döndürülür; bu yapının ilk öğesi üretilen görsellerin listesi, ikinci öğesi 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[[diffusers.ChronoEditPipeline.encode_prompt]]

encode_prompt(prompt: str | list[str], negative_prompt: str | list[str] | None = None, do_classifier_free_guidance: bool = True, num_videos_per_prompt: int = 1, prompt_embeds: typing.Optional[torch.Tensor] = None, negative_prompt_embeds: typing.Optional[torch.Tensor] = None, max_sequence_length: int = 226, device: typing.Optional[torch.device] = None, dtype: typing.Optional[torch.dtype] = None)

Kaynak

Parametreler:

prompt (str veya list[str], isteğe bağlı) : kodlanacak istem

negative_prompt (str veya list[str], isteğe bağlı) : Görsel üretimi yönlendirmemek için kullanılan istem veya istemler. Tanımlanmazsa, 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) : Sınıflandırıcı serbest yönlendirmenin (classifier free guidance) kullanılıp kullanılmayacağı.

num_videos_per_prompt (int, opsiyonel, varsayılan 1) : Her istem 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ı) : Ön oluşturulmuş metin gömme değerleri. Metin girdilerini kolayca ayarlamak için kullanılabilir, ör. istem ağırlıklandırması. Sağlanmazsa, metin gömme değerleri prompt girdi argümanından oluşturulur.

negative_prompt_embeds (torch.Tensor, isteğe bağlı) : Ön 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[[diffusers.pipelines.chronoedit.pipeline_output.ChronoEditPipelineOutput]]

diffusers.pipelines.chronoedit.pipeline_output.ChronoEditPipelineOutput[[diffusers.pipelines.chronoedit.pipeline_output.ChronoEditPipelineOutput]]

diffusers.pipelines.chronoedit.pipeline_output.ChronoEditPipelineOutput(frames: Tensor)

Kaynak

Parametreler:

frames (torch.Tensor, np.ndarray veya list[list[PIL.Image.Image]]) : Video çıktıları listesi - batch_size, uzunluğunda iç içe geçmiş bir liste olabilir; her alt liste, num_frames. uzunluğunda gürültüsü azaltılmış PIL görüntü dizileri içerir. Ayrıca (batch_size, num_frames, channels, height, width) biçiminde bir NumPy dizi veya Torch tensörü de olabilir.

ChronoEdit pipeline'leri için çıktı sınıfı.

Xet Storage Details

Size:
26.5 kB
·
Xet hash:
2f6dcaf81eb5708803263da947eea58f02ca683340088adcc96a122e956c5ebc

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.