import{s as Ss,o as Ps,n as Bt}from"../chunks/scheduler.8c3d61f6.js";import{S as As,i as Ds,g as l,s,r as u,A as qs,h as i,f as n,c as o,j as w,x as _,u as h,k as j,l as Os,y as t,a as m,v as g,d as f,t as M,w as y}from"../chunks/index.da70eac4.js";import{D as I}from"../chunks/Docstring.367be9ed.js";import{C as $}from"../chunks/CodeBlock.a9c4becf.js";import{E as ps}from"../chunks/ExampleCodeBlock.dd9ee828.js";import{H as Ae,E as Ks}from"../chunks/getInferenceSnippets.cb466318.js";import{H as eo,a as $s}from"../chunks/HfOption.6c3b4e77.js";function to(x){let r,J='Refer to the <a href="../../optimization/memory">Reduce memory usage</a> guide for more details about the various memory saving techniques.',T,c,p="The LTX-Video model below requires ~10GB of VRAM.",a,b,G;return b=new $({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwTFRYUGlwZWxpbmUlMkMlMjBBdXRvTW9kZWwlMEFmcm9tJTIwZGlmZnVzZXJzLmhvb2tzJTIwaW1wb3J0JTIwYXBwbHlfZ3JvdXBfb2ZmbG9hZGluZyUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBleHBvcnRfdG9fdmlkZW8lMEElMEElMjMlMjBmcDglMjBsYXllcndpc2UlMjB3ZWlnaHQtY2FzdGluZyUwQXRyYW5zZm9ybWVyJTIwJTNEJTIwQXV0b01vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJMaWdodHJpY2tzJTJGTFRYLVZpZGVvJTIyJTJDJTBBJTIwJTIwJTIwJTIwc3ViZm9sZGVyJTNEJTIydHJhbnNmb3JtZXIlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKSUwQXRyYW5zZm9ybWVyLmVuYWJsZV9sYXllcndpc2VfY2FzdGluZyglMEElMjAlMjAlMjAlMjBzdG9yYWdlX2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RpdmVfcHJvbXB0JTNEbmVnYXRpdmVfcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwd2lkdGglM0Q3NjglMkMlMEElMjAlMjAlMjAlMjBoZWlnaHQlM0Q1MTIlMkMlMEElMjAlMjAlMjAlMjBudW1fZnJhbWVzJTNEMTYxJTJDJTBBJTIwJTIwJTIwJTIwZGVjb2RlX3RpbWVzdGVwJTNEMC4wMyUyQyUwQSUyMCUyMCUyMCUyMGRlY29kZV9ub2lzZV9zY2FsZSUzRDAuMDI1JTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDUwJTJDJTBBKS5mcmFtZXMlNUIwJTVEJTBBZXhwb3J0X3RvX3ZpZGVvKHZpZGVvJTJDJTIwJTIyb3V0cHV0Lm1wNCUyMiUyQyUyMGZwcyUzRDI0KQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LTXPipeline, AutoModel
<span class="hljs-keyword">from</span> diffusers.hooks <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

<span class="hljs-comment"># fp8 layerwise weight-casting</span>
transformer = AutoModel.from_pretrained(
    <span class="hljs-string">&quot;Lightricks/LTX-Video&quot;</span>,
    subfolder=<span class="hljs-string">&quot;transformer&quot;</span>,
    torch_dtype=torch.bfloat16
)
transformer.enable_layerwise_casting(
    storage_dtype=torch.float8_e4m3fn, compute_dtype=torch.bfloat16
)

pipeline = LTXPipeline.from_pretrained(<span class="hljs-string">&quot;Lightricks/LTX-Video&quot;</span>, transformer=transformer, 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>)
pipeline.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>)
apply_group_offloading(pipeline.text_encoder, onload_device=onload_device, offload_type=<span class="hljs-string">&quot;block_level&quot;</span>, num_blocks_per_group=<span class="hljs-number">2</span>)
apply_group_offloading(pipeline.vae, onload_device=onload_device, offload_type=<span class="hljs-string">&quot;leaf_level&quot;</span>)

prompt = <span class="hljs-string">&quot;&quot;&quot;
A woman with long brown hair and light skin smiles at another woman with long blonde hair.
The woman with brown hair wears a black jacket and has a small, barely noticeable mole on her right cheek.
The camera angle is a close-up, focused on the woman with brown hair&#x27;s face. The lighting is warm and 
natural, likely from the setting sun, casting a soft glow on the scene. The scene appears to be real-life footage
&quot;&quot;&quot;</span>
negative_prompt = <span class="hljs-string">&quot;worst quality, inconsistent motion, blurry, jittery, distorted&quot;</span>

video = pipeline(
    prompt=prompt,
    negative_prompt=negative_prompt,
    width=<span class="hljs-number">768</span>,
    height=<span class="hljs-number">512</span>,
    num_frames=<span class="hljs-number">161</span>,
    decode_timestep=<span class="hljs-number">0.03</span>,
    decode_noise_scale=<span class="hljs-number">0.025</span>,
    num_inference_steps=<span class="hljs-number">50</span>,
).frames[<span class="hljs-number">0</span>]
export_to_video(video, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">24</span>)`,wrap:!1}}),{c(){r=l("p"),r.innerHTML=J,T=s(),c=l("p"),c.textContent=p,a=s(),u(b.$$.fragment)},l(U){r=i(U,"P",{"data-svelte-h":!0}),_(r)!=="svelte-iowzkr"&&(r.innerHTML=J),T=o(U),c=i(U,"P",{"data-svelte-h":!0}),_(c)!=="svelte-7p0ppy"&&(c.textContent=p),a=o(U),h(b.$$.fragment,U)},m(U,C){m(U,r,C),m(U,T,C),m(U,c,C),m(U,a,C),g(b,U,C),G=!0},p:Bt,i(U){G||(f(b.$$.fragment,U),G=!0)},o(U){M(b.$$.fragment,U),G=!1},d(U){U&&(n(r),n(T),n(c),n(a)),y(b,U)}}}function no(x){let r,J='<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.',T,c,p;return c=new $({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwTFRYUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBMVFhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyTGlnaHRyaWNrcyUyRkxUWC1WaWRlbyUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMEEpJTBBJTBBJTIzJTIwdG9yY2guY29tcGlsZSUwQXBpcGVsaW5lLnRyYW5zZm9ybWVyLnRvKG1lbW9yeV9mb3JtYXQlM0R0b3JjaC5jaGFubmVsc19sYXN0KSUwQXBpcGVsaW5lLnRyYW5zZm9ybWVyJTIwJTNEJTIwdG9yY2guY29tcGlsZSglMEElMjAlMjAlMjAlMjBwaXBlbGluZS50cmFuc2Zvcm1lciUyQyUyMG1vZGUlM0QlMjJtYXgtYXV0b3R1bmUlMjIlMkMlMjBmdWxsZ3JhcGglM0RUcnVlJTBBKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMiUyMiUyMiUwQUElMjB3b21hbiUyMHdpdGglMjBsb25nJTIwYnJvd24lMjBoYWlyJTIwYW5kJTIwbGlnaHQlMjBza2luJTIwc21pbGVzJTIwYXQlMjBhbm90aGVyJTIwd29tYW4lMjB3aXRoJTIwbG9uZyUyMGJsb25kZSUyMGhhaXIuJTBBVGhlJTIwd29tYW4lMjB3aXRoJTIwYnJvd24lMjBoYWlyJTIwd2VhcnMlMjBhJTIwYmxhY2slMjBqYWNrZXQlMjBhbmQlMjBoYXMlMjBhJTIwc21hbGwl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kMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENTAlMkMlMEEpLmZyYW1lcyU1QjAlNUQlMEFleHBvcnRfdG9fdmlkZW8odmlkZW8lMkMlMjAlMjJvdXRwdXQubXA0JTIyJTJDJTIwZnBzJTNEMjQp",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LTXPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video

pipeline = LTXPipeline.from_pretrained(
    <span class="hljs-string">&quot;Lightricks/LTX-Video&quot;</span>, torch_dtype=torch.bfloat16
)

<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;
A woman with long brown hair and light skin smiles at another woman with long blonde hair.
The woman with brown hair wears a black jacket and has a small, barely noticeable mole on her right cheek.
The camera angle is a close-up, focused on the woman with brown hair&#x27;s face. The lighting is warm and 
natural, likely from the setting sun, casting a soft glow on the scene. The scene appears to be real-life footage
&quot;&quot;&quot;</span>
negative_prompt = <span class="hljs-string">&quot;worst quality, inconsistent motion, blurry, jittery, distorted&quot;</span>

video = pipeline(
    prompt=prompt,
    negative_prompt=negative_prompt,
    width=<span class="hljs-number">768</span>,
    height=<span class="hljs-number">512</span>,
    num_frames=<span class="hljs-number">161</span>,
    decode_timestep=<span class="hljs-number">0.03</span>,
    decode_noise_scale=<span class="hljs-number">0.025</span>,
    num_inference_steps=<span class="hljs-number">50</span>,
).frames[<span class="hljs-number">0</span>]
export_to_video(video, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">24</span>)`,wrap:!1}}),{c(){r=l("p"),r.innerHTML=J,T=s(),u(c.$$.fragment)},l(a){r=i(a,"P",{"data-svelte-h":!0}),_(r)!=="svelte-e4r7sz"&&(r.innerHTML=J),T=o(a),h(c.$$.fragment,a)},m(a,b){m(a,r,b),m(a,T,b),g(c,a,b),p=!0},p:Bt,i(a){p||(f(c.$$.fragment,a),p=!0)},o(a){M(c.$$.fragment,a),p=!1},d(a){a&&(n(r),n(T)),y(c,a)}}}function so(x){let r,J,T,c;return r=new $s({props:{id:"usage",option:"memory",$$slots:{default:[to]},$$scope:{ctx:x}}}),T=new $s({props:{id:"usage",option:"inference speed",$$slots:{default:[no]},$$scope:{ctx:x}}}),{c(){u(r.$$.fragment),J=s(),u(T.$$.fragment)},l(p){h(r.$$.fragment,p),J=o(p),h(T.$$.fragment,p)},m(p,a){g(r,p,a),m(p,J,a),g(T,p,a),c=!0},p(p,a){const b={};a&2&&(b.$$scope={dirty:a,ctx:p}),r.$set(b);const G={};a&2&&(G.$$scope={dirty:a,ctx:p}),T.$set(G)},i(p){c||(f(r.$$.fragment,p),f(T.$$.fragment,p),c=!0)},o(p){M(r.$$.fragment,p),M(T.$$.fragment,p),c=!1},d(p){p&&n(J),y(r,p),y(T,p)}}}function oo(x){let r,J="Examples:",T,c,p;return c=new $({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwTFRYUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBcGlwZSUyMCUzRCUyMExUWFBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJMaWdodHJpY2tzJTJGTFRYLVZpZGVvJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMEFwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMHdvbWFuJTIwd2l0aCUyMGxvbmclMjBicm93biUyMGhhaXIlMjBhbmQlM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HQlM0Q0ODAlMkMlMEElMjAlMjAlMjAlMjBudW1fZnJhbWVzJTNEMTYxJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDUwJTJDJTBBKS5mcmFtZXMlNUIwJTVEJTBBZXhwb3J0X3RvX3ZpZGVvKHZpZGVvJTJDJTIwJTIyb3V0cHV0Lm1wNCUyMiUyQyUyMGZwcyUzRDI0KQ==",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 <span class="hljs-keyword">import</span> LTXPipeline
<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>pipe = LTXPipeline.from_pretrained(<span class="hljs-string">&quot;Lightricks/LTX-Video&quot;</span>, torch_dtype=torch.bfloat16)
<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 woman with long brown hair and light skin smiles at another woman with long blonde hair. The woman with brown hair wears a black jacket and has a small, barely noticeable mole on her right cheek. The camera angle is a close-up, focused on the woman with brown hair&#x27;s face. The lighting is warm and natural, likely from the setting sun, casting a soft glow on the scene. The scene appears to be real-life footage&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = <span class="hljs-string">&quot;worst quality, inconsistent motion, blurry, jittery, distorted&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>video = pipe(
<span class="hljs-meta">... </span>    prompt=prompt,
<span class="hljs-meta">... </span>    negative_prompt=negative_prompt,
<span class="hljs-meta">... </span>    width=<span class="hljs-number">704</span>,
<span class="hljs-meta">... </span>    height=<span class="hljs-number">480</span>,
<span class="hljs-meta">... </span>    num_frames=<span class="hljs-number">161</span>,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">50</span>,
<span class="hljs-meta">... </span>).frames[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>export_to_video(video, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">24</span>)`,wrap:!1}}),{c(){r=l("p"),r.textContent=J,T=s(),u(c.$$.fragment)},l(a){r=i(a,"P",{"data-svelte-h":!0}),_(r)!=="svelte-kvfsh7"&&(r.textContent=J),T=o(a),h(c.$$.fragment,a)},m(a,b){m(a,r,b),m(a,T,b),g(c,a,b),p=!0},p:Bt,i(a){p||(f(c.$$.fragment,a),p=!0)},o(a){M(c.$$.fragment,a),p=!1},d(a){a&&(n(r),n(T)),y(c,a)}}}function ao(x){let r,J="Examples:",T,c,p;return c=new $({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwTFRYSW1hZ2VUb1ZpZGVvUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTJDJTIwbG9hZF9pbWFnZSUwQSUwQXBpcGUlMjAlM0QlMjBMVFhJbWFnZVRvVmlkZW9QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyTGlnaHRyaWNrcyUyRkxUWC1WaWRlbyUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpJTBBcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQWltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZSglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZhLXItci1vLXclMkZ0aW55LW1lbWUtZGF0YXNldC1jYXB0aW9uZWQlMkZyZXNvbHZlJTJGbWFpbiUyRmltYWdlcyUyRjgucG5nJTIyJTBBKSUwQXBy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AlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQlMkMlMEElMjAlMjAlMjAlMjB3aWR0aCUzRDcwNCUyQyUwQSUyMCUyMCUyMCUyMGhlaWdodCUzRDQ4MCUyQyUwQSUyMCUyMCUyMCUyMG51bV9mcmFtZXMlM0QxNjElMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENTAlMkMlMEEpLmZyYW1lcyU1QjAlNUQlMEFleHBvcnRfdG9fdmlkZW8odmlkZW8lMkMlMjAlMjJvdXRwdXQubXA0JTIyJTJDJTIwZnBzJTNEMjQp",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 <span class="hljs-keyword">import</span> LTXImageToVideoPipeline
<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>pipe = LTXImageToVideoPipeline.from_pretrained(<span class="hljs-string">&quot;Lightricks/LTX-Video&quot;</span>, torch_dtype=torch.bfloat16)
<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/a-r-r-o-w/tiny-meme-dataset-captioned/resolve/main/images/8.png&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;A young girl stands calmly in the foreground, looking directly at the camera, as a house fire rages in the background. Flames engulf the structure, with smoke billowing into the air. Firefighters in protective gear rush to the scene, a fire truck labeled &#x27;38&#x27; visible behind them. The girl&#x27;s neutral expression contrasts sharply with the chaos of the fire, creating a poignant and emotionally charged scene.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = <span class="hljs-string">&quot;worst quality, inconsistent motion, blurry, jittery, distorted&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>video = 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>    width=<span class="hljs-number">704</span>,
<span class="hljs-meta">... </span>    height=<span class="hljs-number">480</span>,
<span class="hljs-meta">... </span>    num_frames=<span class="hljs-number">161</span>,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">50</span>,
<span class="hljs-meta">... </span>).frames[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>export_to_video(video, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">24</span>)`,wrap:!1}}),{c(){r=l("p"),r.textContent=J,T=s(),u(c.$$.fragment)},l(a){r=i(a,"P",{"data-svelte-h":!0}),_(r)!=="svelte-kvfsh7"&&(r.textContent=J),T=o(a),h(c.$$.fragment,a)},m(a,b){m(a,r,b),m(a,T,b),g(c,a,b),p=!0},p:Bt,i(a){p||(f(c.$$.fragment,a),p=!0)},o(a){M(c.$$.fragment,a),p=!1},d(a){a&&(n(r),n(T)),y(c,a)}}}function lo(x){let r,J="Examples:",T,c,p;return c=new $({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzLnBpcGVsaW5lcy5sdHgucGlwZWxpbmVfbHR4X2NvbmRpdGlvbiUyMGltcG9ydCUyMExUWENvbmRpdGlvblBpcGVsaW5lJTJDJTIwTFRYVmlkZW9Db25kaXRpb24lMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTJDJTIwbG9hZF92aWRlbyUyQyUyMGxvYWRfaW1hZ2UlMEElMEFwaXBlJTIwJTNEJTIwTFRYQ29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wJTIwJTIwJTIwaGVpZ2h0JTNENTEyJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2ZyYW1lcyUzRDE2MSUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q0MCUyQyUwQSUyMCUyMCUyMCUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUwQSkuZnJhbWVzJTVCMCU1RCUwQSUwQWV4cG9ydF90b192aWRlbyh2aWRlbyUyQyUyMCUyMm91dHB1dC5tcDQlMjIlMkMlMjBmcHMlM0QyNCk=",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.pipelines.ltx.pipeline_ltx_condition <span class="hljs-keyword">import</span> LTXConditionPipeline, LTXVideoCondition
<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_video, load_image

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = LTXConditionPipeline.from_pretrained(<span class="hljs-string">&quot;Lightricks/LTX-Video-0.9.5&quot;</span>, torch_dtype=torch.bfloat16)
<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><span class="hljs-comment"># Load input image and video</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/cosmos/cosmos-video2world-input-vid.mp4&quot;</span>
<span class="hljs-meta">... </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/cosmos/cosmos-video2world-input.jpg&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Create conditioning objects</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>condition1 = LTXVideoCondition(
<span class="hljs-meta">... </span>    image=image,
<span class="hljs-meta">... </span>    frame_index=<span class="hljs-number">0</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>condition2 = LTXVideoCondition(
<span class="hljs-meta">... </span>    video=video,
<span class="hljs-meta">... </span>    frame_index=<span class="hljs-number">80</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;The video depicts a long, straight highway stretching into the distance, flanked by metal guardrails. The road is divided into multiple lanes, with a few vehicles visible in the far distance. The surrounding landscape features dry, grassy fields on one side and rolling hills on the other. The sky is mostly clear with a few scattered clouds, suggesting a bright, sunny day. And then the camera switch to a winding mountain road covered in snow, with a single vehicle traveling along it. The road is flanked by steep, rocky cliffs and sparse vegetation. The landscape is characterized by rugged terrain and a river visible in the distance. The scene captures the solitude and beauty of a winter drive through a mountainous region.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = <span class="hljs-string">&quot;worst quality, inconsistent motion, blurry, jittery, distorted&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate video</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generator = torch.Generator(<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Text-only conditioning is also supported without the need to pass \`conditions\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>video = pipe(
<span class="hljs-meta">... </span>    conditions=[condition1, condition2],
<span class="hljs-meta">... </span>    prompt=prompt,
<span class="hljs-meta">... </span>    negative_prompt=negative_prompt,
<span class="hljs-meta">... </span>    width=<span class="hljs-number">768</span>,
<span class="hljs-meta">... </span>    height=<span class="hljs-number">512</span>,
<span class="hljs-meta">... </span>    num_frames=<span class="hljs-number">161</span>,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">40</span>,
<span class="hljs-meta">... </span>    generator=generator,
<span class="hljs-meta">... </span>).frames[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>export_to_video(video, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">24</span>)`,wrap:!1}}),{c(){r=l("p"),r.textContent=J,T=s(),u(c.$$.fragment)},l(a){r=i(a,"P",{"data-svelte-h":!0}),_(r)!=="svelte-kvfsh7"&&(r.textContent=J),T=o(a),h(c.$$.fragment,a)},m(a,b){m(a,r,b),m(a,T,b),g(c,a,b),p=!0},p:Bt,i(a){p||(f(c.$$.fragment,a),p=!0)},o(a){M(c.$$.fragment,a),p=!1},d(a){a&&(n(r),n(T)),y(c,a)}}}function io(x){let r,J,T,c,p,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> <img alt="MPS" src="https://img.shields.io/badge/MPS-000000?style=flat&amp;logo=apple&amp;logoColor=white%22"/></div>',b,G,U,C,cs='<a href="https://huggingface.co/Lightricks/LTX-Video" rel="nofollow">LTX-Video</a> is a diffusion transformer designed for fast and real-time generation of high-resolution videos from text and images. The main feature of LTX-Video is the Video-VAE. The Video-VAE has a higher pixel to latent compression ratio (1:192) which enables more efficient video data processing and faster generation speed. To support and prevent finer details from being lost during generation, the Video-VAE decoder performs the latent to pixel conversion <em>and</em> the last denoising step.',xt,re,ms='You can find all the original LTX-Video checkpoints under the <a href="https://huggingface.co/Lightricks" rel="nofollow">Lightricks</a> organization.',Wt,S,us="<p>Click on the LTX-Video models in the right sidebar for more examples of other video generation tasks.</p>",kt,de,hs="The example below demonstrates how to generate a video optimized for memory or inference speed.",Vt,P,Ct,pe,Rt,W,De,gs='<p>Refer to the following recommended settings for generation from the <a href="https://github.com/Lightricks/LTX-Video" rel="nofollow">LTX-Video</a> repository.</p> <ul><li>The recommended dtype for the transformer, VAE, and text encoder is <code>torch.bfloat16</code>. The VAE and text encoder can also be <code>torch.float32</code> or <code>torch.float16</code>.</li> <li>For guidance-distilled variants of LTX-Video, set <code>guidance_scale</code> to <code>1.0</code>. The <code>guidance_scale</code> for any other model should be set higher, like <code>5.0</code>, for good generation quality.</li> <li>For timestep-aware VAE variants (LTX-Video 0.9.1 and above), set <code>decode_timestep</code> to <code>0.05</code> and <code>image_cond_noise_scale</code> to <code>0.025</code>.</li> <li>For variants that support interpolation between multiple conditioning images and videos (LTX-Video 0.9.5 and above), use similar images and videos for the best results. Divergence from the conditioning inputs may lead to abrupt transitionts in the generated video.</li></ul>',hn,ce,qe,fs="LTX-Video 0.9.7 includes a spatial latent upscaler and a 13B parameter transformer. During inference, a low resolution video is quickly generated first and then upscaled and refined.",gn,me,Oe,Ms="Show example code",fn,ue,Mn,E,Ke,ys="LTX-Video 0.9.7 distilled model is guidance and timestep-distilled to speedup generation. It requires <code>guidance_scale</code> to be set to <code>1.0</code> and <code>num_inference_steps</code> should be set between <code>4</code> and <code>10</code> for good generation quality. You should also use the following custom timesteps for the best results.",yn,et,_s="<li>Base model inference to prepare for upscaling: <code>[1000, 993, 987, 981, 975, 909, 725, 0.03]</code>.</li> <li>Upscaling: <code>[1000, 909, 725, 421, 0]</code>.</li>",_n,he,tt,Ts="Show example code",Tn,ge,bn,fe,nt,bs='LTX-Video supports LoRAs with <a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.LTXVideoLoraLoaderMixin.load_lora_weights">load_lora_weights()</a>.',wn,Me,st,ws="Show example code",Jn,ye,Un,_e,ot,Js='LTX-Video supports loading from single files, such as <a href="../../quantization/gguf">GGUF checkpoints</a>, with <a href="/docs/diffusers/main/en/api/loaders/single_file#diffusers.loaders.FromOriginalModelMixin.from_single_file">loaders.FromOriginalModelMixin.from_single_file()</a> or <a href="/docs/diffusers/main/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">loaders.FromSingleFileMixin.from_single_file()</a>.',jn,Te,at,Us="Show example code",vn,be,Lt,we,Nt,X,Je,Zn,lt,js="Pipeline for text-to-video generation.",In,it,vs='Reference: <a href="https://github.com/Lightricks/LTX-Video" rel="nofollow">https://github.com/Lightricks/LTX-Video</a>',Gn,L,Ue,Xn,rt,Zs="Function invoked when calling the pipeline for generation.",Bn,A,xn,D,je,Wn,dt,Is="Encodes the prompt into text encoder hidden states.",Yt,ve,Ht,B,Ze,kn,pt,Gs="Pipeline for image-to-video generation.",Vn,ct,Xs='Reference: <a href="https://github.com/Lightricks/LTX-Video" rel="nofollow">https://github.com/Lightricks/LTX-Video</a>',Cn,N,Ie,Rn,mt,Bs="Function invoked when calling the pipeline for generation.",Ln,q,Nn,O,Ge,Yn,ut,xs="Encodes the prompt into text encoder hidden states.",Ft,Xe,Et,v,Be,Hn,ht,Ws="Pipeline for text/image/video-to-video generation.",Fn,gt,ks='Reference: <a href="https://github.com/Lightricks/LTX-Video" rel="nofollow">https://github.com/Lightricks/LTX-Video</a>',En,Y,xe,Qn,ft,Vs="Function invoked when calling the pipeline for generation.",zn,K,$n,ee,We,Sn,Mt,Cs=`Add timestep-dependent noise to the hard-conditioning latents. This helps with motion continuity, especially
when conditioned on a single frame.`,Pn,te,ke,An,yt,Rs="Encodes the prompt into text encoder hidden states.",Dn,ne,Ve,qn,_t,Ls="Trim a conditioning sequence to the allowed number of frames.",Qt,Ce,zt,Z,Re,On,Tt,Le,Kn,se,Ne,es,bt,Ns=`Applies Adaptive Instance Normalization (AdaIN) to a latent tensor based on statistics from a reference latent
tensor.`,ts,oe,Ye,ns,wt,Ys=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,ss,ae,He,os,Jt,Hs=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to
computing decoding in one step.`,as,le,Fe,ls,Ut,Fs=`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`,is,ie,Ee,rs,jt,Es=`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to
compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow
processing larger images.`,$t,Qe,St,Q,ze,ds,vt,Qs="Output class for LTX pipelines.",Pt,$e,At,Xt,Dt;return G=new Ae({props:{title:"LTX-Video",local:"ltx-video",headingTag:"h1"}}),P=new eo({props:{id:"usage",options:["memory","inference speed"],$$slots:{default:[so]},$$scope:{ctx:x}}}),pe=new Ae({props:{title:"Notes",local:"notes",headingTag:"h2"}}),ue=new $({props:{code:" ",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LTXConditionPipeline, LTXLatentUpsamplePipeline
<span class="hljs-keyword">from</span> diffusers.pipelines.ltx.pipeline_ltx_condition <span class="hljs-keyword">import</span> LTXVideoCondition
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_video

pipeline = LTXConditionPipeline.from_pretrained(<span class="hljs-string">&quot;Lightricks/LTX-Video-0.9.7-dev&quot;</span>, torch_dtype=torch.bfloat16)
pipeline_upsample = LTXLatentUpsamplePipeline.from_pretrained(<span class="hljs-string">&quot;Lightricks/ltxv-spatial-upscaler-0.9.7&quot;</span>, vae=pipeline.vae, torch_dtype=torch.bfloat16)
pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipe_upsample.to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.vae.enable_tiling()

<span class="hljs-keyword">def</span> <span class="hljs-title function_">round_to_nearest_resolution_acceptable_by_vae</span>(<span class="hljs-params">height, width</span>):
    height = height - (height % pipeline.vae_temporal_compression_ratio)
    width = width - (width % pipeline.vae_temporal_compression_ratio)
    <span class="hljs-keyword">return</span> height, width

video = load_video(
    <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cosmos/cosmos-video2world-input-vid.mp4&quot;</span>
)[:<span class="hljs-number">21</span>]  <span class="hljs-comment"># only use the first 21 frames as conditioning</span>
condition1 = LTXVideoCondition(video=video, frame_index=<span class="hljs-number">0</span>)

prompt = <span class="hljs-string">&quot;&quot;&quot;
The video depicts a winding mountain road covered in snow, with a single vehicle 
traveling along it. The road is flanked by steep, rocky cliffs and sparse vegetation. 
The landscape is characterized by rugged terrain and a river visible in the distance. 
The scene captures the solitude and beauty of a winter drive through a mountainous region.
&quot;&quot;&quot;</span>
negative_prompt = <span class="hljs-string">&quot;worst quality, inconsistent motion, blurry, jittery, distorted&quot;</span>
expected_height, expected_width = <span class="hljs-number">768</span>, <span class="hljs-number">1152</span>
downscale_factor = <span class="hljs-number">2</span> / <span class="hljs-number">3</span>
num_frames = <span class="hljs-number">161</span>

<span class="hljs-comment"># 1. Generate video at smaller resolution</span>
<span class="hljs-comment"># Text-only conditioning is also supported without the need to pass \`conditions\`</span>
downscaled_height, downscaled_width = <span class="hljs-built_in">int</span>(expected_height * downscale_factor), <span class="hljs-built_in">int</span>(expected_width * downscale_factor)
downscaled_height, downscaled_width = round_to_nearest_resolution_acceptable_by_vae(downscaled_height, downscaled_width)
latents = pipeline(
    conditions=[condition1],
    prompt=prompt,
    negative_prompt=negative_prompt,
    width=downscaled_width,
    height=downscaled_height,
    num_frames=num_frames,
    num_inference_steps=<span class="hljs-number">30</span>,
    decode_timestep=<span class="hljs-number">0.05</span>,
    decode_noise_scale=<span class="hljs-number">0.025</span>,
    image_cond_noise_scale=<span class="hljs-number">0.0</span>,
    guidance_scale=<span class="hljs-number">5.0</span>,
    guidance_rescale=<span class="hljs-number">0.7</span>,
    generator=torch.Generator().manual_seed(<span class="hljs-number">0</span>),
    output_type=<span class="hljs-string">&quot;latent&quot;</span>,
).frames

<span class="hljs-comment"># 2. Upscale generated video using latent upsampler with fewer inference steps</span>
<span class="hljs-comment"># The available latent upsampler upscales the height/width by 2x</span>
upscaled_height, upscaled_width = downscaled_height * <span class="hljs-number">2</span>, downscaled_width * <span class="hljs-number">2</span>
upscaled_latents = pipe_upsample(
    latents=latents,
    output_type=<span class="hljs-string">&quot;latent&quot;</span>
).frames

<span class="hljs-comment"># 3. Denoise the upscaled video with few steps to improve texture (optional, but recommended)</span>
video = pipeline(
    conditions=[condition1],
    prompt=prompt,
    negative_prompt=negative_prompt,
    width=upscaled_width,
    height=upscaled_height,
    num_frames=num_frames,
    denoise_strength=<span class="hljs-number">0.4</span>,  <span class="hljs-comment"># Effectively, 4 inference steps out of 10</span>
    num_inference_steps=<span class="hljs-number">10</span>,
    latents=upscaled_latents,
    decode_timestep=<span class="hljs-number">0.05</span>,
    decode_noise_scale=<span class="hljs-number">0.025</span>,
    image_cond_noise_scale=<span class="hljs-number">0.0</span>,
    guidance_scale=<span class="hljs-number">5.0</span>,
    guidance_rescale=<span class="hljs-number">0.7</span>,
    generator=torch.Generator().manual_seed(<span class="hljs-number">0</span>),
    output_type=<span class="hljs-string">&quot;pil&quot;</span>,
).frames[<span class="hljs-number">0</span>]

<span class="hljs-comment"># 4. Downscale the video to the expected resolution</span>
video = [frame.resize((expected_width, expected_height)) <span class="hljs-keyword">for</span> frame <span class="hljs-keyword">in</span> video]

export_to_video(video, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">24</span>)`,wrap:!1}}),ge=new $({props:{code:" ",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LTXConditionPipeline, LTXLatentUpsamplePipeline
<span class="hljs-keyword">from</span> diffusers.pipelines.ltx.pipeline_ltx_condition <span class="hljs-keyword">import</span> LTXVideoCondition
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_video

pipeline = LTXConditionPipeline.from_pretrained(<span class="hljs-string">&quot;Lightricks/LTX-Video-0.9.7-distilled&quot;</span>, torch_dtype=torch.bfloat16)
pipe_upsample = LTXLatentUpsamplePipeline.from_pretrained(<span class="hljs-string">&quot;Lightricks/ltxv-spatial-upscaler-0.9.7&quot;</span>, vae=pipeline.vae, torch_dtype=torch.bfloat16)
pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipe_upsample.to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipeline.vae.enable_tiling()

<span class="hljs-keyword">def</span> <span class="hljs-title function_">round_to_nearest_resolution_acceptable_by_vae</span>(<span class="hljs-params">height, width</span>):
    height = height - (height % pipeline.vae_temporal_compression_ratio)
    width = width - (width % pipeline.vae_temporal_compression_ratio)
    <span class="hljs-keyword">return</span> height, width

prompt = <span class="hljs-string">&quot;&quot;&quot;
artistic anatomical 3d render, utlra quality, human half full male body with transparent 
skin revealing structure instead of organs, muscular, intricate creative patterns, 
monochromatic with backlighting, lightning mesh, scientific concept art, blending biology 
with botany, surreal and ethereal quality, unreal engine 5, ray tracing, ultra realistic, 
16K UHD, rich details. camera zooms out in a rotating fashion
&quot;&quot;&quot;</span>
negative_prompt = <span class="hljs-string">&quot;worst quality, inconsistent motion, blurry, jittery, distorted&quot;</span>
expected_height, expected_width = <span class="hljs-number">768</span>, <span class="hljs-number">1152</span>
downscale_factor = <span class="hljs-number">2</span> / <span class="hljs-number">3</span>
num_frames = <span class="hljs-number">161</span>

<span class="hljs-comment"># 1. Generate video at smaller resolution</span>
downscaled_height, downscaled_width = <span class="hljs-built_in">int</span>(expected_height * downscale_factor), <span class="hljs-built_in">int</span>(expected_width * downscale_factor)
downscaled_height, downscaled_width = round_to_nearest_resolution_acceptable_by_vae(downscaled_height, downscaled_width)
latents = pipeline(
    prompt=prompt,
    negative_prompt=negative_prompt,
    width=downscaled_width,
    height=downscaled_height,
    num_frames=num_frames,
    timesteps=[<span class="hljs-number">1000</span>, <span class="hljs-number">993</span>, <span class="hljs-number">987</span>, <span class="hljs-number">981</span>, <span class="hljs-number">975</span>, <span class="hljs-number">909</span>, <span class="hljs-number">725</span>, <span class="hljs-number">0.03</span>],
    decode_timestep=<span class="hljs-number">0.05</span>,
    decode_noise_scale=<span class="hljs-number">0.025</span>,
    image_cond_noise_scale=<span class="hljs-number">0.0</span>,
    guidance_scale=<span class="hljs-number">1.0</span>,
    guidance_rescale=<span class="hljs-number">0.7</span>,
    generator=torch.Generator().manual_seed(<span class="hljs-number">0</span>),
    output_type=<span class="hljs-string">&quot;latent&quot;</span>,
).frames

<span class="hljs-comment"># 2. Upscale generated video using latent upsampler with fewer inference steps</span>
<span class="hljs-comment"># The available latent upsampler upscales the height/width by 2x</span>
upscaled_height, upscaled_width = downscaled_height * <span class="hljs-number">2</span>, downscaled_width * <span class="hljs-number">2</span>
upscaled_latents = pipe_upsample(
    latents=latents,
    adain_factor=<span class="hljs-number">1.0</span>,
    output_type=<span class="hljs-string">&quot;latent&quot;</span>
).frames

<span class="hljs-comment"># 3. Denoise the upscaled video with few steps to improve texture (optional, but recommended)</span>
video = pipeline(
    prompt=prompt,
    negative_prompt=negative_prompt,
    width=upscaled_width,
    height=upscaled_height,
    num_frames=num_frames,
    denoise_strength=<span class="hljs-number">0.999</span>,  <span class="hljs-comment"># Effectively, 4 inference steps out of 5</span>
    timesteps=[<span class="hljs-number">1000</span>, <span class="hljs-number">909</span>, <span class="hljs-number">725</span>, <span class="hljs-number">421</span>, <span class="hljs-number">0</span>],
    latents=upscaled_latents,
    decode_timestep=<span class="hljs-number">0.05</span>,
    decode_noise_scale=<span class="hljs-number">0.025</span>,
    image_cond_noise_scale=<span class="hljs-number">0.0</span>,
    guidance_scale=<span class="hljs-number">1.0</span>,
    guidance_rescale=<span class="hljs-number">0.7</span>,
    generator=torch.Generator().manual_seed(<span class="hljs-number">0</span>),
    output_type=<span class="hljs-string">&quot;pil&quot;</span>,
).frames[<span class="hljs-number">0</span>]

<span class="hljs-comment"># 4. Downscale the video to the expected resolution</span>
video = [frame.resize((expected_width, expected_height)) <span class="hljs-keyword">for</span> frame <span class="hljs-keyword">in</span> video]

export_to_video(video, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">24</span>)`,wrap:!1}}),ye=new $({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwTFRYQ29uZGl0aW9uUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTJDJTIwbG9hZF9pbWFnZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwTFRYQ29uZGl0aW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMkxpZ2h0cmlja3MlMkZMVFgtVmlkZW8tMC45LjUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKSUwQSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUyMkxpZ2h0cmlja3MlMkZMVFgtVmlkZW8tQ2FrZWlmeS1Mb1JBJTIyJTJDJTIwYWRhcHRlcl9uYW1lJTNEJTIyY2FrZWlmeSUyMiklMEFwaXBlbGluZS5zZXRfYWRhcHRlcnMoJTIyY2FrZWlmeSUyMiklMEElMEElMjMlMjB1c2UlMjAlMjJDQUtFSUZZJTIyJTIwdG8lMjB0cmlnZ2VyJTIwdGhlJTIwTG9SQSUwQXByb21wdCUyMCUzRCUyMCUyMkNBS0VJRlklMjBhJTIwcGVyc29uJTIwdXNpbmclMjBhJTIwa25pZmUlMjB0byUyMGN1dCUyMGElMjBjYWtlJTIwc2hhcGVkJTIwbGlrZSUyMGElMjBQaWthY2h1JTIwcGx1c2hpZSUyMiUwQWltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZSglMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGTGlnaHRyaWNrcyUyRkxUWC1WaWRlby1DYWtlaWZ5LUxvUkElMkZyZXNvbHZlJTJGbWFpbiUyRmFzc2V0cyUyRmltYWdlcyUyRnBpa2FjaHUucG5nJTIyKSUwQSUwQXZpZGVvJTIwJTNEJTIwcGlwZWxpbmUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwaW1hZ2UlM0RpbWFnZSUyQyUwQSUyMCUyMCUyMCUyMHdpZHRoJTNENTc2JTJDJTBBJTIwJTIwJTIwJTIwaGVpZ2h0JTNENTc2JTJDJTBBJTIwJTIwJTIwJTIwbnVtX2ZyYW1lcyUzRDE2MSUyQyUwQSUyMCUyMCUyMCUyMGRlY29kZV90aW1lc3RlcCUzRDAuMDMlMkMlMEElMjAlMjAlMjAlMjBkZWNvZGVfbm9pc2Vfc2NhbGUlM0QwLjAyNSUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q1MCUyQyUwQSkuZnJhbWVzJTVCMCU1RCUwQWV4cG9ydF90b192aWRlbyh2aWRlbyUyQyUyMCUyMm91dHB1dC5tcDQlMjIlMkMlMjBmcHMlM0QyNik=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LTXConditionPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_image

pipeline = LTXConditionPipeline.from_pretrained(
    <span class="hljs-string">&quot;Lightricks/LTX-Video-0.9.5&quot;</span>, torch_dtype=torch.bfloat16
)

pipeline.load_lora_weights(<span class="hljs-string">&quot;Lightricks/LTX-Video-Cakeify-LoRA&quot;</span>, adapter_name=<span class="hljs-string">&quot;cakeify&quot;</span>)
pipeline.set_adapters(<span class="hljs-string">&quot;cakeify&quot;</span>)

<span class="hljs-comment"># use &quot;CAKEIFY&quot; to trigger the LoRA</span>
prompt = <span class="hljs-string">&quot;CAKEIFY a person using a knife to cut a cake shaped like a Pikachu plushie&quot;</span>
image = load_image(<span class="hljs-string">&quot;https://huggingface.co/Lightricks/LTX-Video-Cakeify-LoRA/resolve/main/assets/images/pikachu.png&quot;</span>)

video = pipeline(
    prompt=prompt,
    image=image,
    width=<span class="hljs-number">576</span>,
    height=<span class="hljs-number">576</span>,
    num_frames=<span class="hljs-number">161</span>,
    decode_timestep=<span class="hljs-number">0.03</span>,
    decode_noise_scale=<span class="hljs-number">0.025</span>,
    num_inference_steps=<span class="hljs-number">50</span>,
).frames[<span class="hljs-number">0</span>]
export_to_video(video, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">26</span>)`,wrap:!1}}),be=new $({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMExUWFBpcGVsaW5lJTJDJTIwQXV0b01vZGVsJTJDJTIwR0dVRlF1YW50aXphdGlvbkNvbmZpZyUwQSUwQXRyYW5zZm9ybWVyJTIwJTNEJTIwQXV0b01vZGVsLmZyb21fc2luZ2xlX2ZpbGUoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmNpdHk5NiUyRkxUWC1WaWRlby1nZ3VmJTJGYmxvYiUyRm1haW4lMkZsdHgtdmlkZW8tMmItdjAuOS1RM19LX1MuZ2d1ZiUyMiUwQSUyMCUyMCUyMCUyMHF1YW50aXphdGlvbl9jb25maWclM0RHR1VGUXVhbnRpemF0aW9uQ29uZmlnKGNvbXB1dGVfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKSUwQXBpcGVsaW5lJTIwJTNEJTIwTFRYUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMkxpZ2h0cmlja3MlMkZMVFgtVmlkZW8lMjIlMkMlMEElMjAlMjAlMjAlMjB0cmFuc2Zvcm1lciUzRHRyYW5zZm9ybWVyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUwQSk=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LTXPipeline, AutoModel, GGUFQuantizationConfig

transformer = AutoModel.from_single_file(
    <span class="hljs-string">&quot;https://huggingface.co/city96/LTX-Video-gguf/blob/main/ltx-video-2b-v0.9-Q3_K_S.gguf&quot;</span>
    quantization_config=GGUFQuantizationConfig(compute_dtype=torch.bfloat16),
    torch_dtype=torch.bfloat16
)
pipeline = LTXPipeline.from_pretrained(
    <span class="hljs-string">&quot;Lightricks/LTX-Video&quot;</span>,
    transformer=transformer,
    torch_dtype=torch.bfloat16
)`,wrap:!1}}),we=new Ae({props:{title:"LTXPipeline",local:"diffusers.LTXPipeline",headingTag:"h2"}}),Je=new I({props:{name:"class diffusers.LTXPipeline",anchor:"diffusers.LTXPipeline",parameters:[{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"vae",val:": AutoencoderKLLTXVideo"},{name:"text_encoder",val:": T5EncoderModel"},{name:"tokenizer",val:": T5TokenizerFast"},{name:"transformer",val:": LTXVideoTransformer3DModel"}],parametersDescription:[{anchor:"diffusers.LTXPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/ltx_video_transformer3d#diffusers.LTXVideoTransformer3DModel">LTXVideoTransformer3DModel</a>) &#x2014;
Conditional Transformer architecture to denoise the encoded video latents.`,name:"transformer"},{anchor:"diffusers.LTXPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) &#x2014;
A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.LTXPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl_ltx_video#diffusers.AutoencoderKLLTXVideo">AutoencoderKLLTXVideo</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.LTXPipeline.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/t5-v1_1-xxl" rel="nofollow">google/t5-v1_1-xxl</a> variant.`,name:"text_encoder"},{anchor:"diffusers.LTXPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.LTXPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>T5TokenizerFast</code>) &#x2014;
Second Tokenizer of class
<a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5TokenizerFast" rel="nofollow">T5TokenizerFast</a>.`,name:"tokenizer"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx.py#L170"}}),Ue=new I({props:{name:"__call__",anchor:"diffusers.LTXPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"height",val:": int = 512"},{name:"width",val:": int = 704"},{name:"num_frames",val:": int = 161"},{name:"frame_rate",val:": int = 25"},{name:"num_inference_steps",val:": int = 50"},{name:"timesteps",val:": typing.List[int] = None"},{name:"guidance_scale",val:": float = 3"},{name:"guidance_rescale",val:": float = 0.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:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decode_timestep",val:": typing.Union[float, typing.List[float]] = 0.0"},{name:"decode_noise_scale",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{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.Optional[typing.Callable[[int, int, typing.Dict], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 128"}],parametersDescription:[{anchor:"diffusers.LTXPipeline.__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.LTXPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, defaults to <code>512</code>) &#x2014;
The height in pixels of the generated image. This is set to 480 by default for the best results.`,name:"height"},{anchor:"diffusers.LTXPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, defaults to <code>704</code>) &#x2014;
The width in pixels of the generated image. This is set to 848 by default for the best results.`,name:"width"},{anchor:"diffusers.LTXPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, defaults to <code>161</code>) &#x2014;
The number of video frames to generate`,name:"num_frames"},{anchor:"diffusers.LTXPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#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.LTXPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument
in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is
passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.LTXPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, defaults to <code>3 </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.LTXPipeline.__call__.guidance_rescale",description:`<strong>guidance_rescale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Guidance rescale factor proposed by <a href="https://arxiv.org/pdf/2305.08891.pdf" rel="nofollow">Common Diffusion Noise Schedules and Sample Steps are
Flawed</a> <code>guidance_scale</code> is defined as <code>&#x3C6;</code> in equation 16. of
<a href="https://arxiv.org/pdf/2305.08891.pdf" rel="nofollow">Common Diffusion Noise Schedules and Sample Steps are Flawed</a>.
Guidance rescale factor should fix overexposure when using zero terminal SNR.`,name:"guidance_rescale"},{anchor:"diffusers.LTXPipeline.__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 videos to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.LTXPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.LTXPipeline.__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 will be generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.LTXPipeline.__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, <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.LTXPipeline.__call__.prompt_attention_mask",description:`<strong>prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated attention mask for text embeddings.`,name:"prompt_attention_mask"},{anchor:"diffusers.LTXPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. For PixArt-Sigma this negative prompt should be &quot;&quot;. If not
provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.LTXPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated attention mask for negative text embeddings.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.LTXPipeline.__call__.decode_timestep",description:`<strong>decode_timestep</strong> (<code>float</code>, defaults to <code>0.0</code>) &#x2014;
The timestep at which generated video is decoded.`,name:"decode_timestep"},{anchor:"diffusers.LTXPipeline.__call__.decode_noise_scale",description:`<strong>decode_noise_scale</strong> (<code>float</code>, defaults to <code>None</code>) &#x2014;
The interpolation factor between random noise and denoised latents at the decode timestep.`,name:"decode_noise_scale"},{anchor:"diffusers.LTXPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.LTXPipeline.__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>~pipelines.ltx.LTXPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.LTXPipeline.__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.LTXPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls at the end of each denoising steps during the inference. The function is called
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.LTXPipeline.__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.LTXPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code> defaults to <code>128 </code>) &#x2014;
Maximum sequence length to use with the <code>prompt</code>.`,name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx.py#L535",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <code>~pipelines.ltx.LTXPipelineOutput</code> is returned, otherwise a <code>tuple</code> is
returned where the first element is a list with the generated images.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~pipelines.ltx.LTXPipelineOutput</code> or <code>tuple</code></p>
`}}),A=new ps({props:{anchor:"diffusers.LTXPipeline.__call__.example",$$slots:{default:[oo]},$$scope:{ctx:x}}}),je=new I({props:{name:"encode_prompt",anchor:"diffusers.LTXPipeline.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:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"max_sequence_length",val:": int = 128"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"dtype",val:": typing.Optional[torch.dtype] = None"}],parametersDescription:[{anchor:"diffusers.LTXPipeline.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.LTXPipeline.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.LTXPipeline.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.LTXPipeline.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.LTXPipeline.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.LTXPipeline.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.LTXPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>, <em>optional</em>):
torch device`,name:"device"},{anchor:"diffusers.LTXPipeline.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/ltx/pipeline_ltx.py#L283"}}),ve=new Ae({props:{title:"LTXImageToVideoPipeline",local:"diffusers.LTXImageToVideoPipeline",headingTag:"h2"}}),Ze=new I({props:{name:"class diffusers.LTXImageToVideoPipeline",anchor:"diffusers.LTXImageToVideoPipeline",parameters:[{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"vae",val:": AutoencoderKLLTXVideo"},{name:"text_encoder",val:": T5EncoderModel"},{name:"tokenizer",val:": T5TokenizerFast"},{name:"transformer",val:": LTXVideoTransformer3DModel"}],parametersDescription:[{anchor:"diffusers.LTXImageToVideoPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/ltx_video_transformer3d#diffusers.LTXVideoTransformer3DModel">LTXVideoTransformer3DModel</a>) &#x2014;
Conditional Transformer architecture to denoise the encoded video latents.`,name:"transformer"},{anchor:"diffusers.LTXImageToVideoPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) &#x2014;
A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.LTXImageToVideoPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl_ltx_video#diffusers.AutoencoderKLLTXVideo">AutoencoderKLLTXVideo</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.LTXImageToVideoPipeline.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/t5-v1_1-xxl" rel="nofollow">google/t5-v1_1-xxl</a> variant.`,name:"text_encoder"},{anchor:"diffusers.LTXImageToVideoPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.LTXImageToVideoPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>T5TokenizerFast</code>) &#x2014;
Second Tokenizer of class
<a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5TokenizerFast" rel="nofollow">T5TokenizerFast</a>.`,name:"tokenizer"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_image2video.py#L189"}}),Ie=new I({props:{name:"__call__",anchor:"diffusers.LTXImageToVideoPipeline.__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]] = None"},{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"height",val:": int = 512"},{name:"width",val:": int = 704"},{name:"num_frames",val:": int = 161"},{name:"frame_rate",val:": int = 25"},{name:"num_inference_steps",val:": int = 50"},{name:"timesteps",val:": typing.List[int] = None"},{name:"guidance_scale",val:": float = 3"},{name:"guidance_rescale",val:": float = 0.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:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decode_timestep",val:": typing.Union[float, typing.List[float]] = 0.0"},{name:"decode_noise_scale",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{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.Optional[typing.Callable[[int, int, typing.Dict], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 128"}],parametersDescription:[{anchor:"diffusers.LTXImageToVideoPipeline.__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.LTXImageToVideoPipeline.__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.LTXImageToVideoPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, defaults to <code>512</code>) &#x2014;
The height in pixels of the generated image. This is set to 480 by default for the best results.`,name:"height"},{anchor:"diffusers.LTXImageToVideoPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, defaults to <code>704</code>) &#x2014;
The width in pixels of the generated image. This is set to 848 by default for the best results.`,name:"width"},{anchor:"diffusers.LTXImageToVideoPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, defaults to <code>161</code>) &#x2014;
The number of video frames to generate`,name:"num_frames"},{anchor:"diffusers.LTXImageToVideoPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#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.LTXImageToVideoPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument
in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is
passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.LTXImageToVideoPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, defaults to <code>3 </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.LTXImageToVideoPipeline.__call__.guidance_rescale",description:`<strong>guidance_rescale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Guidance rescale factor proposed by <a href="https://arxiv.org/pdf/2305.08891.pdf" rel="nofollow">Common Diffusion Noise Schedules and Sample Steps are
Flawed</a> <code>guidance_scale</code> is defined as <code>&#x3C6;</code> in equation 16. of
<a href="https://arxiv.org/pdf/2305.08891.pdf" rel="nofollow">Common Diffusion Noise Schedules and Sample Steps are Flawed</a>.
Guidance rescale factor should fix overexposure when using zero terminal SNR.`,name:"guidance_rescale"},{anchor:"diffusers.LTXImageToVideoPipeline.__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 videos to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.LTXImageToVideoPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.LTXImageToVideoPipeline.__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 will be generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.LTXImageToVideoPipeline.__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, <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.LTXImageToVideoPipeline.__call__.prompt_attention_mask",description:`<strong>prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated attention mask for text embeddings.`,name:"prompt_attention_mask"},{anchor:"diffusers.LTXImageToVideoPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. For PixArt-Sigma this negative prompt should be &quot;&quot;. If not
provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.LTXImageToVideoPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated attention mask for negative text embeddings.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.LTXImageToVideoPipeline.__call__.decode_timestep",description:`<strong>decode_timestep</strong> (<code>float</code>, defaults to <code>0.0</code>) &#x2014;
The timestep at which generated video is decoded.`,name:"decode_timestep"},{anchor:"diffusers.LTXImageToVideoPipeline.__call__.decode_noise_scale",description:`<strong>decode_noise_scale</strong> (<code>float</code>, defaults to <code>None</code>) &#x2014;
The interpolation factor between random noise and denoised latents at the decode timestep.`,name:"decode_noise_scale"},{anchor:"diffusers.LTXImageToVideoPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.LTXImageToVideoPipeline.__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>~pipelines.ltx.LTXPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.LTXImageToVideoPipeline.__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.LTXImageToVideoPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls at the end of each denoising steps during the inference. The function is called
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.LTXImageToVideoPipeline.__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.LTXImageToVideoPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code> defaults to <code>128 </code>) &#x2014;
Maximum sequence length to use with the <code>prompt</code>.`,name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_image2video.py#L596",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <code>~pipelines.ltx.LTXPipelineOutput</code> is returned, otherwise a <code>tuple</code> is
returned where the first element is a list with the generated images.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~pipelines.ltx.LTXPipelineOutput</code> or <code>tuple</code></p>
`}}),q=new ps({props:{anchor:"diffusers.LTXImageToVideoPipeline.__call__.example",$$slots:{default:[ao]},$$scope:{ctx:x}}}),Ge=new I({props:{name:"encode_prompt",anchor:"diffusers.LTXImageToVideoPipeline.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:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"max_sequence_length",val:": int = 128"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"dtype",val:": typing.Optional[torch.dtype] = None"}],parametersDescription:[{anchor:"diffusers.LTXImageToVideoPipeline.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.LTXImageToVideoPipeline.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.LTXImageToVideoPipeline.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.LTXImageToVideoPipeline.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.LTXImageToVideoPipeline.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.LTXImageToVideoPipeline.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.LTXImageToVideoPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>, <em>optional</em>):
torch device`,name:"device"},{anchor:"diffusers.LTXImageToVideoPipeline.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/ltx/pipeline_ltx_image2video.py#L306"}}),Xe=new Ae({props:{title:"LTXConditionPipeline",local:"diffusers.LTXConditionPipeline",headingTag:"h2"}}),Be=new I({props:{name:"class diffusers.LTXConditionPipeline",anchor:"diffusers.LTXConditionPipeline",parameters:[{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"vae",val:": AutoencoderKLLTXVideo"},{name:"text_encoder",val:": T5EncoderModel"},{name:"tokenizer",val:": T5TokenizerFast"},{name:"transformer",val:": LTXVideoTransformer3DModel"}],parametersDescription:[{anchor:"diffusers.LTXConditionPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/ltx_video_transformer3d#diffusers.LTXVideoTransformer3DModel">LTXVideoTransformer3DModel</a>) &#x2014;
Conditional Transformer architecture to denoise the encoded video latents.`,name:"transformer"},{anchor:"diffusers.LTXConditionPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) &#x2014;
A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.LTXConditionPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl_ltx_video#diffusers.AutoencoderKLLTXVideo">AutoencoderKLLTXVideo</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.LTXConditionPipeline.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/t5-v1_1-xxl" rel="nofollow">google/t5-v1_1-xxl</a> variant.`,name:"text_encoder"},{anchor:"diffusers.LTXConditionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.LTXConditionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>T5TokenizerFast</code>) &#x2014;
Second Tokenizer of class
<a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5TokenizerFast" rel="nofollow">T5TokenizerFast</a>.`,name:"tokenizer"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_condition.py#L252"}}),xe=new I({props:{name:"__call__",anchor:"diffusers.LTXConditionPipeline.__call__",parameters:[{name:"conditions",val:": typing.Union[diffusers.pipelines.ltx.pipeline_ltx_condition.LTXVideoCondition, typing.List[diffusers.pipelines.ltx.pipeline_ltx_condition.LTXVideoCondition]] = None"},{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], 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:"video",val:": 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:"frame_index",val:": typing.Union[int, typing.List[int]] = 0"},{name:"strength",val:": typing.Union[float, typing.List[float]] = 1.0"},{name:"denoise_strength",val:": float = 1.0"},{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"height",val:": int = 512"},{name:"width",val:": int = 704"},{name:"num_frames",val:": int = 161"},{name:"frame_rate",val:": int = 25"},{name:"num_inference_steps",val:": int = 50"},{name:"timesteps",val:": typing.List[int] = None"},{name:"guidance_scale",val:": float = 3"},{name:"guidance_rescale",val:": float = 0.0"},{name:"image_cond_noise_scale",val:": float = 0.15"},{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:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decode_timestep",val:": typing.Union[float, typing.List[float]] = 0.0"},{name:"decode_noise_scale",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{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.Optional[typing.Callable[[int, int, typing.Dict], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 256"}],parametersDescription:[{anchor:"diffusers.LTXConditionPipeline.__call__.conditions",description:`<strong>conditions</strong> (<code>List[LTXVideoCondition], *optional*</code>) &#x2014;
The list of frame-conditioning items for the video generation.If not provided, conditions will be
created using <code>image</code>, <code>video</code>, <code>frame_index</code> and <code>strength</code>.`,name:"conditions"},{anchor:"diffusers.LTXConditionPipeline.__call__.image",description:`<strong>image</strong> (<code>PipelineImageInput</code> or <code>List[PipelineImageInput]</code>, <em>optional</em>) &#x2014;
The image or images to condition the video generation. If not provided, one has to pass <code>video</code> or
<code>conditions</code>.`,name:"image"},{anchor:"diffusers.LTXConditionPipeline.__call__.video",description:`<strong>video</strong> (<code>List[PipelineImageInput]</code>, <em>optional</em>) &#x2014;
The video to condition the video generation. If not provided, one has to pass <code>image</code> or <code>conditions</code>.`,name:"video"},{anchor:"diffusers.LTXConditionPipeline.__call__.frame_index",description:`<strong>frame_index</strong> (<code>int</code> or <code>List[int]</code>, <em>optional</em>) &#x2014;
The frame index or frame indices at which the image or video will conditionally effect the video
generation. If not provided, one has to pass <code>conditions</code>.`,name:"frame_index"},{anchor:"diffusers.LTXConditionPipeline.__call__.strength",description:`<strong>strength</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>) &#x2014;
The strength or strengths of the conditioning effect. If not provided, one has to pass <code>conditions</code>.`,name:"strength"},{anchor:"diffusers.LTXConditionPipeline.__call__.denoise_strength",description:`<strong>denoise_strength</strong> (<code>float</code>, defaults to <code>1.0</code>) &#x2014;
The strength of the noise added to the latents for editing. Higher strength leads to more noise added
to the latents, therefore leading to more differences between original video and generated video. This
is useful for video-to-video editing.`,name:"denoise_strength"},{anchor:"diffusers.LTXConditionPipeline.__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.LTXConditionPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, defaults to <code>512</code>) &#x2014;
The height in pixels of the generated image. This is set to 480 by default for the best results.`,name:"height"},{anchor:"diffusers.LTXConditionPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, defaults to <code>704</code>) &#x2014;
The width in pixels of the generated image. This is set to 848 by default for the best results.`,name:"width"},{anchor:"diffusers.LTXConditionPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, defaults to <code>161</code>) &#x2014;
The number of video frames to generate`,name:"num_frames"},{anchor:"diffusers.LTXConditionPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#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.LTXConditionPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument
in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is
passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.LTXConditionPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, defaults to <code>3 </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.LTXConditionPipeline.__call__.guidance_rescale",description:`<strong>guidance_rescale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Guidance rescale factor proposed by <a href="https://arxiv.org/pdf/2305.08891.pdf" rel="nofollow">Common Diffusion Noise Schedules and Sample Steps are
Flawed</a> <code>guidance_scale</code> is defined as <code>&#x3C6;</code> in equation 16. of
<a href="https://arxiv.org/pdf/2305.08891.pdf" rel="nofollow">Common Diffusion Noise Schedules and Sample Steps are Flawed</a>.
Guidance rescale factor should fix overexposure when using zero terminal SNR.`,name:"guidance_rescale"},{anchor:"diffusers.LTXConditionPipeline.__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 videos to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.LTXConditionPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.LTXConditionPipeline.__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 will be generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.LTXConditionPipeline.__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, <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.LTXConditionPipeline.__call__.prompt_attention_mask",description:`<strong>prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated attention mask for text embeddings.`,name:"prompt_attention_mask"},{anchor:"diffusers.LTXConditionPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. For PixArt-Sigma this negative prompt should be &quot;&quot;. If not
provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.LTXConditionPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated attention mask for negative text embeddings.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.LTXConditionPipeline.__call__.decode_timestep",description:`<strong>decode_timestep</strong> (<code>float</code>, defaults to <code>0.0</code>) &#x2014;
The timestep at which generated video is decoded.`,name:"decode_timestep"},{anchor:"diffusers.LTXConditionPipeline.__call__.decode_noise_scale",description:`<strong>decode_noise_scale</strong> (<code>float</code>, defaults to <code>None</code>) &#x2014;
The interpolation factor between random noise and denoised latents at the decode timestep.`,name:"decode_noise_scale"},{anchor:"diffusers.LTXConditionPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.LTXConditionPipeline.__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>~pipelines.ltx.LTXPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.LTXConditionPipeline.__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.LTXConditionPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls at the end of each denoising steps during the inference. The function is called
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.LTXConditionPipeline.__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.LTXConditionPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code> defaults to <code>128 </code>) &#x2014;
Maximum sequence length to use with the <code>prompt</code>.`,name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_condition.py#L848",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <code>~pipelines.ltx.LTXPipelineOutput</code> is returned, otherwise a <code>tuple</code> is
returned where the first element is a list with the generated images.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~pipelines.ltx.LTXPipelineOutput</code> or <code>tuple</code></p>
`}}),K=new ps({props:{anchor:"diffusers.LTXConditionPipeline.__call__.example",$$slots:{default:[lo]},$$scope:{ctx:x}}}),We=new I({props:{name:"add_noise_to_image_conditioning_latents",anchor:"diffusers.LTXConditionPipeline.add_noise_to_image_conditioning_latents",parameters:[{name:"t",val:": float"},{name:"init_latents",val:": Tensor"},{name:"latents",val:": Tensor"},{name:"noise_scale",val:": float"},{name:"conditioning_mask",val:": Tensor"},{name:"generator",val:""},{name:"eps",val:" = 1e-06"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_condition.py#L646"}}),ke=new I({props:{name:"encode_prompt",anchor:"diffusers.LTXConditionPipeline.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:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"max_sequence_length",val:": int = 256"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"dtype",val:": typing.Optional[torch.dtype] = None"}],parametersDescription:[{anchor:"diffusers.LTXConditionPipeline.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.LTXConditionPipeline.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.LTXConditionPipeline.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.LTXConditionPipeline.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.LTXConditionPipeline.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.LTXConditionPipeline.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.LTXConditionPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>, <em>optional</em>):
torch device`,name:"device"},{anchor:"diffusers.LTXConditionPipeline.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/ltx/pipeline_ltx_condition.py#L369"}}),Ve=new I({props:{name:"trim_conditioning_sequence",anchor:"diffusers.LTXConditionPipeline.trim_conditioning_sequence",parameters:[{name:"start_frame",val:": int"},{name:"sequence_num_frames",val:": int"},{name:"target_num_frames",val:": int"}],parametersDescription:[{anchor:"diffusers.LTXConditionPipeline.trim_conditioning_sequence.start_frame",description:"<strong>start_frame</strong> (int) &#x2014; The target frame number of the first frame in the sequence.",name:"start_frame"},{anchor:"diffusers.LTXConditionPipeline.trim_conditioning_sequence.sequence_num_frames",description:"<strong>sequence_num_frames</strong> (int) &#x2014; The number of frames in the sequence.",name:"sequence_num_frames"},{anchor:"diffusers.LTXConditionPipeline.trim_conditioning_sequence.target_num_frames",description:"<strong>target_num_frames</strong> (int) &#x2014; The target number of frames in the generated video.",name:"target_num_frames"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_condition.py#L629",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>updated sequence length</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>int</p>
`}}),Ce=new Ae({props:{title:"LTXLatentUpsamplePipeline",local:"diffusers.LTXLatentUpsamplePipeline",headingTag:"h2"}}),Re=new I({props:{name:"class diffusers.LTXLatentUpsamplePipeline",anchor:"diffusers.LTXLatentUpsamplePipeline",parameters:[{name:"vae",val:": AutoencoderKLLTXVideo"},{name:"latent_upsampler",val:": LTXLatentUpsamplerModel"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_latent_upsample.py#L46"}}),Le=new I({props:{name:"__call__",anchor:"diffusers.LTXLatentUpsamplePipeline.__call__",parameters:[{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:"height",val:": int = 512"},{name:"width",val:": int = 704"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"decode_timestep",val:": typing.Union[float, typing.List[float]] = 0.0"},{name:"decode_noise_scale",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"adain_factor",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_latent_upsample.py#L208"}}),Ne=new I({props:{name:"adain_filter_latent",anchor:"diffusers.LTXLatentUpsamplePipeline.adain_filter_latent",parameters:[{name:"latents",val:": Tensor"},{name:"reference_latents",val:": Tensor"},{name:"factor",val:": float = 1.0"}],parametersDescription:[{anchor:"diffusers.LTXLatentUpsamplePipeline.adain_filter_latent.latent",description:`<strong>latent</strong> (<code>torch.Tensor</code>) &#x2014;
Input latents to normalize`,name:"latent"},{anchor:"diffusers.LTXLatentUpsamplePipeline.adain_filter_latent.reference_latents",description:`<strong>reference_latents</strong> (<code>torch.Tensor</code>) &#x2014;
The reference latents providing style statistics.`,name:"reference_latents"},{anchor:"diffusers.LTXLatentUpsamplePipeline.adain_filter_latent.factor",description:`<strong>factor</strong> (<code>float</code>) &#x2014;
Blending factor between original and transformed latent. Range: -10.0 to 10.0, Default: 1.0`,name:"factor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_latent_upsample.py#L96",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The transformed latent tensor</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>torch.Tensor</p>
`}}),Ye=new I({props:{name:"disable_vae_slicing",anchor:"diffusers.LTXLatentUpsamplePipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_latent_upsample.py#L159"}}),He=new I({props:{name:"disable_vae_tiling",anchor:"diffusers.LTXLatentUpsamplePipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_latent_upsample.py#L186"}}),Fe=new I({props:{name:"enable_vae_slicing",anchor:"diffusers.LTXLatentUpsamplePipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_latent_upsample.py#L146"}}),Ee=new I({props:{name:"enable_vae_tiling",anchor:"diffusers.LTXLatentUpsamplePipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/ltx/pipeline_ltx_latent_upsample.py#L172"}}),Qe=new Ae({props:{title:"LTXPipelineOutput",local:"diffusers.pipelines.ltx.pipeline_output.LTXPipelineOutput",headingTag:"h2"}}),ze=new I({props:{name:"class diffusers.pipelines.ltx.pipeline_output.LTXPipelineOutput",anchor:"diffusers.pipelines.ltx.pipeline_output.LTXPipelineOutput",parameters:[{name:"frames",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.pipelines.ltx.pipeline_output.LTXPipelineOutput.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/ltx/pipeline_output.py#L9"}}),$e=new Ks({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/ltx_video.md"}}),{c(){r=l("meta"),J=s(),T=l("p"),c=s(),p=l("div"),p.innerHTML=a,b=s(),u(G.$$.fragment),U=s(),C=l("p"),C.innerHTML=cs,xt=s(),re=l("p"),re.innerHTML=ms,Wt=s(),S=l("blockquote"),S.innerHTML=us,kt=s(),de=l("p"),de.textContent=hs,Vt=s(),u(P.$$.fragment),Ct=s(),u(pe.$$.fragment),Rt=s(),W=l("ul"),De=l("li"),De.innerHTML=gs,hn=s(),ce=l("li"),qe=l("p"),qe.textContent=fs,gn=s(),me=l("details"),Oe=l("summary"),Oe.textContent=Ms,fn=s(),u(ue.$$.fragment),Mn=s(),E=l("li"),Ke=l("p"),Ke.innerHTML=ys,yn=s(),et=l("ul"),et.innerHTML=_s,_n=s(),he=l("details"),tt=l("summary"),tt.textContent=Ts,Tn=s(),u(ge.$$.fragment),bn=s(),fe=l("li"),nt=l("p"),nt.innerHTML=bs,wn=s(),Me=l("details"),st=l("summary"),st.textContent=ws,Jn=s(),u(ye.$$.fragment),Un=s(),_e=l("li"),ot=l("p"),ot.innerHTML=Js,jn=s(),Te=l("details"),at=l("summary"),at.textContent=Us,vn=s(),u(be.$$.fragment),Lt=s(),u(we.$$.fragment),Nt=s(),X=l("div"),u(Je.$$.fragment),Zn=s(),lt=l("p"),lt.textContent=js,In=s(),it=l("p"),it.innerHTML=vs,Gn=s(),L=l("div"),u(Ue.$$.fragment),Xn=s(),rt=l("p"),rt.textContent=Zs,Bn=s(),u(A.$$.fragment),xn=s(),D=l("div"),u(je.$$.fragment),Wn=s(),dt=l("p"),dt.textContent=Is,Yt=s(),u(ve.$$.fragment),Ht=s(),B=l("div"),u(Ze.$$.fragment),kn=s(),pt=l("p"),pt.textContent=Gs,Vn=s(),ct=l("p"),ct.innerHTML=Xs,Cn=s(),N=l("div"),u(Ie.$$.fragment),Rn=s(),mt=l("p"),mt.textContent=Bs,Ln=s(),u(q.$$.fragment),Nn=s(),O=l("div"),u(Ge.$$.fragment),Yn=s(),ut=l("p"),ut.textContent=xs,Ft=s(),u(Xe.$$.fragment),Et=s(),v=l("div"),u(Be.$$.fragment),Hn=s(),ht=l("p"),ht.textContent=Ws,Fn=s(),gt=l("p"),gt.innerHTML=ks,En=s(),Y=l("div"),u(xe.$$.fragment),Qn=s(),ft=l("p"),ft.textContent=Vs,zn=s(),u(K.$$.fragment),$n=s(),ee=l("div"),u(We.$$.fragment),Sn=s(),Mt=l("p"),Mt.textContent=Cs,Pn=s(),te=l("div"),u(ke.$$.fragment),An=s(),yt=l("p"),yt.textContent=Rs,Dn=s(),ne=l("div"),u(Ve.$$.fragment),qn=s(),_t=l("p"),_t.textContent=Ls,Qt=s(),u(Ce.$$.fragment),zt=s(),Z=l("div"),u(Re.$$.fragment),On=s(),Tt=l("div"),u(Le.$$.fragment),Kn=s(),se=l("div"),u(Ne.$$.fragment),es=s(),bt=l("p"),bt.textContent=Ns,ts=s(),oe=l("div"),u(Ye.$$.fragment),ns=s(),wt=l("p"),wt.innerHTML=Ys,ss=s(),ae=l("div"),u(He.$$.fragment),os=s(),Jt=l("p"),Jt.innerHTML=Hs,as=s(),le=l("div"),u(Fe.$$.fragment),ls=s(),Ut=l("p"),Ut.textContent=Fs,is=s(),ie=l("div"),u(Ee.$$.fragment),rs=s(),jt=l("p"),jt.textContent=Es,$t=s(),u(Qe.$$.fragment),St=s(),Q=l("div"),u(ze.$$.fragment),ds=s(),vt=l("p"),vt.textContent=Qs,Pt=s(),u($e.$$.fragment),At=s(),Xt=l("p"),this.h()},l(e){const d=qs("svelte-u9bgzb",document.head);r=i(d,"META",{name:!0,content:!0}),d.forEach(n),J=o(e),T=i(e,"P",{}),w(T).forEach(n),c=o(e),p=i(e,"DIV",{style:!0,"data-svelte-h":!0}),_(p)!=="svelte-py9lmv"&&(p.innerHTML=a),b=o(e),h(G.$$.fragment,e),U=o(e),C=i(e,"P",{"data-svelte-h":!0}),_(C)!=="svelte-1mgfd6u"&&(C.innerHTML=cs),xt=o(e),re=i(e,"P",{"data-svelte-h":!0}),_(re)!=="svelte-1134kk7"&&(re.innerHTML=ms),Wt=o(e),S=i(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),_(S)!=="svelte-4c9qsc"&&(S.innerHTML=us),kt=o(e),de=i(e,"P",{"data-svelte-h":!0}),_(de)!=="svelte-pzhop3"&&(de.textContent=hs),Vt=o(e),h(P.$$.fragment,e),Ct=o(e),h(pe.$$.fragment,e),Rt=o(e),W=i(e,"UL",{});var R=w(W);De=i(R,"LI",{"data-svelte-h":!0}),_(De)!=="svelte-11s63gz"&&(De.innerHTML=gs),hn=o(R),ce=i(R,"LI",{});var Se=w(ce);qe=i(Se,"P",{"data-svelte-h":!0}),_(qe)!=="svelte-nohx4d"&&(qe.textContent=fs),gn=o(Se),me=i(Se,"DETAILS",{});var Pe=w(me);Oe=i(Pe,"SUMMARY",{"data-svelte-h":!0}),_(Oe)!=="svelte-1m0l1gk"&&(Oe.textContent=Ms),fn=o(Pe),h(ue.$$.fragment,Pe),Pe.forEach(n),Se.forEach(n),Mn=o(R),E=i(R,"LI",{});var z=w(E);Ke=i(z,"P",{"data-svelte-h":!0}),_(Ke)!=="svelte-12jhl43"&&(Ke.innerHTML=ys),yn=o(z),et=i(z,"UL",{"data-svelte-h":!0}),_(et)!=="svelte-lvdcu8"&&(et.innerHTML=_s),_n=o(z),he=i(z,"DETAILS",{});var qt=w(he);tt=i(qt,"SUMMARY",{"data-svelte-h":!0}),_(tt)!=="svelte-1m0l1gk"&&(tt.textContent=Ts),Tn=o(qt),h(ge.$$.fragment,qt),qt.forEach(n),z.forEach(n),bn=o(R),fe=i(R,"LI",{});var Ot=w(fe);nt=i(Ot,"P",{"data-svelte-h":!0}),_(nt)!=="svelte-12t398r"&&(nt.innerHTML=bs),wn=o(Ot),Me=i(Ot,"DETAILS",{});var Kt=w(Me);st=i(Kt,"SUMMARY",{"data-svelte-h":!0}),_(st)!=="svelte-1m0l1gk"&&(st.textContent=ws),Jn=o(Kt),h(ye.$$.fragment,Kt),Kt.forEach(n),Ot.forEach(n),Un=o(R),_e=i(R,"LI",{});var en=w(_e);ot=i(en,"P",{"data-svelte-h":!0}),_(ot)!=="svelte-18o91lj"&&(ot.innerHTML=Js),jn=o(en),Te=i(en,"DETAILS",{});var tn=w(Te);at=i(tn,"SUMMARY",{"data-svelte-h":!0}),_(at)!=="svelte-1m0l1gk"&&(at.textContent=Us),vn=o(tn),h(be.$$.fragment,tn),tn.forEach(n),en.forEach(n),R.forEach(n),Lt=o(e),h(we.$$.fragment,e),Nt=o(e),X=i(e,"DIV",{class:!0});var H=w(X);h(Je.$$.fragment,H),Zn=o(H),lt=i(H,"P",{"data-svelte-h":!0}),_(lt)!=="svelte-19ipoo4"&&(lt.textContent=js),In=o(H),it=i(H,"P",{"data-svelte-h":!0}),_(it)!=="svelte-1sr6eg8"&&(it.innerHTML=vs),Gn=o(H),L=i(H,"DIV",{class:!0});var Zt=w(L);h(Ue.$$.fragment,Zt),Xn=o(Zt),rt=i(Zt,"P",{"data-svelte-h":!0}),_(rt)!=="svelte-v78lg8"&&(rt.textContent=Zs),Bn=o(Zt),h(A.$$.fragment,Zt),Zt.forEach(n),xn=o(H),D=i(H,"DIV",{class:!0});var nn=w(D);h(je.$$.fragment,nn),Wn=o(nn),dt=i(nn,"P",{"data-svelte-h":!0}),_(dt)!=="svelte-16q0ax1"&&(dt.textContent=Is),nn.forEach(n),H.forEach(n),Yt=o(e),h(ve.$$.fragment,e),Ht=o(e),B=i(e,"DIV",{class:!0});var F=w(B);h(Ze.$$.fragment,F),kn=o(F),pt=i(F,"P",{"data-svelte-h":!0}),_(pt)!=="svelte-10tczlw"&&(pt.textContent=Gs),Vn=o(F),ct=i(F,"P",{"data-svelte-h":!0}),_(ct)!=="svelte-1sr6eg8"&&(ct.innerHTML=Xs),Cn=o(F),N=i(F,"DIV",{class:!0});var It=w(N);h(Ie.$$.fragment,It),Rn=o(It),mt=i(It,"P",{"data-svelte-h":!0}),_(mt)!=="svelte-v78lg8"&&(mt.textContent=Bs),Ln=o(It),h(q.$$.fragment,It),It.forEach(n),Nn=o(F),O=i(F,"DIV",{class:!0});var sn=w(O);h(Ge.$$.fragment,sn),Yn=o(sn),ut=i(sn,"P",{"data-svelte-h":!0}),_(ut)!=="svelte-16q0ax1"&&(ut.textContent=xs),sn.forEach(n),F.forEach(n),Ft=o(e),h(Xe.$$.fragment,e),Et=o(e),v=i(e,"DIV",{class:!0});var k=w(v);h(Be.$$.fragment,k),Hn=o(k),ht=i(k,"P",{"data-svelte-h":!0}),_(ht)!=="svelte-4vzu4m"&&(ht.textContent=Ws),Fn=o(k),gt=i(k,"P",{"data-svelte-h":!0}),_(gt)!=="svelte-1sr6eg8"&&(gt.innerHTML=ks),En=o(k),Y=i(k,"DIV",{class:!0});var Gt=w(Y);h(xe.$$.fragment,Gt),Qn=o(Gt),ft=i(Gt,"P",{"data-svelte-h":!0}),_(ft)!=="svelte-v78lg8"&&(ft.textContent=Vs),zn=o(Gt),h(K.$$.fragment,Gt),Gt.forEach(n),$n=o(k),ee=i(k,"DIV",{class:!0});var on=w(ee);h(We.$$.fragment,on),Sn=o(on),Mt=i(on,"P",{"data-svelte-h":!0}),_(Mt)!=="svelte-9ak1um"&&(Mt.textContent=Cs),on.forEach(n),Pn=o(k),te=i(k,"DIV",{class:!0});var an=w(te);h(ke.$$.fragment,an),An=o(an),yt=i(an,"P",{"data-svelte-h":!0}),_(yt)!=="svelte-16q0ax1"&&(yt.textContent=Rs),an.forEach(n),Dn=o(k),ne=i(k,"DIV",{class:!0});var ln=w(ne);h(Ve.$$.fragment,ln),qn=o(ln),_t=i(ln,"P",{"data-svelte-h":!0}),_(_t)!=="svelte-1eod455"&&(_t.textContent=Ls),ln.forEach(n),k.forEach(n),Qt=o(e),h(Ce.$$.fragment,e),zt=o(e),Z=i(e,"DIV",{class:!0});var V=w(Z);h(Re.$$.fragment,V),On=o(V),Tt=i(V,"DIV",{class:!0});var zs=w(Tt);h(Le.$$.fragment,zs),zs.forEach(n),Kn=o(V),se=i(V,"DIV",{class:!0});var rn=w(se);h(Ne.$$.fragment,rn),es=o(rn),bt=i(rn,"P",{"data-svelte-h":!0}),_(bt)!=="svelte-tr32vd"&&(bt.textContent=Ns),rn.forEach(n),ts=o(V),oe=i(V,"DIV",{class:!0});var dn=w(oe);h(Ye.$$.fragment,dn),ns=o(dn),wt=i(dn,"P",{"data-svelte-h":!0}),_(wt)!=="svelte-1s3c06i"&&(wt.innerHTML=Ys),dn.forEach(n),ss=o(V),ae=i(V,"DIV",{class:!0});var pn=w(ae);h(He.$$.fragment,pn),os=o(pn),Jt=i(pn,"P",{"data-svelte-h":!0}),_(Jt)!=="svelte-pkn4ui"&&(Jt.innerHTML=Hs),pn.forEach(n),as=o(V),le=i(V,"DIV",{class:!0});var cn=w(le);h(Fe.$$.fragment,cn),ls=o(cn),Ut=i(cn,"P",{"data-svelte-h":!0}),_(Ut)!=="svelte-14bnrb6"&&(Ut.textContent=Fs),cn.forEach(n),is=o(V),ie=i(V,"DIV",{class:!0});var mn=w(ie);h(Ee.$$.fragment,mn),rs=o(mn),jt=i(mn,"P",{"data-svelte-h":!0}),_(jt)!=="svelte-1xwrf7t"&&(jt.textContent=Es),mn.forEach(n),V.forEach(n),$t=o(e),h(Qe.$$.fragment,e),St=o(e),Q=i(e,"DIV",{class:!0});var un=w(Q);h(ze.$$.fragment,un),ds=o(un),vt=i(un,"P",{"data-svelte-h":!0}),_(vt)!=="svelte-ia4jjd"&&(vt.textContent=Qs),un.forEach(n),Pt=o(e),h($e.$$.fragment,e),At=o(e),Xt=i(e,"P",{}),w(Xt).forEach(n),this.h()},h(){j(r,"name","hf:doc:metadata"),j(r,"content",ro),Os(p,"float","right"),j(S,"class","tip"),j(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Q,"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,d){t(document.head,r),m(e,J,d),m(e,T,d),m(e,c,d),m(e,p,d),m(e,b,d),g(G,e,d),m(e,U,d),m(e,C,d),m(e,xt,d),m(e,re,d),m(e,Wt,d),m(e,S,d),m(e,kt,d),m(e,de,d),m(e,Vt,d),g(P,e,d),m(e,Ct,d),g(pe,e,d),m(e,Rt,d),m(e,W,d),t(W,De),t(W,hn),t(W,ce),t(ce,qe),t(ce,gn),t(ce,me),t(me,Oe),t(me,fn),g(ue,me,null),t(W,Mn),t(W,E),t(E,Ke),t(E,yn),t(E,et),t(E,_n),t(E,he),t(he,tt),t(he,Tn),g(ge,he,null),t(W,bn),t(W,fe),t(fe,nt),t(fe,wn),t(fe,Me),t(Me,st),t(Me,Jn),g(ye,Me,null),t(W,Un),t(W,_e),t(_e,ot),t(_e,jn),t(_e,Te),t(Te,at),t(Te,vn),g(be,Te,null),m(e,Lt,d),g(we,e,d),m(e,Nt,d),m(e,X,d),g(Je,X,null),t(X,Zn),t(X,lt),t(X,In),t(X,it),t(X,Gn),t(X,L),g(Ue,L,null),t(L,Xn),t(L,rt),t(L,Bn),g(A,L,null),t(X,xn),t(X,D),g(je,D,null),t(D,Wn),t(D,dt),m(e,Yt,d),g(ve,e,d),m(e,Ht,d),m(e,B,d),g(Ze,B,null),t(B,kn),t(B,pt),t(B,Vn),t(B,ct),t(B,Cn),t(B,N),g(Ie,N,null),t(N,Rn),t(N,mt),t(N,Ln),g(q,N,null),t(B,Nn),t(B,O),g(Ge,O,null),t(O,Yn),t(O,ut),m(e,Ft,d),g(Xe,e,d),m(e,Et,d),m(e,v,d),g(Be,v,null),t(v,Hn),t(v,ht),t(v,Fn),t(v,gt),t(v,En),t(v,Y),g(xe,Y,null),t(Y,Qn),t(Y,ft),t(Y,zn),g(K,Y,null),t(v,$n),t(v,ee),g(We,ee,null),t(ee,Sn),t(ee,Mt),t(v,Pn),t(v,te),g(ke,te,null),t(te,An),t(te,yt),t(v,Dn),t(v,ne),g(Ve,ne,null),t(ne,qn),t(ne,_t),m(e,Qt,d),g(Ce,e,d),m(e,zt,d),m(e,Z,d),g(Re,Z,null),t(Z,On),t(Z,Tt),g(Le,Tt,null),t(Z,Kn),t(Z,se),g(Ne,se,null),t(se,es),t(se,bt),t(Z,ts),t(Z,oe),g(Ye,oe,null),t(oe,ns),t(oe,wt),t(Z,ss),t(Z,ae),g(He,ae,null),t(ae,os),t(ae,Jt),t(Z,as),t(Z,le),g(Fe,le,null),t(le,ls),t(le,Ut),t(Z,is),t(Z,ie),g(Ee,ie,null),t(ie,rs),t(ie,jt),m(e,$t,d),g(Qe,e,d),m(e,St,d),m(e,Q,d),g(ze,Q,null),t(Q,ds),t(Q,vt),m(e,Pt,d),g($e,e,d),m(e,At,d),m(e,Xt,d),Dt=!0},p(e,[d]){const R={};d&2&&(R.$$scope={dirty:d,ctx:e}),P.$set(R);const Se={};d&2&&(Se.$$scope={dirty:d,ctx:e}),A.$set(Se);const Pe={};d&2&&(Pe.$$scope={dirty:d,ctx:e}),q.$set(Pe);const z={};d&2&&(z.$$scope={dirty:d,ctx:e}),K.$set(z)},i(e){Dt||(f(G.$$.fragment,e),f(P.$$.fragment,e),f(pe.$$.fragment,e),f(ue.$$.fragment,e),f(ge.$$.fragment,e),f(ye.$$.fragment,e),f(be.$$.fragment,e),f(we.$$.fragment,e),f(Je.$$.fragment,e),f(Ue.$$.fragment,e),f(A.$$.fragment,e),f(je.$$.fragment,e),f(ve.$$.fragment,e),f(Ze.$$.fragment,e),f(Ie.$$.fragment,e),f(q.$$.fragment,e),f(Ge.$$.fragment,e),f(Xe.$$.fragment,e),f(Be.$$.fragment,e),f(xe.$$.fragment,e),f(K.$$.fragment,e),f(We.$$.fragment,e),f(ke.$$.fragment,e),f(Ve.$$.fragment,e),f(Ce.$$.fragment,e),f(Re.$$.fragment,e),f(Le.$$.fragment,e),f(Ne.$$.fragment,e),f(Ye.$$.fragment,e),f(He.$$.fragment,e),f(Fe.$$.fragment,e),f(Ee.$$.fragment,e),f(Qe.$$.fragment,e),f(ze.$$.fragment,e),f($e.$$.fragment,e),Dt=!0)},o(e){M(G.$$.fragment,e),M(P.$$.fragment,e),M(pe.$$.fragment,e),M(ue.$$.fragment,e),M(ge.$$.fragment,e),M(ye.$$.fragment,e),M(be.$$.fragment,e),M(we.$$.fragment,e),M(Je.$$.fragment,e),M(Ue.$$.fragment,e),M(A.$$.fragment,e),M(je.$$.fragment,e),M(ve.$$.fragment,e),M(Ze.$$.fragment,e),M(Ie.$$.fragment,e),M(q.$$.fragment,e),M(Ge.$$.fragment,e),M(Xe.$$.fragment,e),M(Be.$$.fragment,e),M(xe.$$.fragment,e),M(K.$$.fragment,e),M(We.$$.fragment,e),M(ke.$$.fragment,e),M(Ve.$$.fragment,e),M(Ce.$$.fragment,e),M(Re.$$.fragment,e),M(Le.$$.fragment,e),M(Ne.$$.fragment,e),M(Ye.$$.fragment,e),M(He.$$.fragment,e),M(Fe.$$.fragment,e),M(Ee.$$.fragment,e),M(Qe.$$.fragment,e),M(ze.$$.fragment,e),M($e.$$.fragment,e),Dt=!1},d(e){e&&(n(J),n(T),n(c),n(p),n(b),n(U),n(C),n(xt),n(re),n(Wt),n(S),n(kt),n(de),n(Vt),n(Ct),n(Rt),n(W),n(Lt),n(Nt),n(X),n(Yt),n(Ht),n(B),n(Ft),n(Et),n(v),n(Qt),n(zt),n(Z),n($t),n(St),n(Q),n(Pt),n(At),n(Xt)),n(r),y(G,e),y(P,e),y(pe,e),y(ue),y(ge),y(ye),y(be),y(we,e),y(Je),y(Ue),y(A),y(je),y(ve,e),y(Ze),y(Ie),y(q),y(Ge),y(Xe,e),y(Be),y(xe),y(K),y(We),y(ke),y(Ve),y(Ce,e),y(Re),y(Le),y(Ne),y(Ye),y(He),y(Fe),y(Ee),y(Qe,e),y(ze),y($e,e)}}}const ro='{"title":"LTX-Video","local":"ltx-video","sections":[{"title":"Notes","local":"notes","sections":[],"depth":2},{"title":"LTXPipeline","local":"diffusers.LTXPipeline","sections":[],"depth":2},{"title":"LTXImageToVideoPipeline","local":"diffusers.LTXImageToVideoPipeline","sections":[],"depth":2},{"title":"LTXConditionPipeline","local":"diffusers.LTXConditionPipeline","sections":[],"depth":2},{"title":"LTXLatentUpsamplePipeline","local":"diffusers.LTXLatentUpsamplePipeline","sections":[],"depth":2},{"title":"LTXPipelineOutput","local":"diffusers.pipelines.ltx.pipeline_output.LTXPipelineOutput","sections":[],"depth":2}],"depth":1}';function po(x){return Ps(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class yo extends As{constructor(r){super(),Ds(this,r,po,io,Ss,{})}}export{yo as component};
