import{s as Ba,o as Ga,n as oe}from"../chunks/scheduler.8c3d61f6.js";import{S as Va,i as ka,g as c,s as o,r as g,A as xa,h as m,f as n,c as l,j,x as h,u as f,k,l as Ca,y as i,a as d,v as y,d as M,t as _,w as b}from"../chunks/index.da70eac4.js";import{T as Xa}from"../chunks/Tip.1d9b8c37.js";import{D as X}from"../chunks/Docstring.c021b19a.js";import{C as A}from"../chunks/CodeBlock.a9c4becf.js";import{E as it}from"../chunks/ExampleCodeBlock.56b4589c.js";import{H as $,E as Ra}from"../chunks/getInferenceSnippets.725ed3d4.js";import{H as Ia,a as Pt}from"../chunks/HfOption.6c3b4e77.js";function Qa(U){let t,w="Click on the Wan2.1 models in the right sidebar for more examples of video generation.";return{c(){t=c("p"),t.textContent=w},l(r){t=m(r,"P",{"data-svelte-h":!0}),h(t)!=="svelte-1jx6um4"&&(t.textContent=w)},m(r,p){d(r,t,p)},p:oe,d(r){r&&n(t)}}}function Na(U){let t,w='Refer to the <a href="../../optimization/memory">Reduce memory usage</a> guide for more details about the various memory saving techniques.',r,p,u="The Wan2.1 text-to-video model below requires ~13GB of VRAM.",a,J,W;return J=new A({props:{code:" ",highlighted:`<span class="hljs-comment"># pip install ftfy</span>
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoModel, WanPipeline
<span class="hljs-keyword">from</span> diffusers.quantizers <span class="hljs-keyword">import</span> PipelineQuantizationConfig
<span class="hljs-keyword">from</span> diffusers.hooks.group_offloading <span class="hljs-keyword">import</span> apply_group_offloading
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_image
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> UMT5EncoderModel

text_encoder = UMT5EncoderModel.from_pretrained(<span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-14B-Diffusers&quot;</span>, subfolder=<span class="hljs-string">&quot;text_encoder&quot;</span>, torch_dtype=torch.bfloat16)
vae = AutoModel.from_pretrained(<span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-14B-Diffusers&quot;</span>, subfolder=<span class="hljs-string">&quot;vae&quot;</span>, torch_dtype=torch.float32)
transformer = AutoModel.from_pretrained(<span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-14B-Diffusers&quot;</span>, subfolder=<span class="hljs-string">&quot;transformer&quot;</span>, torch_dtype=torch.bfloat16)

<span class="hljs-comment"># group-offloading</span>
onload_device = torch.device(<span class="hljs-string">&quot;cuda&quot;</span>)
offload_device = torch.device(<span class="hljs-string">&quot;cpu&quot;</span>)
apply_group_offloading(text_encoder,
    onload_device=onload_device,
    offload_device=offload_device,
    offload_type=<span class="hljs-string">&quot;block_level&quot;</span>,
    num_blocks_per_group=<span class="hljs-number">4</span>
)
transformer.enable_group_offload(
    onload_device=onload_device,
    offload_device=offload_device,
    offload_type=<span class="hljs-string">&quot;leaf_level&quot;</span>,
    use_stream=<span class="hljs-literal">True</span>
)

pipeline = WanPipeline.from_pretrained(
    <span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-14B-Diffusers&quot;</span>,
    vae=vae,
    transformer=transformer,
    text_encoder=text_encoder,
    torch_dtype=torch.bfloat16
)
pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;&quot;&quot;
The camera rushes from far to near in a low-angle shot, 
revealing a white ferret on a log. It plays, leaps into the water, and emerges, as the camera zooms in 
for a close-up. Water splashes berry bushes nearby, while moss, snow, and leaves blanket the ground. 
Birch trees and a light blue sky frame the scene, with ferns in the foreground. Side lighting casts dynamic 
shadows and warm highlights. Medium composition, front view, low angle, with depth of field.
&quot;&quot;&quot;</span>
negative_prompt = <span class="hljs-string">&quot;&quot;&quot;
Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, 
low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, 
misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards
&quot;&quot;&quot;</span>

output = pipeline(
    prompt=prompt,
    negative_prompt=negative_prompt,
    num_frames=<span class="hljs-number">81</span>,
    guidance_scale=<span class="hljs-number">5.0</span>,
).frames[<span class="hljs-number">0</span>]
export_to_video(output, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,wrap:!1}}),{c(){t=c("p"),t.innerHTML=w,r=o(),p=c("p"),p.textContent=u,a=o(),g(J.$$.fragment)},l(T){t=m(T,"P",{"data-svelte-h":!0}),h(t)!=="svelte-iowzkr"&&(t.innerHTML=w),r=l(T),p=m(T,"P",{"data-svelte-h":!0}),h(p)!=="svelte-lj5f0r"&&(p.textContent=u),a=l(T),f(J.$$.fragment,T)},m(T,x){d(T,t,x),d(T,r,x),d(T,p,x),d(T,a,x),y(J,T,x),W=!0},p:oe,i(T){W||(M(J.$$.fragment,T),W=!0)},o(T){_(J.$$.fragment,T),W=!1},d(T){T&&(n(t),n(r),n(p),n(a)),b(J,T)}}}function Fa(U){let t,w='<a href="../../optimization/fp16#torchcompile">Compilation</a> is slow the first time but subsequent calls to the pipeline are faster. <a href="../../optimization/cache">Caching</a> may also speed up inference by storing and reusing intermediate outputs.',r,p,u;return p=new A({props:{code:"JTIzJTIwcGlwJTIwaW5zdGFsbCUyMGZ0ZnklMEFpbXBvcnQlMjB0b3JjaCUwQWltcG9ydCUyMG51bXB5JTIwYXMlMjBucCUwQWZyb20lMjBkaWZmdXNlcnMlMjBpbXBvcnQlMjBBdXRvTW9kZWwlMkMlMjBXYW5QaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMuaG9va3MuZ3JvdXBfb2ZmbG9hZGluZyUyMGltcG9ydCUyMGFwcGx5X2dyb3VwX29mZmxvYWRpbmclMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTJD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TBBJTBBb3V0cHV0JTIwJTNEJTIwcGlwZWxpbmUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwbmVnYXRpdmVfcHJvbXB0JTNEbmVnYXRpdmVfcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwbnVtX2ZyYW1lcyUzRDgxJTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0Q1LjAlMkMlMEEpLmZyYW1lcyU1QjAlNUQlMEFleHBvcnRfdG9fdmlkZW8ob3V0cHV0JTJDJTIwJTIyb3V0cHV0Lm1wNCUyMiUyQyUyMGZwcyUzRDE2KQ==",highlighted:`<span class="hljs-comment"># pip install ftfy</span>
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoModel, WanPipeline
<span class="hljs-keyword">from</span> diffusers.hooks.group_offloading <span class="hljs-keyword">import</span> apply_group_offloading
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_image
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> UMT5EncoderModel

text_encoder = UMT5EncoderModel.from_pretrained(<span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-14B-Diffusers&quot;</span>, subfolder=<span class="hljs-string">&quot;text_encoder&quot;</span>, torch_dtype=torch.bfloat16)
vae = AutoModel.from_pretrained(<span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-14B-Diffusers&quot;</span>, subfolder=<span class="hljs-string">&quot;vae&quot;</span>, torch_dtype=torch.float32)
transformer = AutoModel.from_pretrained(<span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-14B-Diffusers&quot;</span>, subfolder=<span class="hljs-string">&quot;transformer&quot;</span>, torch_dtype=torch.bfloat16)

pipeline = WanPipeline.from_pretrained(
    <span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-14B-Diffusers&quot;</span>,
    vae=vae,
    transformer=transformer,
    text_encoder=text_encoder,
    torch_dtype=torch.bfloat16
)
pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-comment"># torch.compile</span>
pipeline.transformer.to(memory_format=torch.channels_last)
pipeline.transformer = torch.<span class="hljs-built_in">compile</span>(
    pipeline.transformer, mode=<span class="hljs-string">&quot;max-autotune&quot;</span>, fullgraph=<span class="hljs-literal">True</span>
)

prompt = <span class="hljs-string">&quot;&quot;&quot;
The camera rushes from far to near in a low-angle shot, 
revealing a white ferret on a log. It plays, leaps into the water, and emerges, as the camera zooms in 
for a close-up. Water splashes berry bushes nearby, while moss, snow, and leaves blanket the ground. 
Birch trees and a light blue sky frame the scene, with ferns in the foreground. Side lighting casts dynamic 
shadows and warm highlights. Medium composition, front view, low angle, with depth of field.
&quot;&quot;&quot;</span>
negative_prompt = <span class="hljs-string">&quot;&quot;&quot;
Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, 
low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, 
misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards
&quot;&quot;&quot;</span>

output = pipeline(
    prompt=prompt,
    negative_prompt=negative_prompt,
    num_frames=<span class="hljs-number">81</span>,
    guidance_scale=<span class="hljs-number">5.0</span>,
).frames[<span class="hljs-number">0</span>]
export_to_video(output, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,wrap:!1}}),{c(){t=c("p"),t.innerHTML=w,r=o(),g(p.$$.fragment)},l(a){t=m(a,"P",{"data-svelte-h":!0}),h(t)!=="svelte-e4r7sz"&&(t.innerHTML=w),r=l(a),f(p.$$.fragment,a)},m(a,J){d(a,t,J),d(a,r,J),y(p,a,J),u=!0},p:oe,i(a){u||(M(p.$$.fragment,a),u=!0)},o(a){_(p.$$.fragment,a),u=!1},d(a){a&&(n(t),n(r)),b(p,a)}}}function Ya(U){let t,w,r,p;return t=new Pt({props:{id:"T2V usage",option:"T2V memory",$$slots:{default:[Na]},$$scope:{ctx:U}}}),r=new Pt({props:{id:"T2V usage",option:"T2V inference speed",$$slots:{default:[Fa]},$$scope:{ctx:U}}}),{c(){g(t.$$.fragment),w=o(),g(r.$$.fragment)},l(u){f(t.$$.fragment,u),w=l(u),f(r.$$.fragment,u)},m(u,a){y(t,u,a),d(u,w,a),y(r,u,a),p=!0},p(u,a){const J={};a&2&&(J.$$scope={dirty:a,ctx:u}),t.$set(J);const W={};a&2&&(W.$$scope={dirty:a,ctx:u}),r.$set(W)},i(u){p||(M(t.$$.fragment,u),M(r.$$.fragment,u),p=!0)},o(u){_(t.$$.fragment,u),_(r.$$.fragment,u),p=!1},d(u){u&&n(w),b(t,u),b(r,u)}}}function Ea(U){let t,w;return t=new A({props:{code:" ",highlighted:`<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">import</span> torchvision.transforms.functional <span class="hljs-keyword">as</span> TF
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoencoderKLWan, WanImageToVideoPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_image
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPVisionModel


model_id = <span class="hljs-string">&quot;Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers&quot;</span>
image_encoder = CLIPVisionModel.from_pretrained(model_id, subfolder=<span class="hljs-string">&quot;image_encoder&quot;</span>, torch_dtype=torch.float32)
vae = AutoencoderKLWan.from_pretrained(model_id, subfolder=<span class="hljs-string">&quot;vae&quot;</span>, torch_dtype=torch.float32)
pipe = WanImageToVideoPipeline.from_pretrained(
    model_id, vae=vae, image_encoder=image_encoder, torch_dtype=torch.bfloat16
)
pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

first_frame = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/flf2v_input_first_frame.png&quot;</span>)
last_frame = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/flf2v_input_last_frame.png&quot;</span>)

<span class="hljs-keyword">def</span> <span class="hljs-title function_">aspect_ratio_resize</span>(<span class="hljs-params">image, pipe, max_area=<span class="hljs-number">720</span> * <span class="hljs-number">1280</span></span>):
    aspect_ratio = image.height / image.width
    mod_value = pipe.vae_scale_factor_spatial * pipe.transformer.config.patch_size[<span class="hljs-number">1</span>]
    height = <span class="hljs-built_in">round</span>(np.sqrt(max_area * aspect_ratio)) // mod_value * mod_value
    width = <span class="hljs-built_in">round</span>(np.sqrt(max_area / aspect_ratio)) // mod_value * mod_value
    image = image.resize((width, height))
    <span class="hljs-keyword">return</span> image, height, width

<span class="hljs-keyword">def</span> <span class="hljs-title function_">center_crop_resize</span>(<span class="hljs-params">image, height, width</span>):
    <span class="hljs-comment"># Calculate resize ratio to match first frame dimensions</span>
    resize_ratio = <span class="hljs-built_in">max</span>(width / image.width, height / image.height)

    <span class="hljs-comment"># Resize the image</span>
    width = <span class="hljs-built_in">round</span>(image.width * resize_ratio)
    height = <span class="hljs-built_in">round</span>(image.height * resize_ratio)
    size = [width, height]
    image = TF.center_crop(image, size)

    <span class="hljs-keyword">return</span> image, height, width

first_frame, height, width = aspect_ratio_resize(first_frame, pipe)
<span class="hljs-keyword">if</span> last_frame.size != first_frame.size:
    last_frame, _, _ = center_crop_resize(last_frame, height, width)

prompt = <span class="hljs-string">&quot;CG animation style, a small blue bird takes off from the ground, flapping its wings. The bird&#x27;s feathers are delicate, with a unique pattern on its chest. The background shows a blue sky with white clouds under bright sunshine. The camera follows the bird upward, capturing its flight and the vastness of the sky from a close-up, low-angle perspective.&quot;</span>

output = pipe(
    image=first_frame, last_image=last_frame, prompt=prompt, height=height, width=width, guidance_scale=<span class="hljs-number">5.5</span>
).frames[<span class="hljs-number">0</span>]
export_to_video(output, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,wrap:!1}}),{c(){g(t.$$.fragment)},l(r){f(t.$$.fragment,r)},m(r,p){y(t,r,p),w=!0},p:oe,i(r){w||(M(t.$$.fragment,r),w=!0)},o(r){_(t.$$.fragment,r),w=!1},d(r){b(t,r)}}}function Ha(U){let t,w;return t=new Pt({props:{id:"FLF2V usage",option:"usage",$$slots:{default:[Ea]},$$scope:{ctx:U}}}),{c(){g(t.$$.fragment)},l(r){f(t.$$.fragment,r)},m(r,p){y(t,r,p),w=!0},p(r,p){const u={};p&2&&(u.$$scope={dirty:p,ctx:r}),t.$set(u)},i(r){w||(M(t.$$.fragment,r),w=!0)},o(r){_(t.$$.fragment,r),w=!1},d(r){b(t,r)}}}function $a(U){let t,w="Examples:",r,p,u;return p=new A({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9lbmNvZGVyS0xXYW4lMkMlMjBXYW5QaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMuc2NoZWR1bGVycy5zY2hlZHVsaW5nX3VuaXBjX211bHRpc3RlcCUyMGltcG9ydCUyMFVuaVBDTXVsdGlzdGVwU2NoZWR1bGVyJTBBJTBBJTIzJTIwQXZhaWxhYmxlJTIwbW9kZWxzJTNBJTIwV2FuLUFJJTJGV2FuMi4xLVQyVi0xNEItRGlmZnVzZXJzJTJDJTIwV2FuLUFJJTJGV2FuMi4xLVQyVi0xLjNCLURpZmZ1c2VycyUwQW1vZGVsX2lkJTIwJTNEJTIwJTIyV2FuLUFJJTJGV2FuMi4xLVQyVi0xNEItRGlmZnVzZXJzJTIyJTBBdmFlJTIwJTNEJTIwQXV0b2VuY29kZXJLTFdhbi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dXRwdXQlMkMlMjAlMjJvdXRwdXQubXA0JTIyJTJDJTIwZnBzJTNEMTYp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoencoderKLWan, WanPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.schedulers.scheduling_unipc_multistep <span class="hljs-keyword">import</span> UniPCMultistepScheduler

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Available models: Wan-AI/Wan2.1-T2V-14B-Diffusers, Wan-AI/Wan2.1-T2V-1.3B-Diffusers</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_id = <span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-14B-Diffusers&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>vae = AutoencoderKLWan.from_pretrained(model_id, subfolder=<span class="hljs-string">&quot;vae&quot;</span>, torch_dtype=torch.float32)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
<span class="hljs-meta">&gt;&gt;&gt; </span>flow_shift = <span class="hljs-number">5.0</span>  <span class="hljs-comment"># 5.0 for 720P, 3.0 for 480P</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=flow_shift)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;A cat and a dog baking a cake together in a kitchen. The cat is carefully measuring flour, while the dog is stirring the batter with a wooden spoon. The kitchen is cozy, with sunlight streaming through the window.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = <span class="hljs-string">&quot;Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>output = pipe(
<span class="hljs-meta">... </span>    prompt=prompt,
<span class="hljs-meta">... </span>    negative_prompt=negative_prompt,
<span class="hljs-meta">... </span>    height=<span class="hljs-number">720</span>,
<span class="hljs-meta">... </span>    width=<span class="hljs-number">1280</span>,
<span class="hljs-meta">... </span>    num_frames=<span class="hljs-number">81</span>,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">5.0</span>,
<span class="hljs-meta">... </span>).frames[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>export_to_video(output, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,wrap:!1}}),{c(){t=c("p"),t.textContent=w,r=o(),g(p.$$.fragment)},l(a){t=m(a,"P",{"data-svelte-h":!0}),h(t)!=="svelte-kvfsh7"&&(t.textContent=w),r=l(a),f(p.$$.fragment,a)},m(a,J){d(a,t,J),d(a,r,J),y(p,a,J),u=!0},p:oe,i(a){u||(M(p.$$.fragment,a),u=!0)},o(a){_(p.$$.fragment,a),u=!1},d(a){a&&(n(t),n(r)),b(p,a)}}}function za(U){let t,w="Examples:",r,p,u;return p=new A({props:{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjBudW1weSUyMGFzJTIwbnAlMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b2VuY29kZXJLTFdhbiUyQyUyMFdhbkltYWdlVG9WaWRlb1BpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4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lZ2F0aXZlX3Byb21wdCUzRG5lZ2F0aXZlX3Byb21wdCUyQyUwQSUyMCUyMCUyMCUyMGhlaWdodCUzRGhlaWdodCUyQyUwQSUyMCUyMCUyMCUyMHdpZHRoJTNEd2lkdGglMkMlMEElMjAlMjAlMjAlMjBudW1fZnJhbWVzJTNEODElMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDUuMCUyQyUwQSkuZnJhbWVzJTVCMCU1RCUwQWV4cG9ydF90b192aWRlbyhvdXRwdXQlMkMlMjAlMjJvdXRwdXQubXA0JTIyJTJDJTIwZnBzJTNEMTYp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoencoderKLWan, WanImageToVideoPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Available models: Wan-AI/Wan2.1-I2V-14B-480P-Diffusers, Wan-AI/Wan2.1-I2V-14B-720P-Diffusers</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_id = <span class="hljs-string">&quot;Wan-AI/Wan2.1-I2V-14B-480P-Diffusers&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image_encoder = CLIPVisionModel.from_pretrained(
<span class="hljs-meta">... </span>    model_id, subfolder=<span class="hljs-string">&quot;image_encoder&quot;</span>, torch_dtype=torch.float32
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>vae = AutoencoderKLWan.from_pretrained(model_id, subfolder=<span class="hljs-string">&quot;vae&quot;</span>, torch_dtype=torch.float32)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = WanImageToVideoPipeline.from_pretrained(
<span class="hljs-meta">... </span>    model_id, vae=vae, image_encoder=image_encoder, torch_dtype=torch.bfloat16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>image = load_image(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/astronaut.jpg&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>max_area = <span class="hljs-number">480</span> * <span class="hljs-number">832</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>aspect_ratio = image.height / image.width
<span class="hljs-meta">&gt;&gt;&gt; </span>mod_value = pipe.vae_scale_factor_spatial * pipe.transformer.config.patch_size[<span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>height = <span class="hljs-built_in">round</span>(np.sqrt(max_area * aspect_ratio)) // mod_value * mod_value
<span class="hljs-meta">&gt;&gt;&gt; </span>width = <span class="hljs-built_in">round</span>(np.sqrt(max_area / aspect_ratio)) // mod_value * mod_value
<span class="hljs-meta">&gt;&gt;&gt; </span>image = image.resize((width, height))
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = (
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;An astronaut hatching from an egg, on the surface of the moon, the darkness and depth of space realised in &quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;the background. High quality, ultrarealistic detail and breath-taking movie-like camera shot.&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = <span class="hljs-string">&quot;Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>output = pipe(
<span class="hljs-meta">... </span>    image=image,
<span class="hljs-meta">... </span>    prompt=prompt,
<span class="hljs-meta">... </span>    negative_prompt=negative_prompt,
<span class="hljs-meta">... </span>    height=height,
<span class="hljs-meta">... </span>    width=width,
<span class="hljs-meta">... </span>    num_frames=<span class="hljs-number">81</span>,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">5.0</span>,
<span class="hljs-meta">... </span>).frames[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>export_to_video(output, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,wrap:!1}}),{c(){t=c("p"),t.textContent=w,r=o(),g(p.$$.fragment)},l(a){t=m(a,"P",{"data-svelte-h":!0}),h(t)!=="svelte-kvfsh7"&&(t.textContent=w),r=l(a),f(p.$$.fragment,a)},m(a,J){d(a,t,J),d(a,r,J),y(p,a,J),u=!0},p:oe,i(a){u||(M(p.$$.fragment,a),u=!0)},o(a){_(p.$$.fragment,a),u=!1},d(a){a&&(n(t),n(r)),b(p,a)}}}function Pa(U){let t,w="Examples:",r,p,u;return p=new A({props:{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjBQSUwuSW1hZ2UlMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b2VuY29kZXJLTFdhbiUyQyUyMFdhblZBQ0VQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMuc2NoZWR1bGVycy5zY2hlZHVsaW5nX3VuaXBjX211bHRpc3RlcCUyMGltcG9ydCUyMFVuaVBDTXVsdGlzdGVwU2NoZWR1bGVyJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyU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TIwJTIwJTIwJTIwbWFzayUzRG1hc2slMkMlMEElMjAlMjAlMjAlMjBwcm9tcHQlM0Rwcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBoZWlnaHQlM0RoZWlnaHQlMkMlMEElMjAlMjAlMjAlMjB3aWR0aCUzRHdpZHRoJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2ZyYW1lcyUzRG51bV9mcmFtZXMlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMzAlMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDUuMCUyQyUwQSUyMCUyMCUyMCUyMGdlbmVyYXRvciUzRHRvcmNoLkdlbmVyYXRvcigpLm1hbnVhbF9zZWVkKDQyKSUyQyUwQSkuZnJhbWVzJTVCMCU1RCUwQWV4cG9ydF90b192aWRlbyhvdXRwdXQlMkMlMjAlMjJvdXRwdXQubXA0JTIyJTJDJTIwZnBzJTNEMTYp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> PIL.Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoencoderKLWan, WanVACEPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.schedulers.scheduling_unipc_multistep <span class="hljs-keyword">import</span> UniPCMultistepScheduler
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_image
<span class="hljs-keyword">def</span> <span class="hljs-title function_">prepare_video_and_mask</span>(<span class="hljs-params">first_img: PIL.Image.Image, last_img: PIL.Image.Image, height: <span class="hljs-built_in">int</span>, width: <span class="hljs-built_in">int</span>, num_frames: <span class="hljs-built_in">int</span></span>):
    first_img = first_img.resize((width, height))
    last_img = last_img.resize((width, height))
    frames = []
    frames.append(first_img)
    <span class="hljs-comment"># Ideally, this should be 127.5 to match original code, but they perform computation on numpy arrays</span>
    <span class="hljs-comment"># whereas we are passing PIL images. If you choose to pass numpy arrays, you can set it to 127.5 to</span>
    <span class="hljs-comment"># match the original code.</span>
    frames.extend([PIL.Image.new(<span class="hljs-string">&quot;RGB&quot;</span>, (width, height), (<span class="hljs-number">128</span>, <span class="hljs-number">128</span>, <span class="hljs-number">128</span>))] * (num_frames - <span class="hljs-number">2</span>))
    frames.append(last_img)
    mask_black = PIL.Image.new(<span class="hljs-string">&quot;L&quot;</span>, (width, height), <span class="hljs-number">0</span>)
    mask_white = PIL.Image.new(<span class="hljs-string">&quot;L&quot;</span>, (width, height), <span class="hljs-number">255</span>)
    mask = [mask_black, *[mask_white] * (num_frames - <span class="hljs-number">2</span>), mask_black]
    <span class="hljs-keyword">return</span> frames, mask

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Available checkpoints: Wan-AI/Wan2.1-VACE-1.3B-diffusers, Wan-AI/Wan2.1-VACE-14B-diffusers</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_id = <span class="hljs-string">&quot;Wan-AI/Wan2.1-VACE-1.3B-diffusers&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>vae = AutoencoderKLWan.from_pretrained(model_id, subfolder=<span class="hljs-string">&quot;vae&quot;</span>, torch_dtype=torch.float32)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = WanVACEPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
<span class="hljs-meta">&gt;&gt;&gt; </span>flow_shift = <span class="hljs-number">3.0</span>  <span class="hljs-comment"># 5.0 for 720P, 3.0 for 480P</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=flow_shift)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;CG animation style, a small blue bird takes off from the ground, flapping its wings. The bird&#x27;s feathers are delicate, with a unique pattern on its chest. The background shows a blue sky with white clouds under bright sunshine. The camera follows the bird upward, capturing its flight and the vastness of the sky from a close-up, low-angle perspective.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = <span class="hljs-string">&quot;Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>first_frame = load_image(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/flf2v_input_first_frame.png&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_frame = load_image(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/flf2v_input_last_frame.png&gt;&gt;&gt; &quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>height = <span class="hljs-number">512</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>width = <span class="hljs-number">512</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_frames = <span class="hljs-number">81</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>video, mask = prepare_video_and_mask(first_frame, last_frame, height, width, num_frames)

<span class="hljs-meta">&gt;&gt;&gt; </span>output = pipe(
<span class="hljs-meta">... </span>    video=video,
<span class="hljs-meta">... </span>    mask=mask,
<span class="hljs-meta">... </span>    prompt=prompt,
<span class="hljs-meta">... </span>    negative_prompt=negative_prompt,
<span class="hljs-meta">... </span>    height=height,
<span class="hljs-meta">... </span>    width=width,
<span class="hljs-meta">... </span>    num_frames=num_frames,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">30</span>,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">5.0</span>,
<span class="hljs-meta">... </span>    generator=torch.Generator().manual_seed(<span class="hljs-number">42</span>),
<span class="hljs-meta">... </span>).frames[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>export_to_video(output, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,wrap:!1}}),{c(){t=c("p"),t.textContent=w,r=o(),g(p.$$.fragment)},l(a){t=m(a,"P",{"data-svelte-h":!0}),h(t)!=="svelte-kvfsh7"&&(t.textContent=w),r=l(a),f(p.$$.fragment,a)},m(a,J){d(a,t,J),d(a,r,J),y(p,a,J),u=!0},p:oe,i(a){u||(M(p.$$.fragment,a),u=!0)},o(a){_(p.$$.fragment,a),u=!1},d(a){a&&(n(t),n(r)),b(p,a)}}}function Aa(U){let t,w="Examples:",r,p,u;return p=new A({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9lbmNvZGVyS0xXYW4lMkMlMjBXYW5WaWRlb1RvVmlkZW9QaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMuc2NoZWR1bGVycy5zY2hlZHVsaW5nX3VuaXBjX211bHRpc3RlcCUyMGltcG9ydCUyMFVuaVBDTXVsdGlzdGVwU2NoZWR1bGVyJTBBJTBBJTIzJTIwQXZhaWxhYmxlJTIwbW9kZWxzJTNBJTIwV2FuLUFJJTJGV2FuMi4xLVQyVi0xNEItRGlmZnVzZXJzJTJDJTIwV2FuLUFJJTJGV2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TIwJTIwJTIwJTIwd2lkdGglM0Q3MjAlMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDUuMCUyQyUwQSUyMCUyMCUyMCUyMHN0cmVuZ3RoJTNEMC43JTJDJTBBKS5mcmFtZXMlNUIwJTVEJTBBZXhwb3J0X3RvX3ZpZGVvKG91dHB1dCUyQyUyMCUyMm91dHB1dC5tcDQlMjIlMkMlMjBmcHMlM0QxNik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoencoderKLWan, WanVideoToVideoPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.schedulers.scheduling_unipc_multistep <span class="hljs-keyword">import</span> UniPCMultistepScheduler

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Available models: Wan-AI/Wan2.1-T2V-14B-Diffusers, Wan-AI/Wan2.1-T2V-1.3B-Diffusers</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_id = <span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-1.3B-Diffusers&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>vae = AutoencoderKLWan.from_pretrained(model_id, subfolder=<span class="hljs-string">&quot;vae&quot;</span>, torch_dtype=torch.float32)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = WanVideoToVideoPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
<span class="hljs-meta">&gt;&gt;&gt; </span>flow_shift = <span class="hljs-number">3.0</span>  <span class="hljs-comment"># 5.0 for 720P, 3.0 for 480P</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=flow_shift)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;A robot standing on a mountain top. The sun is setting in the background&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = <span class="hljs-string">&quot;Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>video = load_video(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/hiker.mp4&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>output = pipe(
<span class="hljs-meta">... </span>    video=video,
<span class="hljs-meta">... </span>    prompt=prompt,
<span class="hljs-meta">... </span>    negative_prompt=negative_prompt,
<span class="hljs-meta">... </span>    height=<span class="hljs-number">480</span>,
<span class="hljs-meta">... </span>    width=<span class="hljs-number">720</span>,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">5.0</span>,
<span class="hljs-meta">... </span>    strength=<span class="hljs-number">0.7</span>,
<span class="hljs-meta">... </span>).frames[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>export_to_video(output, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,wrap:!1}}),{c(){t=c("p"),t.textContent=w,r=o(),g(p.$$.fragment)},l(a){t=m(a,"P",{"data-svelte-h":!0}),h(t)!=="svelte-kvfsh7"&&(t.textContent=w),r=l(a),f(p.$$.fragment,a)},m(a,J){d(a,t,J),d(a,r,J),y(p,a,J),u=!0},p:oe,i(a){u||(M(p.$$.fragment,a),u=!0)},o(a){_(p.$$.fragment,a),u=!1},d(a){a&&(n(t),n(r)),b(p,a)}}}function Sa(U){let t,w,r,p,u,a='<div class="flex flex-wrap space-x-1"><a href="https://huggingface.co/docs/diffusers/main/en/tutorials/using_peft_for_inference" target="_blank" rel="noopener"><img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/></a></div>',J,W,T,x,At='<a href="https://huggingface.co/papers/2503.20314" rel="nofollow">Wan-2.1</a> by the Wan Team.',jn,le,St='<em>This report presents Wan, a comprehensive and open suite of video foundation models designed to push the boundaries of video generation. Built upon the mainstream diffusion transformer paradigm, Wan achieves significant advancements in generative capabilities through a series of innovations, including our novel VAE, scalable pre-training strategies, large-scale data curation, and automated evaluation metrics. These contributions collectively enhance the model’s performance and versatility. Specifically, Wan is characterized by four key features: Leading Performance: The 14B model of Wan, trained on a vast dataset comprising billions of images and videos, demonstrates the scaling laws of video generation with respect to both data and model size. It consistently outperforms the existing open-source models as well as state-of-the-art commercial solutions across multiple internal and external benchmarks, demonstrating a clear and significant performance superiority. Comprehensiveness: Wan offers two capable models, i.e., 1.3B and 14B parameters, for efficiency and effectiveness respectively. It also covers multiple downstream applications, including image-to-video, instruction-guided video editing, and personal video generation, encompassing up to eight tasks. Consumer-Grade Efficiency: The 1.3B model demonstrates exceptional resource efficiency, requiring only 8.19 GB VRAM, making it compatible with a wide range of consumer-grade GPUs. Openness: We open-source the entire series of Wan, including source code and all models, with the goal of fostering the growth of the video generation community. This openness seeks to significantly expand the creative possibilities of video production in the industry and provide academia with high-quality video foundation models. All the code and models are available at <a href="https://github.com/Wan-Video/Wan2.1" rel="nofollow">this https URL</a>.</em>',Zn,ie,Lt='You can find all the original Wan2.1 checkpoints under the <a href="https://huggingface.co/Wan-AI" rel="nofollow">Wan-AI</a> organization.',Wn,re,Dt="The following Wan models are supported in Diffusers:",vn,de,qt='<li><a href="https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers" rel="nofollow">Wan 2.1 T2V 1.3B</a></li> <li><a href="https://huggingface.co/Wan-AI/Wan2.1-T2V-14B-Diffusers" rel="nofollow">Wan 2.1 T2V 14B</a></li> <li><a href="https://huggingface.co/Wan-AI/Wan2.1-I2V-14B-480P-Diffusers" rel="nofollow">Wan 2.1 I2V 14B - 480P</a></li> <li><a href="https://huggingface.co/Wan-AI/Wan2.1-I2V-14B-720P-Diffusers" rel="nofollow">Wan 2.1 I2V 14B - 720P</a></li> <li><a href="https://huggingface.co/Wan-AI/Wan2.1-FLF2V-14B-720P-diffusers" rel="nofollow">Wan 2.1 FLF2V 14B - 720P</a></li> <li><a href="https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B-diffusers" rel="nofollow">Wan 2.1 VACE 1.3B</a></li> <li><a href="https://huggingface.co/Wan-AI/Wan2.1-VACE-14B-diffusers" rel="nofollow">Wan 2.1 VACE 14B</a></li> <li><a href="https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers" rel="nofollow">Wan 2.2 T2V 14B</a></li> <li><a href="https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers" rel="nofollow">Wan 2.2 I2V 14B</a></li> <li><a href="https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers" rel="nofollow">Wan 2.2 TI2V 5B</a></li>',In,S,Bn,pe,Gn,ce,Kt="The example below demonstrates how to generate a video from text optimized for memory or inference speed.",Vn,L,kn,me,xn,ue,Ot="The example below demonstrates how to use the image-to-video pipeline to generate a video using a text description, a starting frame, and an ending frame.",Cn,D,Xn,he,Rn,ge,ea="Wan VACE supports various generation techniques which achieve controllable video generation. Some of the capabilities include:",Qn,fe,na='<li>Control to Video (Depth, Pose, Sketch, Flow, Grayscale, Scribble, Layout, Boundary Box, etc.). Recommended library for preprocessing videos to obtain control videos: <a href="">huggingface/controlnet_aux</a></li> <li>Image/Video to Video (first frame, last frame, starting clip, ending clip, random clips)</li> <li>Inpainting and Outpainting</li> <li>Subject to Video (faces, object, characters, etc.)</li> <li>Composition to Video (reference anything, animate anything, swap anything, expand anything, move anything, etc.)</li>',Nn,ye,ta='The code snippets available in <a href="https://github.com/huggingface/diffusers/pull/11582" rel="nofollow">this</a> pull request demonstrate some examples of how videos can be generated with controllability signals.',Fn,Me,aa="The general rule of thumb to keep in mind when preparing inputs for the VACE pipeline is that the input images, or frames of a video that you want to use for conditioning, should have a corresponding mask that is black in color. The black mask signifies that the model will not generate new content for that area, and only use those parts for conditioning the generation process. For parts/frames that should be generated by the model, the mask should be white in color.",Yn,_e,En,Z,be,Le,sa='Wan2.1 supports LoRAs with <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.WanLoraLoaderMixin.load_lora_weights">load_lora_weights()</a>.',rt,we,De,oa="Show example code",dt,Je,pt,Te,qe,la='<a href="/docs/diffusers/main/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a> and <a href="/docs/diffusers/main/en/api/models/autoencoder_kl_wan#diffusers.AutoencoderKLWan">AutoencoderKLWan</a> supports loading from single files with <a href="/docs/diffusers/main/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a>.',ct,Ue,Ke,ia="Show example code",mt,je,ut,Oe,ra='<p>Set the <a href="/docs/diffusers/main/en/api/models/autoencoder_kl_wan#diffusers.AutoencoderKLWan">AutoencoderKLWan</a> dtype to <code>torch.float32</code> for better decoding quality.</p>',ht,en,da="<p>The number of frames per second (fps) or <code>k</code> should be calculated by <code>4 * k + 1</code>.</p>",gt,nn,pa="<p>Try lower <code>shift</code> values (<code>2.0</code> to <code>5.0</code>) for lower resolution videos and higher <code>shift</code> values (<code>7.0</code> to <code>12.0</code>) for higher resolution images.</p>",ft,tn,ca='<p>Wan 2.1 and 2.2 support using <a href="https://huggingface.co/Kijai/WanVideo_comfy/tree/main/Lightx2v" rel="nofollow">LightX2V LoRAs</a> to speed up inference. Using them on Wan 2.2 is slightly more involed. Refer to <a href="https://github.com/huggingface/diffusers/pull/12040#issuecomment-3144185272" rel="nofollow">this code snippet</a> to learn more.</p>',Hn,Ze,$n,v,We,yt,an,ma="Pipeline for text-to-video generation using Wan.",Mt,sn,ua=`This model inherits from <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`,_t,R,ve,bt,on,ha="The call function to the pipeline for generation.",wt,q,Jt,K,Ie,Tt,ln,ga="Encodes the prompt into text encoder hidden states.",zn,Be,Pn,I,Ge,Ut,rn,fa="Pipeline for image-to-video generation using Wan.",jt,dn,ya=`This model inherits from <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`,Zt,Q,Ve,Wt,pn,Ma="The call function to the pipeline for generation.",vt,O,It,ee,ke,Bt,cn,_a="Encodes the prompt into text encoder hidden states.",An,xe,Sn,B,Ce,Gt,mn,ba="Pipeline for controllable generation using Wan.",Vt,un,wa=`This model inherits from <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`,kt,N,Xe,xt,hn,Ja="The call function to the pipeline for generation.",Ct,ne,Xt,te,Re,Rt,gn,Ta="Encodes the prompt into text encoder hidden states.",Ln,Qe,Dn,G,Ne,Qt,fn,Ua="Pipeline for video-to-video generation using Wan.",Nt,yn,ja=`This model inherits from <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`,Ft,F,Fe,Yt,Mn,Za="The call function to the pipeline for generation.",Et,ae,Ht,se,Ye,$t,_n,Wa="Encodes the prompt into text encoder hidden states.",qn,Ee,Kn,z,He,zt,bn,va="Output class for Wan pipelines.",On,$e,et,Un,nt;return W=new $({props:{title:"Wan2.1",local:"wan21",headingTag:"h1"}}),S=new Xa({props:{warning:!1,$$slots:{default:[Qa]},$$scope:{ctx:U}}}),pe=new $({props:{title:"Text-to-Video Generation",local:"text-to-video-generation",headingTag:"h3"}}),L=new Ia({props:{id:"T2V usage",options:["T2V memory","T2V inference speed"],$$slots:{default:[Ya]},$$scope:{ctx:U}}}),me=new $({props:{title:"First-Last-Frame-to-Video Generation",local:"first-last-frame-to-video-generation",headingTag:"h3"}}),D=new Ia({props:{id:"FLF2V usage",options:["usage"],$$slots:{default:[Ha]},$$scope:{ctx:U}}}),he=new $({props:{title:"Any-to-Video Controllable Generation",local:"any-to-video-controllable-generation",headingTag:"h3"}}),_e=new $({props:{title:"Notes",local:"notes",headingTag:"h2"}}),Je=new A({props:{code:"JTIzJTIwcGlwJTIwaW5zdGFsbCUyMGZ0ZnklMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkaWZmdXNlcnMlMjBpbXBvcnQlMjBBdXRvTW9kZWwlMkMlMjBXYW5QaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMuc2NoZWR1bGVycy5zY2hlZHVsaW5nX3VuaXBjX211bHRpc3RlcCUyMGltcG9ydCUyMFVuaVBDTXVsdGlzdGVwU2NoZWR1bGVyJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUwQSUwQXZhZSUyMCUzRCUyMEF1dG9Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyV2FuLUFJJTJGV2FuMi4xLVQyVi0xLjNCLURpZmZ1c2VycyUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnZhZSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQzMiUwQSklMEFwaXBlbGluZSUyMCUzRCUyMFdhblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjA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JTIwaW50byUyMHRoZSUyMHdhdGVyJTJDJTIwYW5kJTIwZW1lcmdlcyUyQyUyMGFzJTIwdGhlJTIwY2FtZXJhJTIwem9vbXMlMjBpbiUyMCUwQWZvciUyMGElMjBjbG9zZS11cC4lMjBXYXRlciUyMHNwbGFzaGVzJTIwYmVycnklMjBidXNoZXMlMjBuZWFyYnklMkMlMjB3aGlsZSUyMG1vc3MlMkMlMjBzbm93JTJDJTIwYW5kJTIwbGVhdmVzJTIwYmxhbmtldCUyMHRoZSUyMGdyb3VuZC4lMjAlMEFCaXJjaCUyMHRyZWVzJTIwYW5kJTIwYSUyMGxpZ2h0JTIwYmx1ZSUyMHNreSUyMGZyYW1lJTIwdGhlJTIwc2NlbmUlMkMlMjB3aXRoJTIwZmVybnMlMjBpbiUyMHRoZSUyMGZvcmVncm91bmQuJTIwU2lkZSUyMGxpZ2h0aW5nJTIwY2FzdHMlMjBkeW5hbWljJTIwJTBBc2hhZG93cyUyMGFuZCUyMHdhcm0lMjBoaWdobGlnaHRzLiUyME1lZGl1bSUyMGNvbXBvc2l0aW9uJTJDJTIwZnJvbnQlMjB2aWV3JTJDJTIwbG93JTIwYW5nbGUlMkMlMjB3aXRoJTIwZGVwdGglMjBvZiUyMGZpZWxkLiUwQSUyMiUyMiUyMiUwQSUwQW91dHB1dCUyMCUzRCUyMHBpcGVsaW5lKCUwQSUyMCUyMCUyMCUyMHByb21wdCUzRHByb21wdCUyQyUwQSUyMCUyMCUyMCUyMG51bV9mcmFtZXMlM0Q4MSUyQyUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNENS4wJTJDJTBBKS5mcmFtZXMlNUIwJTVEJTBBZXhwb3J0X3RvX3ZpZGVvKG91dHB1dCUyQyUyMCUyMm91dHB1dC5tcDQlMjIlMkMlMjBmcHMlM0QxNik=",highlighted:`<span class="hljs-comment"># pip install ftfy</span>
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoModel, WanPipeline
<span class="hljs-keyword">from</span> diffusers.schedulers.scheduling_unipc_multistep <span class="hljs-keyword">import</span> UniPCMultistepScheduler
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video

vae = AutoModel.from_pretrained(
    <span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-1.3B-Diffusers&quot;</span>, subfolder=<span class="hljs-string">&quot;vae&quot;</span>, torch_dtype=torch.float32
)
pipeline = WanPipeline.from_pretrained(
    <span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-1.3B-Diffusers&quot;</span>, vae=vae, torch_dtype=torch.bfloat16
)
pipeline.scheduler = UniPCMultistepScheduler.from_config(
    pipeline.scheduler.config, flow_shift=<span class="hljs-number">5.0</span>
)
pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipeline.load_lora_weights(<span class="hljs-string">&quot;benjamin-paine/steamboat-willie-1.3b&quot;</span>, adapter_name=<span class="hljs-string">&quot;steamboat-willie&quot;</span>)
pipeline.set_adapters(<span class="hljs-string">&quot;steamboat-willie&quot;</span>)

pipeline.enable_model_cpu_offload()

<span class="hljs-comment"># use &quot;steamboat willie style&quot; to trigger the LoRA</span>
prompt = <span class="hljs-string">&quot;&quot;&quot;
steamboat willie style, golden era animation, The camera rushes from far to near in a low-angle shot, 
revealing a white ferret on a log. It plays, leaps into the water, and emerges, as the camera zooms in 
for a close-up. Water splashes berry bushes nearby, while moss, snow, and leaves blanket the ground. 
Birch trees and a light blue sky frame the scene, with ferns in the foreground. Side lighting casts dynamic 
shadows and warm highlights. Medium composition, front view, low angle, with depth of field.
&quot;&quot;&quot;</span>

output = pipeline(
    prompt=prompt,
    num_frames=<span class="hljs-number">81</span>,
    guidance_scale=<span class="hljs-number">5.0</span>,
).frames[<span class="hljs-number">0</span>]
export_to_video(output, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,wrap:!1}}),je=new A({props:{code:"JTIzJTIwcGlwJ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JhbnNmb3JtZXIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKQ==",highlighted:`<span class="hljs-comment"># pip install ftfy</span>
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> WanPipeline, WanTransformer3DModel, AutoencoderKLWan

vae = AutoencoderKLWan.from_single_file(
    <span class="hljs-string">&quot;https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/blob/main/split_files/vae/wan_2.1_vae.safetensors&quot;</span>
)
transformer = WanTransformer3DModel.from_single_file(
    <span class="hljs-string">&quot;https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/blob/main/split_files/diffusion_models/wan2.1_t2v_1.3B_bf16.safetensors&quot;</span>,
    torch_dtype=torch.bfloat16
)
pipeline = WanPipeline.from_pretrained(
    <span class="hljs-string">&quot;Wan-AI/Wan2.1-T2V-1.3B-Diffusers&quot;</span>,
    vae=vae,
    transformer=transformer,
    torch_dtype=torch.bfloat16
)`,wrap:!1}}),Ze=new $({props:{title:"WanPipeline",local:"diffusers.WanPipeline",headingTag:"h2"}}),We=new X({props:{name:"class diffusers.WanPipeline",anchor:"diffusers.WanPipeline",parameters:[{name:"tokenizer",val:": AutoTokenizer"},{name:"text_encoder",val:": UMT5EncoderModel"},{name:"vae",val:": AutoencoderKLWan"},{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"transformer",val:": typing.Optional[diffusers.models.transformers.transformer_wan.WanTransformer3DModel] = None"},{name:"transformer_2",val:": typing.Optional[diffusers.models.transformers.transformer_wan.WanTransformer3DModel] = None"},{name:"boundary_ratio",val:": typing.Optional[float] = None"},{name:"expand_timesteps",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.WanPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>T5Tokenizer</code>) &#x2014;
Tokenizer from <a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5Tokenizer" rel="nofollow">T5</a>,
specifically the <a href="https://huggingface.co/google/umt5-xxl" rel="nofollow">google/umt5-xxl</a> variant.`,name:"tokenizer"},{anchor:"diffusers.WanPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>T5EncoderModel</code>) &#x2014;
<a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5EncoderModel" rel="nofollow">T5</a>, specifically
the <a href="https://huggingface.co/google/umt5-xxl" rel="nofollow">google/umt5-xxl</a> variant.`,name:"text_encoder"},{anchor:"diffusers.WanPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a>) &#x2014;
Conditional Transformer to denoise the input latents.`,name:"transformer"},{anchor:"diffusers.WanPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/unipc#diffusers.UniPCMultistepScheduler">UniPCMultistepScheduler</a>) &#x2014;
A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.WanPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoder_kl_wan#diffusers.AutoencoderKLWan">AutoencoderKLWan</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode videos to and from latent representations.`,name:"vae"},{anchor:"diffusers.WanPipeline.transformer_2",description:`<strong>transformer_2</strong> (<a href="/docs/diffusers/main/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a>, <em>optional</em>) &#x2014;
Conditional Transformer to denoise the input latents during the low-noise stage. If provided, enables
two-stage denoising where <code>transformer</code> handles high-noise stages and <code>transformer_2</code> handles low-noise
stages. If not provided, only <code>transformer</code> is used.`,name:"transformer_2"},{anchor:"diffusers.WanPipeline.boundary_ratio",description:`<strong>boundary_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Ratio of total timesteps to use as the boundary for switching between transformers in two-stage denoising.
The actual boundary timestep is calculated as <code>boundary_ratio * num_train_timesteps</code>. When provided,
<code>transformer</code> handles timesteps &gt;= boundary_timestep and <code>transformer_2</code> handles timesteps &lt;
boundary_timestep. If <code>None</code>, only <code>transformer</code> is used for the entire denoising process.`,name:"boundary_ratio"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan.py#L95"}}),ve=new X({props:{name:"__call__",anchor:"diffusers.WanPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"height",val:": int = 480"},{name:"width",val:": int = 832"},{name:"num_frames",val:": int = 81"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 5.0"},{name:"guidance_scale_2",val:": typing.Optional[float] = None"},{name:"num_videos_per_prompt",val:": typing.Optional[int] = 1"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'np'"},{name:"return_dict",val:": bool = True"},{name:"attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"callback_on_step_end",val:": typing.Union[typing.Callable[[int, int, typing.Dict], NoneType], diffusers.callbacks.PipelineCallback, diffusers.callbacks.MultiPipelineCallbacks, NoneType] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 512"}],parametersDescription:[{anchor:"diffusers.WanPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide the image generation. If not defined, pass <code>prompt_embeds</code> instead.`,name:"prompt"},{anchor:"diffusers.WanPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to avoid during image generation. If not defined, pass <code>negative_prompt_embeds</code>
instead. Ignored when not using guidance (<code>guidance_scale</code> &lt; <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.WanPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, defaults to <code>480</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.WanPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, defaults to <code>832</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.WanPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, defaults to <code>81</code>) &#x2014;
The number of frames in the generated video.`,name:"num_frames"},{anchor:"diffusers.WanPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, defaults to <code>50</code>) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.WanPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, defaults to <code>5.0</code>) &#x2014;
Guidance scale as defined in <a href="https://huggingface.co/papers/2207.12598" rel="nofollow">Classifier-Free Diffusion
Guidance</a>. <code>guidance_scale</code> is defined as <code>w</code> of equation 2.
of <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen Paper</a>. Guidance scale is enabled by setting
<code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to
the text <code>prompt</code>, usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.WanPipeline.__call__.guidance_scale_2",description:`<strong>guidance_scale_2</strong> (<code>float</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Guidance scale for the low-noise stage transformer (<code>transformer_2</code>). If <code>None</code> and the pipeline&#x2019;s
<code>boundary_ratio</code> is not None, uses the same value as <code>guidance_scale</code>. Only used when <code>transformer_2</code>
and the pipeline&#x2019;s <code>boundary_ratio</code> are not None.`,name:"guidance_scale_2"},{anchor:"diffusers.WanPipeline.__call__.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.WanPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.WanPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.WanPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.WanPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;np&quot;</code>) &#x2014;
The output format of the generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.WanPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>WanPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.WanPipeline.__call__.attention_kwargs",description:`<strong>attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"attention_kwargs"},{anchor:"diffusers.WanPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <code>PipelineCallback</code>, <code>MultiPipelineCallbacks</code>, <em>optional</em>) &#x2014;
A function or a subclass of <code>PipelineCallback</code> or <code>MultiPipelineCallbacks</code> that is called at the end of
each denoising step during the inference. with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a
list of all tensors as specified by <code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.WanPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) &#x2014;
The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list
will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the
<code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.WanPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code>, defaults to <code>512</code>) &#x2014;
The maximum sequence length of the text encoder. If the prompt is longer than this, it will be
truncated. If the prompt is shorter, it will be padded to this length.`,name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan.py#L380",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <code>WanPipelineOutput</code> is returned, otherwise a <code>tuple</code> is returned where
the first element is a list with the generated images and the second element is a list of <code>bool</code>s
indicating whether the corresponding generated image contains “not-safe-for-work” (nsfw) content.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~WanPipelineOutput</code> or <code>tuple</code></p>
`}}),q=new it({props:{anchor:"diffusers.WanPipeline.__call__.example",$$slots:{default:[$a]},$$scope:{ctx:U}}}),Ie=new X({props:{name:"encode_prompt",anchor:"diffusers.WanPipeline.encode_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"num_videos_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"max_sequence_length",val:": int = 226"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"dtype",val:": typing.Optional[torch.dtype] = None"}],parametersDescription:[{anchor:"diffusers.WanPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded`,name:"prompt"},{anchor:"diffusers.WanPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.WanPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use classifier free guidance or not.`,name:"do_classifier_free_guidance"},{anchor:"diffusers.WanPipeline.encode_prompt.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of videos that should be generated per prompt. torch device to place the resulting embeddings on`,name:"num_videos_per_prompt"},{anchor:"diffusers.WanPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.WanPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.WanPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>, <em>optional</em>):
torch device`,name:"device"},{anchor:"diffusers.WanPipeline.encode_prompt.dtype",description:`<strong>dtype</strong> &#x2014; (<code>torch.dtype</code>, <em>optional</em>):
torch dtype`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan.py#L198"}}),Be=new $({props:{title:"WanImageToVideoPipeline",local:"diffusers.WanImageToVideoPipeline",headingTag:"h2"}}),Ge=new X({props:{name:"class diffusers.WanImageToVideoPipeline",anchor:"diffusers.WanImageToVideoPipeline",parameters:[{name:"tokenizer",val:": AutoTokenizer"},{name:"text_encoder",val:": UMT5EncoderModel"},{name:"vae",val:": AutoencoderKLWan"},{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"image_processor",val:": CLIPImageProcessor = None"},{name:"image_encoder",val:": CLIPVisionModel = None"},{name:"transformer",val:": WanTransformer3DModel = None"},{name:"transformer_2",val:": WanTransformer3DModel = None"},{name:"boundary_ratio",val:": typing.Optional[float] = None"},{name:"expand_timesteps",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.WanImageToVideoPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>T5Tokenizer</code>) &#x2014;
Tokenizer from <a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5Tokenizer" rel="nofollow">T5</a>,
specifically the <a href="https://huggingface.co/google/umt5-xxl" rel="nofollow">google/umt5-xxl</a> variant.`,name:"tokenizer"},{anchor:"diffusers.WanImageToVideoPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>T5EncoderModel</code>) &#x2014;
<a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5EncoderModel" rel="nofollow">T5</a>, specifically
the <a href="https://huggingface.co/google/umt5-xxl" rel="nofollow">google/umt5-xxl</a> variant.`,name:"text_encoder"},{anchor:"diffusers.WanImageToVideoPipeline.image_encoder",description:`<strong>image_encoder</strong> (<code>CLIPVisionModel</code>) &#x2014;
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPVisionModel" rel="nofollow">CLIP</a>, specifically
the
<a href="https://github.com/mlfoundations/open_clip/blob/main/docs/PRETRAINED.md#vit-h14-xlm-roberta-large" rel="nofollow">clip-vit-huge-patch14</a>
variant.`,name:"image_encoder"},{anchor:"diffusers.WanImageToVideoPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a>) &#x2014;
Conditional Transformer to denoise the input latents.`,name:"transformer"},{anchor:"diffusers.WanImageToVideoPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/unipc#diffusers.UniPCMultistepScheduler">UniPCMultistepScheduler</a>) &#x2014;
A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.WanImageToVideoPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoder_kl_wan#diffusers.AutoencoderKLWan">AutoencoderKLWan</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode videos to and from latent representations.`,name:"vae"},{anchor:"diffusers.WanImageToVideoPipeline.transformer_2",description:`<strong>transformer_2</strong> (<a href="/docs/diffusers/main/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a>, <em>optional</em>) &#x2014;
Conditional Transformer to denoise the input latents during the low-noise stage. In two-stage denoising,
<code>transformer</code> handles high-noise stages and <code>transformer_2</code> handles low-noise stages. If not provided, only
<code>transformer</code> is used.`,name:"transformer_2"},{anchor:"diffusers.WanImageToVideoPipeline.boundary_ratio",description:`<strong>boundary_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Ratio of total timesteps to use as the boundary for switching between transformers in two-stage denoising.
The actual boundary timestep is calculated as <code>boundary_ratio * num_train_timesteps</code>. When provided,
<code>transformer</code> handles timesteps &gt;= boundary_timestep and <code>transformer_2</code> handles timesteps &lt;
boundary_timestep. If <code>None</code>, only <code>transformer</code> is used for the entire denoising process.`,name:"boundary_ratio"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan_i2v.py#L127"}}),Ve=new X({props:{name:"__call__",anchor:"diffusers.WanImageToVideoPipeline.__call__",parameters:[{name:"image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor]]"},{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"height",val:": int = 480"},{name:"width",val:": int = 832"},{name:"num_frames",val:": int = 81"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 5.0"},{name:"guidance_scale_2",val:": typing.Optional[float] = None"},{name:"num_videos_per_prompt",val:": typing.Optional[int] = 1"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"image_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"last_image",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'np'"},{name:"return_dict",val:": bool = True"},{name:"attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"callback_on_step_end",val:": typing.Union[typing.Callable[[int, int, typing.Dict], NoneType], diffusers.callbacks.PipelineCallback, diffusers.callbacks.MultiPipelineCallbacks, NoneType] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 512"}],parametersDescription:[{anchor:"diffusers.WanImageToVideoPipeline.__call__.image",description:`<strong>image</strong> (<code>PipelineImageInput</code>) &#x2014;
The input image to condition the generation on. Must be an image, a list of images or a <code>torch.Tensor</code>.`,name:"image"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>.
instead.`,name:"prompt"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, defaults to <code>480</code>) &#x2014;
The height of the generated video.`,name:"height"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, defaults to <code>832</code>) &#x2014;
The width of the generated video.`,name:"width"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, defaults to <code>81</code>) &#x2014;
The number of frames in the generated video.`,name:"num_frames"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, defaults to <code>50</code>) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, defaults to <code>5.0</code>) &#x2014;
Guidance scale as defined in <a href="https://huggingface.co/papers/2207.12598" rel="nofollow">Classifier-Free Diffusion
Guidance</a>. <code>guidance_scale</code> is defined as <code>w</code> of equation 2.
of <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen Paper</a>. Guidance scale is enabled by setting
<code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to
the text <code>prompt</code>, usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.guidance_scale_2",description:`<strong>guidance_scale_2</strong> (<code>float</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Guidance scale for the low-noise stage transformer (<code>transformer_2</code>). If <code>None</code> and the pipeline&#x2019;s
<code>boundary_ratio</code> is not None, uses the same value as <code>guidance_scale</code>. Only used when <code>transformer_2</code>
and the pipeline&#x2019;s <code>boundary_ratio</code> are not None.`,name:"guidance_scale_2"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.image_embeds",description:`<strong>image_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated image embeddings. Can be used to easily tweak image inputs (weighting). If not provided,
image embeddings are generated from the <code>image</code> input argument.`,name:"image_embeds"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;np&quot;</code>) &#x2014;
The output format of the generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>WanPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.attention_kwargs",description:`<strong>attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"attention_kwargs"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <code>PipelineCallback</code>, <code>MultiPipelineCallbacks</code>, <em>optional</em>) &#x2014;
A function or a subclass of <code>PipelineCallback</code> or <code>MultiPipelineCallbacks</code> that is called at the end of
each denoising step during the inference. with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a
list of all tensors as specified by <code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) &#x2014;
The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list
will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the
<code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.WanImageToVideoPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code>, defaults to <code>512</code>) &#x2014;
The maximum sequence length of the text encoder. If the prompt is longer than this, it will be
truncated. If the prompt is shorter, it will be padded to this length.`,name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan_i2v.py#L507",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <code>WanPipelineOutput</code> is returned, otherwise a <code>tuple</code> is returned where
the first element is a list with the generated images and the second element is a list of <code>bool</code>s
indicating whether the corresponding generated image contains “not-safe-for-work” (nsfw) content.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~WanPipelineOutput</code> or <code>tuple</code></p>
`}}),O=new it({props:{anchor:"diffusers.WanImageToVideoPipeline.__call__.example",$$slots:{default:[za]},$$scope:{ctx:U}}}),ke=new X({props:{name:"encode_prompt",anchor:"diffusers.WanImageToVideoPipeline.encode_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"num_videos_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"max_sequence_length",val:": int = 226"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"dtype",val:": typing.Optional[torch.dtype] = None"}],parametersDescription:[{anchor:"diffusers.WanImageToVideoPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded`,name:"prompt"},{anchor:"diffusers.WanImageToVideoPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.WanImageToVideoPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use classifier free guidance or not.`,name:"do_classifier_free_guidance"},{anchor:"diffusers.WanImageToVideoPipeline.encode_prompt.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of videos that should be generated per prompt. torch device to place the resulting embeddings on`,name:"num_videos_per_prompt"},{anchor:"diffusers.WanImageToVideoPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.WanImageToVideoPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.WanImageToVideoPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>, <em>optional</em>):
torch device`,name:"device"},{anchor:"diffusers.WanImageToVideoPipeline.encode_prompt.dtype",description:`<strong>dtype</strong> &#x2014; (<code>torch.dtype</code>, <em>optional</em>):
torch dtype`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan_i2v.py#L251"}}),xe=new $({props:{title:"WanVACEPipeline",local:"diffusers.WanVACEPipeline",headingTag:"h2"}}),Ce=new X({props:{name:"class diffusers.WanVACEPipeline",anchor:"diffusers.WanVACEPipeline",parameters:[{name:"tokenizer",val:": AutoTokenizer"},{name:"text_encoder",val:": UMT5EncoderModel"},{name:"transformer",val:": WanVACETransformer3DModel"},{name:"vae",val:": AutoencoderKLWan"},{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"}],parametersDescription:[{anchor:"diffusers.WanVACEPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>T5Tokenizer</code>) &#x2014;
Tokenizer from <a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5Tokenizer" rel="nofollow">T5</a>,
specifically the <a href="https://huggingface.co/google/umt5-xxl" rel="nofollow">google/umt5-xxl</a> variant.`,name:"tokenizer"},{anchor:"diffusers.WanVACEPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>T5EncoderModel</code>) &#x2014;
<a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5EncoderModel" rel="nofollow">T5</a>, specifically
the <a href="https://huggingface.co/google/umt5-xxl" rel="nofollow">google/umt5-xxl</a> variant.`,name:"text_encoder"},{anchor:"diffusers.WanVACEPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a>) &#x2014;
Conditional Transformer to denoise the input latents.`,name:"transformer"},{anchor:"diffusers.WanVACEPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/unipc#diffusers.UniPCMultistepScheduler">UniPCMultistepScheduler</a>) &#x2014;
A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.WanVACEPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoder_kl_wan#diffusers.AutoencoderKLWan">AutoencoderKLWan</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode videos to and from latent representations.`,name:"vae"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan_vace.py#L141"}}),Xe=new X({props:{name:"__call__",anchor:"diffusers.WanVACEPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"video",val:": typing.Optional[typing.List[typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor]]]] = None"},{name:"mask",val:": typing.Optional[typing.List[typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor]]]] = None"},{name:"reference_images",val:": typing.Optional[typing.List[typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor]]]] = None"},{name:"conditioning_scale",val:": typing.Union[float, typing.List[float], torch.Tensor] = 1.0"},{name:"height",val:": int = 480"},{name:"width",val:": int = 832"},{name:"num_frames",val:": int = 81"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 5.0"},{name:"num_videos_per_prompt",val:": typing.Optional[int] = 1"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'np'"},{name:"return_dict",val:": bool = True"},{name:"attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"callback_on_step_end",val:": typing.Union[typing.Callable[[int, int, typing.Dict], NoneType], diffusers.callbacks.PipelineCallback, diffusers.callbacks.MultiPipelineCallbacks, NoneType] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 512"}],parametersDescription:[{anchor:"diffusers.WanVACEPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>
instead.`,name:"prompt"},{anchor:"diffusers.WanVACEPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.WanVACEPipeline.__call__.video",description:`<strong>video</strong> (<code>List[PIL.Image.Image]</code>, <em>optional</em>) &#x2014;
The input video or videos to be used as a starting point for the generation. The video should be a list
of PIL images, a numpy array, or a torch tensor. Currently, the pipeline only supports generating one
video at a time.`,name:"video"},{anchor:"diffusers.WanVACEPipeline.__call__.mask",description:`<strong>mask</strong> (<code>List[PIL.Image.Image]</code>, <em>optional</em>) &#x2014;
The input mask defines which video regions to condition on and which to generate. Black areas in the
mask indicate conditioning regions, while white areas indicate regions for generation. The mask should
be a list of PIL images, a numpy array, or a torch tensor. Currently supports generating a single video
at a time.`,name:"mask"},{anchor:"diffusers.WanVACEPipeline.__call__.reference_images",description:`<strong>reference_images</strong> (<code>List[PIL.Image.Image]</code>, <em>optional</em>) &#x2014;
A list of one or more reference images as extra conditioning for the generation. For example, if you
are trying to inpaint a video to change the character, you can pass reference images of the new
character here. Refer to the Diffusers <a href="https://github.com/huggingface/diffusers/pull/11582" rel="nofollow">examples</a>
and original <a href="https://github.com/ali-vilab/VACE/blob/0897c6d055d7d9ea9e191dce763006664d9780f8/UserGuide.md" rel="nofollow">user
guide</a>
for a full list of supported tasks and use cases.`,name:"reference_images"},{anchor:"diffusers.WanVACEPipeline.__call__.conditioning_scale",description:`<strong>conditioning_scale</strong> (<code>float</code>, <code>List[float]</code>, <code>torch.Tensor</code>, defaults to <code>1.0</code>) &#x2014;
The conditioning scale to be applied when adding the control conditioning latent stream to the
denoising latent stream in each control layer of the model. If a float is provided, it will be applied
uniformly to all layers. If a list or tensor is provided, it should have the same length as the number
of control layers in the model (<code>len(transformer.config.vace_layers)</code>).`,name:"conditioning_scale"},{anchor:"diffusers.WanVACEPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, defaults to <code>480</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.WanVACEPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, defaults to <code>832</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.WanVACEPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, defaults to <code>81</code>) &#x2014;
The number of frames in the generated video.`,name:"num_frames"},{anchor:"diffusers.WanVACEPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, defaults to <code>50</code>) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.WanVACEPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, defaults to <code>5.0</code>) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.WanVACEPipeline.__call__.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.WanVACEPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.WanVACEPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.WanVACEPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.WanVACEPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;np&quot;</code>) &#x2014;
The output format of the generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.WanVACEPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>WanPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.WanVACEPipeline.__call__.attention_kwargs",description:`<strong>attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"attention_kwargs"},{anchor:"diffusers.WanVACEPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <code>PipelineCallback</code>, <code>MultiPipelineCallbacks</code>, <em>optional</em>) &#x2014;
A function or a subclass of <code>PipelineCallback</code> or <code>MultiPipelineCallbacks</code> that is called at the end of
each denoising step during the inference. with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a
list of all tensors as specified by <code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.WanVACEPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) &#x2014;
The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list
will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the
<code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.WanVACEPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code>, defaults to <code>512</code>) &#x2014;
The maximum sequence length of the text encoder. If the prompt is longer than this, it will be
truncated. If the prompt is shorter, it will be padded to this length.`,name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan_vace.py#L656",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <code>WanPipelineOutput</code> is returned, otherwise a <code>tuple</code> is returned where
the first element is a list with the generated images and the second element is a list of <code>bool</code>s
indicating whether the corresponding generated image contains “not-safe-for-work” (nsfw) content.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~WanPipelineOutput</code> or <code>tuple</code></p>
`}}),ne=new it({props:{anchor:"diffusers.WanVACEPipeline.__call__.example",$$slots:{default:[Pa]},$$scope:{ctx:U}}}),Re=new X({props:{name:"encode_prompt",anchor:"diffusers.WanVACEPipeline.encode_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"num_videos_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"max_sequence_length",val:": int = 226"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"dtype",val:": typing.Optional[torch.dtype] = None"}],parametersDescription:[{anchor:"diffusers.WanVACEPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded`,name:"prompt"},{anchor:"diffusers.WanVACEPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.WanVACEPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use classifier free guidance or not.`,name:"do_classifier_free_guidance"},{anchor:"diffusers.WanVACEPipeline.encode_prompt.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of videos that should be generated per prompt. torch device to place the resulting embeddings on`,name:"num_videos_per_prompt"},{anchor:"diffusers.WanVACEPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.WanVACEPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.WanVACEPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>, <em>optional</em>):
torch device`,name:"device"},{anchor:"diffusers.WanVACEPipeline.encode_prompt.dtype",description:`<strong>dtype</strong> &#x2014; (<code>torch.dtype</code>, <em>optional</em>):
torch dtype`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan_vace.py#L231"}}),Qe=new $({props:{title:"WanVideoToVideoPipeline",local:"diffusers.WanVideoToVideoPipeline",headingTag:"h2"}}),Ne=new X({props:{name:"class diffusers.WanVideoToVideoPipeline",anchor:"diffusers.WanVideoToVideoPipeline",parameters:[{name:"tokenizer",val:": AutoTokenizer"},{name:"text_encoder",val:": UMT5EncoderModel"},{name:"transformer",val:": WanTransformer3DModel"},{name:"vae",val:": AutoencoderKLWan"},{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"}],parametersDescription:[{anchor:"diffusers.WanVideoToVideoPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>T5Tokenizer</code>) &#x2014;
Tokenizer from <a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5Tokenizer" rel="nofollow">T5</a>,
specifically the <a href="https://huggingface.co/google/umt5-xxl" rel="nofollow">google/umt5-xxl</a> variant.`,name:"tokenizer"},{anchor:"diffusers.WanVideoToVideoPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>T5EncoderModel</code>) &#x2014;
<a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5EncoderModel" rel="nofollow">T5</a>, specifically
the <a href="https://huggingface.co/google/umt5-xxl" rel="nofollow">google/umt5-xxl</a> variant.`,name:"text_encoder"},{anchor:"diffusers.WanVideoToVideoPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a>) &#x2014;
Conditional Transformer to denoise the input latents.`,name:"transformer"},{anchor:"diffusers.WanVideoToVideoPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/unipc#diffusers.UniPCMultistepScheduler">UniPCMultistepScheduler</a>) &#x2014;
A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.WanVideoToVideoPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoder_kl_wan#diffusers.AutoencoderKLWan">AutoencoderKLWan</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode videos to and from latent representations.`,name:"vae"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan_video2video.py#L174"}}),Fe=new X({props:{name:"__call__",anchor:"diffusers.WanVideoToVideoPipeline.__call__",parameters:[{name:"video",val:": typing.List[PIL.Image.Image] = None"},{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"height",val:": int = 480"},{name:"width",val:": int = 832"},{name:"num_inference_steps",val:": int = 50"},{name:"timesteps",val:": typing.Optional[typing.List[int]] = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"strength",val:": float = 0.8"},{name:"num_videos_per_prompt",val:": typing.Optional[int] = 1"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'np'"},{name:"return_dict",val:": bool = True"},{name:"attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"callback_on_step_end",val:": typing.Union[typing.Callable[[int, int, typing.Dict], NoneType], diffusers.callbacks.PipelineCallback, diffusers.callbacks.MultiPipelineCallbacks, NoneType] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 512"}],parametersDescription:[{anchor:"diffusers.WanVideoToVideoPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>
instead.`,name:"prompt"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, defaults to <code>480</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, defaults to <code>832</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, defaults to <code>81</code>) &#x2014;
The number of frames in the generated video.`,name:"num_frames"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, defaults to <code>50</code>) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, defaults to <code>5.0</code>) &#x2014;
Guidance scale as defined in <a href="https://huggingface.co/papers/2207.12598" rel="nofollow">Classifier-Free Diffusion
Guidance</a>. <code>guidance_scale</code> is defined as <code>w</code> of equation 2.
of <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen Paper</a>. Guidance scale is enabled by setting
<code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to
the text <code>prompt</code>, usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.strength",description:`<strong>strength</strong> (<code>float</code>, defaults to <code>0.8</code>) &#x2014;
Higher strength leads to more differences between original image and generated video.`,name:"strength"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;np&quot;</code>) &#x2014;
The output format of the generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>WanPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.attention_kwargs",description:`<strong>attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"attention_kwargs"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <code>PipelineCallback</code>, <code>MultiPipelineCallbacks</code>, <em>optional</em>) &#x2014;
A function or a subclass of <code>PipelineCallback</code> or <code>MultiPipelineCallbacks</code> that is called at the end of
each denoising step during the inference. with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a
list of all tensors as specified by <code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) &#x2014;
The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list
will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the
<code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.WanVideoToVideoPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code>, defaults to <code>512</code>) &#x2014;
The maximum sequence length of the text encoder. If the prompt is longer than this, it will be
truncated. If the prompt is shorter, it will be padded to this length.`,name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan_video2video.py#L479",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <code>WanPipelineOutput</code> is returned, otherwise a <code>tuple</code> is returned where
the first element is a list with the generated images and the second element is a list of <code>bool</code>s
indicating whether the corresponding generated image contains “not-safe-for-work” (nsfw) content.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~WanPipelineOutput</code> or <code>tuple</code></p>
`}}),ae=new it({props:{anchor:"diffusers.WanVideoToVideoPipeline.__call__.example",$$slots:{default:[Aa]},$$scope:{ctx:U}}}),Ye=new X({props:{name:"encode_prompt",anchor:"diffusers.WanVideoToVideoPipeline.encode_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"num_videos_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"max_sequence_length",val:": int = 226"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"dtype",val:": typing.Optional[torch.dtype] = None"}],parametersDescription:[{anchor:"diffusers.WanVideoToVideoPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded`,name:"prompt"},{anchor:"diffusers.WanVideoToVideoPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.WanVideoToVideoPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use classifier free guidance or not.`,name:"do_classifier_free_guidance"},{anchor:"diffusers.WanVideoToVideoPipeline.encode_prompt.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of videos that should be generated per prompt. torch device to place the resulting embeddings on`,name:"num_videos_per_prompt"},{anchor:"diffusers.WanVideoToVideoPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.WanVideoToVideoPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.WanVideoToVideoPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>, <em>optional</em>):
torch device`,name:"device"},{anchor:"diffusers.WanVideoToVideoPipeline.encode_prompt.dtype",description:`<strong>dtype</strong> &#x2014; (<code>torch.dtype</code>, <em>optional</em>):
torch dtype`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_wan_video2video.py#L264"}}),Ee=new $({props:{title:"WanPipelineOutput",local:"diffusers.pipelines.wan.pipeline_output.WanPipelineOutput",headingTag:"h2"}}),He=new X({props:{name:"class diffusers.pipelines.wan.pipeline_output.WanPipelineOutput",anchor:"diffusers.pipelines.wan.pipeline_output.WanPipelineOutput",parameters:[{name:"frames",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.pipelines.wan.pipeline_output.WanPipelineOutput.frames",description:`<strong>frames</strong> (<code>torch.Tensor</code>, <code>np.ndarray</code>, or List[List[PIL.Image.Image]]) &#x2014;
List of video outputs - It can be a nested list of length <code>batch_size,</code> with each sub-list containing
denoised PIL image sequences of length <code>num_frames.</code> It can also be a NumPy array or Torch tensor of shape
<code>(batch_size, num_frames, channels, height, width)</code>.`,name:"frames"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/wan/pipeline_output.py#L8"}}),$e=new Ra({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/wan.md"}}),{c(){t=c("meta"),w=o(),r=c("p"),p=o(),u=c("div"),u.innerHTML=a,J=o(),g(W.$$.fragment),T=o(),x=c("p"),x.innerHTML=At,jn=o(),le=c("p"),le.innerHTML=St,Zn=o(),ie=c("p"),ie.innerHTML=Lt,Wn=o(),re=c("p"),re.textContent=Dt,vn=o(),de=c("ul"),de.innerHTML=qt,In=o(),g(S.$$.fragment),Bn=o(),g(pe.$$.fragment),Gn=o(),ce=c("p"),ce.textContent=Kt,Vn=o(),g(L.$$.fragment),kn=o(),g(me.$$.fragment),xn=o(),ue=c("p"),ue.textContent=Ot,Cn=o(),g(D.$$.fragment),Xn=o(),g(he.$$.fragment),Rn=o(),ge=c("p"),ge.textContent=ea,Qn=o(),fe=c("ul"),fe.innerHTML=na,Nn=o(),ye=c("p"),ye.innerHTML=ta,Fn=o(),Me=c("p"),Me.textContent=aa,Yn=o(),g(_e.$$.fragment),En=o(),Z=c("ul"),be=c("li"),Le=c("p"),Le.innerHTML=sa,rt=o(),we=c("details"),De=c("summary"),De.textContent=oa,dt=o(),g(Je.$$.fragment),pt=o(),Te=c("li"),qe=c("p"),qe.innerHTML=la,ct=o(),Ue=c("details"),Ke=c("summary"),Ke.textContent=ia,mt=o(),g(je.$$.fragment),ut=o(),Oe=c("li"),Oe.innerHTML=ra,ht=o(),en=c("li"),en.innerHTML=da,gt=o(),nn=c("li"),nn.innerHTML=pa,ft=o(),tn=c("li"),tn.innerHTML=ca,Hn=o(),g(Ze.$$.fragment),$n=o(),v=c("div"),g(We.$$.fragment),yt=o(),an=c("p"),an.textContent=ma,Mt=o(),sn=c("p"),sn.innerHTML=ua,_t=o(),R=c("div"),g(ve.$$.fragment),bt=o(),on=c("p"),on.textContent=ha,wt=o(),g(q.$$.fragment),Jt=o(),K=c("div"),g(Ie.$$.fragment),Tt=o(),ln=c("p"),ln.textContent=ga,zn=o(),g(Be.$$.fragment),Pn=o(),I=c("div"),g(Ge.$$.fragment),Ut=o(),rn=c("p"),rn.textContent=fa,jt=o(),dn=c("p"),dn.innerHTML=ya,Zt=o(),Q=c("div"),g(Ve.$$.fragment),Wt=o(),pn=c("p"),pn.textContent=Ma,vt=o(),g(O.$$.fragment),It=o(),ee=c("div"),g(ke.$$.fragment),Bt=o(),cn=c("p"),cn.textContent=_a,An=o(),g(xe.$$.fragment),Sn=o(),B=c("div"),g(Ce.$$.fragment),Gt=o(),mn=c("p"),mn.textContent=ba,Vt=o(),un=c("p"),un.innerHTML=wa,kt=o(),N=c("div"),g(Xe.$$.fragment),xt=o(),hn=c("p"),hn.textContent=Ja,Ct=o(),g(ne.$$.fragment),Xt=o(),te=c("div"),g(Re.$$.fragment),Rt=o(),gn=c("p"),gn.textContent=Ta,Ln=o(),g(Qe.$$.fragment),Dn=o(),G=c("div"),g(Ne.$$.fragment),Qt=o(),fn=c("p"),fn.textContent=Ua,Nt=o(),yn=c("p"),yn.innerHTML=ja,Ft=o(),F=c("div"),g(Fe.$$.fragment),Yt=o(),Mn=c("p"),Mn.textContent=Za,Et=o(),g(ae.$$.fragment),Ht=o(),se=c("div"),g(Ye.$$.fragment),$t=o(),_n=c("p"),_n.textContent=Wa,qn=o(),g(Ee.$$.fragment),Kn=o(),z=c("div"),g(He.$$.fragment),zt=o(),bn=c("p"),bn.textContent=va,On=o(),g($e.$$.fragment),et=o(),Un=c("p"),this.h()},l(e){const s=xa("svelte-u9bgzb",document.head);t=m(s,"META",{name:!0,content:!0}),s.forEach(n),w=l(e),r=m(e,"P",{}),j(r).forEach(n),p=l(e),u=m(e,"DIV",{style:!0,"data-svelte-h":!0}),h(u)!=="svelte-p206qu"&&(u.innerHTML=a),J=l(e),f(W.$$.fragment,e),T=l(e),x=m(e,"P",{"data-svelte-h":!0}),h(x)!=="svelte-1o4eh30"&&(x.innerHTML=At),jn=l(e),le=m(e,"P",{"data-svelte-h":!0}),h(le)!=="svelte-snfs92"&&(le.innerHTML=St),Zn=l(e),ie=m(e,"P",{"data-svelte-h":!0}),h(ie)!=="svelte-1uk9cie"&&(ie.innerHTML=Lt),Wn=l(e),re=m(e,"P",{"data-svelte-h":!0}),h(re)!=="svelte-1j7jvpk"&&(re.textContent=Dt),vn=l(e),de=m(e,"UL",{"data-svelte-h":!0}),h(de)!=="svelte-13tt46i"&&(de.innerHTML=qt),In=l(e),f(S.$$.fragment,e),Bn=l(e),f(pe.$$.fragment,e),Gn=l(e),ce=m(e,"P",{"data-svelte-h":!0}),h(ce)!=="svelte-r8z9s6"&&(ce.textContent=Kt),Vn=l(e),f(L.$$.fragment,e),kn=l(e),f(me.$$.fragment,e),xn=l(e),ue=m(e,"P",{"data-svelte-h":!0}),h(ue)!=="svelte-1jq7n9p"&&(ue.textContent=Ot),Cn=l(e),f(D.$$.fragment,e),Xn=l(e),f(he.$$.fragment,e),Rn=l(e),ge=m(e,"P",{"data-svelte-h":!0}),h(ge)!=="svelte-1qiyvqd"&&(ge.textContent=ea),Qn=l(e),fe=m(e,"UL",{"data-svelte-h":!0}),h(fe)!=="svelte-1yzklw7"&&(fe.innerHTML=na),Nn=l(e),ye=m(e,"P",{"data-svelte-h":!0}),h(ye)!=="svelte-1rpd72j"&&(ye.innerHTML=ta),Fn=l(e),Me=m(e,"P",{"data-svelte-h":!0}),h(Me)!=="svelte-1icmgvo"&&(Me.textContent=aa),Yn=l(e),f(_e.$$.fragment,e),En=l(e),Z=m(e,"UL",{});var V=j(Z);be=m(V,"LI",{});var ze=j(be);Le=m(ze,"P",{"data-svelte-h":!0}),h(Le)!=="svelte-1qr0hkb"&&(Le.innerHTML=sa),rt=l(ze),we=m(ze,"DETAILS",{});var Pe=j(we);De=m(Pe,"SUMMARY",{"data-svelte-h":!0}),h(De)!=="svelte-1m0l1gk"&&(De.textContent=oa),dt=l(Pe),f(Je.$$.fragment,Pe),Pe.forEach(n),ze.forEach(n),pt=l(V),Te=m(V,"LI",{});var Ae=j(Te);qe=m(Ae,"P",{"data-svelte-h":!0}),h(qe)!=="svelte-1u8xg1f"&&(qe.innerHTML=la),ct=l(Ae),Ue=m(Ae,"DETAILS",{});var Se=j(Ue);Ke=m(Se,"SUMMARY",{"data-svelte-h":!0}),h(Ke)!=="svelte-1m0l1gk"&&(Ke.textContent=ia),mt=l(Se),f(je.$$.fragment,Se),Se.forEach(n),Ae.forEach(n),ut=l(V),Oe=m(V,"LI",{"data-svelte-h":!0}),h(Oe)!=="svelte-1dr923m"&&(Oe.innerHTML=ra),ht=l(V),en=m(V,"LI",{"data-svelte-h":!0}),h(en)!=="svelte-154noqv"&&(en.innerHTML=da),gt=l(V),nn=m(V,"LI",{"data-svelte-h":!0}),h(nn)!=="svelte-ck8fz4"&&(nn.innerHTML=pa),ft=l(V),tn=m(V,"LI",{"data-svelte-h":!0}),h(tn)!=="svelte-1lhnjsl"&&(tn.innerHTML=ca),V.forEach(n),Hn=l(e),f(Ze.$$.fragment,e),$n=l(e),v=m(e,"DIV",{class:!0});var C=j(v);f(We.$$.fragment,C),yt=l(C),an=m(C,"P",{"data-svelte-h":!0}),h(an)!=="svelte-cppop6"&&(an.textContent=ma),Mt=l(C),sn=m(C,"P",{"data-svelte-h":!0}),h(sn)!=="svelte-496sm0"&&(sn.innerHTML=ua),_t=l(C),R=m(C,"DIV",{class:!0});var P=j(R);f(ve.$$.fragment,P),bt=l(P),on=m(P,"P",{"data-svelte-h":!0}),h(on)!=="svelte-50j04k"&&(on.textContent=ha),wt=l(P),f(q.$$.fragment,P),P.forEach(n),Jt=l(C),K=m(C,"DIV",{class:!0});var tt=j(K);f(Ie.$$.fragment,tt),Tt=l(tt),ln=m(tt,"P",{"data-svelte-h":!0}),h(ln)!=="svelte-16q0ax1"&&(ln.textContent=ga),tt.forEach(n),C.forEach(n),zn=l(e),f(Be.$$.fragment,e),Pn=l(e),I=m(e,"DIV",{class:!0});var Y=j(I);f(Ge.$$.fragment,Y),Ut=l(Y),rn=m(Y,"P",{"data-svelte-h":!0}),h(rn)!=="svelte-1u5shki"&&(rn.textContent=fa),jt=l(Y),dn=m(Y,"P",{"data-svelte-h":!0}),h(dn)!=="svelte-496sm0"&&(dn.innerHTML=ya),Zt=l(Y),Q=m(Y,"DIV",{class:!0});var wn=j(Q);f(Ve.$$.fragment,wn),Wt=l(wn),pn=m(wn,"P",{"data-svelte-h":!0}),h(pn)!=="svelte-50j04k"&&(pn.textContent=Ma),vt=l(wn),f(O.$$.fragment,wn),wn.forEach(n),It=l(Y),ee=m(Y,"DIV",{class:!0});var at=j(ee);f(ke.$$.fragment,at),Bt=l(at),cn=m(at,"P",{"data-svelte-h":!0}),h(cn)!=="svelte-16q0ax1"&&(cn.textContent=_a),at.forEach(n),Y.forEach(n),An=l(e),f(xe.$$.fragment,e),Sn=l(e),B=m(e,"DIV",{class:!0});var E=j(B);f(Ce.$$.fragment,E),Gt=l(E),mn=m(E,"P",{"data-svelte-h":!0}),h(mn)!=="svelte-14hxha6"&&(mn.textContent=ba),Vt=l(E),un=m(E,"P",{"data-svelte-h":!0}),h(un)!=="svelte-496sm0"&&(un.innerHTML=wa),kt=l(E),N=m(E,"DIV",{class:!0});var Jn=j(N);f(Xe.$$.fragment,Jn),xt=l(Jn),hn=m(Jn,"P",{"data-svelte-h":!0}),h(hn)!=="svelte-50j04k"&&(hn.textContent=Ja),Ct=l(Jn),f(ne.$$.fragment,Jn),Jn.forEach(n),Xt=l(E),te=m(E,"DIV",{class:!0});var st=j(te);f(Re.$$.fragment,st),Rt=l(st),gn=m(st,"P",{"data-svelte-h":!0}),h(gn)!=="svelte-16q0ax1"&&(gn.textContent=Ta),st.forEach(n),E.forEach(n),Ln=l(e),f(Qe.$$.fragment,e),Dn=l(e),G=m(e,"DIV",{class:!0});var H=j(G);f(Ne.$$.fragment,H),Qt=l(H),fn=m(H,"P",{"data-svelte-h":!0}),h(fn)!=="svelte-t5jwqk"&&(fn.textContent=Ua),Nt=l(H),yn=m(H,"P",{"data-svelte-h":!0}),h(yn)!=="svelte-496sm0"&&(yn.innerHTML=ja),Ft=l(H),F=m(H,"DIV",{class:!0});var Tn=j(F);f(Fe.$$.fragment,Tn),Yt=l(Tn),Mn=m(Tn,"P",{"data-svelte-h":!0}),h(Mn)!=="svelte-50j04k"&&(Mn.textContent=Za),Et=l(Tn),f(ae.$$.fragment,Tn),Tn.forEach(n),Ht=l(H),se=m(H,"DIV",{class:!0});var ot=j(se);f(Ye.$$.fragment,ot),$t=l(ot),_n=m(ot,"P",{"data-svelte-h":!0}),h(_n)!=="svelte-16q0ax1"&&(_n.textContent=Wa),ot.forEach(n),H.forEach(n),qn=l(e),f(Ee.$$.fragment,e),Kn=l(e),z=m(e,"DIV",{class:!0});var lt=j(z);f(He.$$.fragment,lt),zt=l(lt),bn=m(lt,"P",{"data-svelte-h":!0}),h(bn)!=="svelte-fkhkmf"&&(bn.textContent=va),lt.forEach(n),On=l(e),f($e.$$.fragment,e),et=l(e),Un=m(e,"P",{}),j(Un).forEach(n),this.h()},h(){k(t,"name","hf:doc:metadata"),k(t,"content",La),Ca(u,"float","right"),k(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,s){i(document.head,t),d(e,w,s),d(e,r,s),d(e,p,s),d(e,u,s),d(e,J,s),y(W,e,s),d(e,T,s),d(e,x,s),d(e,jn,s),d(e,le,s),d(e,Zn,s),d(e,ie,s),d(e,Wn,s),d(e,re,s),d(e,vn,s),d(e,de,s),d(e,In,s),y(S,e,s),d(e,Bn,s),y(pe,e,s),d(e,Gn,s),d(e,ce,s),d(e,Vn,s),y(L,e,s),d(e,kn,s),y(me,e,s),d(e,xn,s),d(e,ue,s),d(e,Cn,s),y(D,e,s),d(e,Xn,s),y(he,e,s),d(e,Rn,s),d(e,ge,s),d(e,Qn,s),d(e,fe,s),d(e,Nn,s),d(e,ye,s),d(e,Fn,s),d(e,Me,s),d(e,Yn,s),y(_e,e,s),d(e,En,s),d(e,Z,s),i(Z,be),i(be,Le),i(be,rt),i(be,we),i(we,De),i(we,dt),y(Je,we,null),i(Z,pt),i(Z,Te),i(Te,qe),i(Te,ct),i(Te,Ue),i(Ue,Ke),i(Ue,mt),y(je,Ue,null),i(Z,ut),i(Z,Oe),i(Z,ht),i(Z,en),i(Z,gt),i(Z,nn),i(Z,ft),i(Z,tn),d(e,Hn,s),y(Ze,e,s),d(e,$n,s),d(e,v,s),y(We,v,null),i(v,yt),i(v,an),i(v,Mt),i(v,sn),i(v,_t),i(v,R),y(ve,R,null),i(R,bt),i(R,on),i(R,wt),y(q,R,null),i(v,Jt),i(v,K),y(Ie,K,null),i(K,Tt),i(K,ln),d(e,zn,s),y(Be,e,s),d(e,Pn,s),d(e,I,s),y(Ge,I,null),i(I,Ut),i(I,rn),i(I,jt),i(I,dn),i(I,Zt),i(I,Q),y(Ve,Q,null),i(Q,Wt),i(Q,pn),i(Q,vt),y(O,Q,null),i(I,It),i(I,ee),y(ke,ee,null),i(ee,Bt),i(ee,cn),d(e,An,s),y(xe,e,s),d(e,Sn,s),d(e,B,s),y(Ce,B,null),i(B,Gt),i(B,mn),i(B,Vt),i(B,un),i(B,kt),i(B,N),y(Xe,N,null),i(N,xt),i(N,hn),i(N,Ct),y(ne,N,null),i(B,Xt),i(B,te),y(Re,te,null),i(te,Rt),i(te,gn),d(e,Ln,s),y(Qe,e,s),d(e,Dn,s),d(e,G,s),y(Ne,G,null),i(G,Qt),i(G,fn),i(G,Nt),i(G,yn),i(G,Ft),i(G,F),y(Fe,F,null),i(F,Yt),i(F,Mn),i(F,Et),y(ae,F,null),i(G,Ht),i(G,se),y(Ye,se,null),i(se,$t),i(se,_n),d(e,qn,s),y(Ee,e,s),d(e,Kn,s),d(e,z,s),y(He,z,null),i(z,zt),i(z,bn),d(e,On,s),y($e,e,s),d(e,et,s),d(e,Un,s),nt=!0},p(e,[s]){const V={};s&2&&(V.$$scope={dirty:s,ctx:e}),S.$set(V);const ze={};s&2&&(ze.$$scope={dirty:s,ctx:e}),L.$set(ze);const Pe={};s&2&&(Pe.$$scope={dirty:s,ctx:e}),D.$set(Pe);const Ae={};s&2&&(Ae.$$scope={dirty:s,ctx:e}),q.$set(Ae);const Se={};s&2&&(Se.$$scope={dirty:s,ctx:e}),O.$set(Se);const C={};s&2&&(C.$$scope={dirty:s,ctx:e}),ne.$set(C);const P={};s&2&&(P.$$scope={dirty:s,ctx:e}),ae.$set(P)},i(e){nt||(M(W.$$.fragment,e),M(S.$$.fragment,e),M(pe.$$.fragment,e),M(L.$$.fragment,e),M(me.$$.fragment,e),M(D.$$.fragment,e),M(he.$$.fragment,e),M(_e.$$.fragment,e),M(Je.$$.fragment,e),M(je.$$.fragment,e),M(Ze.$$.fragment,e),M(We.$$.fragment,e),M(ve.$$.fragment,e),M(q.$$.fragment,e),M(Ie.$$.fragment,e),M(Be.$$.fragment,e),M(Ge.$$.fragment,e),M(Ve.$$.fragment,e),M(O.$$.fragment,e),M(ke.$$.fragment,e),M(xe.$$.fragment,e),M(Ce.$$.fragment,e),M(Xe.$$.fragment,e),M(ne.$$.fragment,e),M(Re.$$.fragment,e),M(Qe.$$.fragment,e),M(Ne.$$.fragment,e),M(Fe.$$.fragment,e),M(ae.$$.fragment,e),M(Ye.$$.fragment,e),M(Ee.$$.fragment,e),M(He.$$.fragment,e),M($e.$$.fragment,e),nt=!0)},o(e){_(W.$$.fragment,e),_(S.$$.fragment,e),_(pe.$$.fragment,e),_(L.$$.fragment,e),_(me.$$.fragment,e),_(D.$$.fragment,e),_(he.$$.fragment,e),_(_e.$$.fragment,e),_(Je.$$.fragment,e),_(je.$$.fragment,e),_(Ze.$$.fragment,e),_(We.$$.fragment,e),_(ve.$$.fragment,e),_(q.$$.fragment,e),_(Ie.$$.fragment,e),_(Be.$$.fragment,e),_(Ge.$$.fragment,e),_(Ve.$$.fragment,e),_(O.$$.fragment,e),_(ke.$$.fragment,e),_(xe.$$.fragment,e),_(Ce.$$.fragment,e),_(Xe.$$.fragment,e),_(ne.$$.fragment,e),_(Re.$$.fragment,e),_(Qe.$$.fragment,e),_(Ne.$$.fragment,e),_(Fe.$$.fragment,e),_(ae.$$.fragment,e),_(Ye.$$.fragment,e),_(Ee.$$.fragment,e),_(He.$$.fragment,e),_($e.$$.fragment,e),nt=!1},d(e){e&&(n(w),n(r),n(p),n(u),n(J),n(T),n(x),n(jn),n(le),n(Zn),n(ie),n(Wn),n(re),n(vn),n(de),n(In),n(Bn),n(Gn),n(ce),n(Vn),n(kn),n(xn),n(ue),n(Cn),n(Xn),n(Rn),n(ge),n(Qn),n(fe),n(Nn),n(ye),n(Fn),n(Me),n(Yn),n(En),n(Z),n(Hn),n($n),n(v),n(zn),n(Pn),n(I),n(An),n(Sn),n(B),n(Ln),n(Dn),n(G),n(qn),n(Kn),n(z),n(On),n(et),n(Un)),n(t),b(W,e),b(S,e),b(pe,e),b(L,e),b(me,e),b(D,e),b(he,e),b(_e,e),b(Je),b(je),b(Ze,e),b(We),b(ve),b(q),b(Ie),b(Be,e),b(Ge),b(Ve),b(O),b(ke),b(xe,e),b(Ce),b(Xe),b(ne),b(Re),b(Qe,e),b(Ne),b(Fe),b(ae),b(Ye),b(Ee,e),b(He),b($e,e)}}}const La='{"title":"Wan2.1","local":"wan21","sections":[{"title":"Text-to-Video Generation","local":"text-to-video-generation","sections":[],"depth":3},{"title":"First-Last-Frame-to-Video Generation","local":"first-last-frame-to-video-generation","sections":[],"depth":3},{"title":"Any-to-Video Controllable Generation","local":"any-to-video-controllable-generation","sections":[],"depth":3},{"title":"Notes","local":"notes","sections":[],"depth":2},{"title":"WanPipeline","local":"diffusers.WanPipeline","sections":[],"depth":2},{"title":"WanImageToVideoPipeline","local":"diffusers.WanImageToVideoPipeline","sections":[],"depth":2},{"title":"WanVACEPipeline","local":"diffusers.WanVACEPipeline","sections":[],"depth":2},{"title":"WanVideoToVideoPipeline","local":"diffusers.WanVideoToVideoPipeline","sections":[],"depth":2},{"title":"WanPipelineOutput","local":"diffusers.pipelines.wan.pipeline_output.WanPipelineOutput","sections":[],"depth":2}],"depth":1}';function Da(U){return Ga(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class os extends Va{constructor(t){super(),ka(this,t,Da,Sa,Ba,{})}}export{os as component};
