import{s as De,o as Ne,n as Ge}from"../chunks/scheduler.8c3d61f6.js";import{S as Se,i as Ee,g as l,s as a,r as h,A as ze,h as p,f as n,c as o,j as K,u as _,x as g,k as ee,y as m,a as s,v,d as b,t as y,w}from"../chunks/index.da70eac4.js";import{T as We}from"../chunks/Tip.1d9b8c37.js";import{D as ve}from"../chunks/Docstring.36ab7a66.js";import{C as Re}from"../chunks/CodeBlock.a9c4becf.js";import{E as He}from"../chunks/ExampleCodeBlock.a18c7ba7.js";import{H as be,E as Oe}from"../chunks/getInferenceSnippets.33773fa8.js";function Fe(J){let i,f="This pipeline is deprecated but it can still be used. However, we won’t test the pipeline anymore and won’t accept any changes to it. If you run into any issues, reinstall the last Diffusers version that supported this model.";return{c(){i=l("p"),i.textContent=f},l(r){i=p(r,"P",{"data-svelte-h":!0}),g(i)!=="svelte-ic4u42"&&(i.textContent=f)},m(r,c){s(r,i,c)},p:Ge,d(r){r&&n(i)}}}function qe(J){let i,f='Make sure to check out the Schedulers <a href="../../using-diffusers/schedulers">guide</a> to learn how to explore the tradeoff between scheduler speed and quality, and see the <a href="../../using-diffusers/loading#reuse-a-pipeline">reuse components across pipelines</a> section to learn how to efficiently load the same components into multiple pipelines. Also, to know more about reducing the memory usage of this pipeline, refer to the [“Reduce memory usage”] section <a href="../../using-diffusers/svd#reduce-memory-usage">here</a>.';return{c(){i=l("p"),i.innerHTML=f},l(r){i=p(r,"P",{"data-svelte-h":!0}),g(i)!=="svelte-1u6tg32"&&(i.innerHTML=f)},m(r,c){s(r,i,c)},p:Ge,d(r){r&&n(i)}}}function Qe(J){let i,f="Examples:",r,c,u;return c=new Re({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwSTJWR2VuWExQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBleHBvcnRfdG9fZ2lmJTJDJTIwbG9hZF9pbWFnZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwSTJWR2VuWExQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyYWxpLXZpbGFiJTJGaTJ2Z2VuLXhsJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMEEpJTBBcGlwZWxpbmUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEElMEFpbWFnZV91cmwlMjAlM0QlMjAoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGZGlmZnVzZXJzJTJGZG9jcy1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRmkydmdlbl94bF9pbWFnZXMlMkZpbWdfMDAwOS5wbmclMjIlMEEpJTBBaW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKGltYWdlX3VybCkuY29udmVydCglMjJSR0IlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyUGFwZXJzJTIwd2VyZSUyMGZsb2F0aW5nJTIwaW4lMjB0aGUlMjBhaXIlMjBvbiUyMGElMjB0YWJsZSUyMGluJTIwdGhlJTIwbGlicmFyeSUyMiUwQW5lZ2F0aXZlX3Byb21wdCUyMCUzRCUyMCUyMkRpc3RvcnRlZCUyQyUyMGRpc2NvbnRpbnVvdXMlMkMlMjBVZ2x5JTJDJTIwYmx1cnJ5JTJDJTIwbG93JTIwcmVzb2x1dGlvbiUyQyUyMG1vdGlvbmxlc3MlMkMlMjBzdGF0aWMlMkMlMjBkaXNmaWd1cmVkJTJDJTIwZGlzY29ubmVjdGVkJTIwbGltYnMlMkMlMjBVZ2x5JTIwZmFjZXMlMkMlMjBpbmNvbXBsZXRlJTIwYXJtcyUyMiUwQWdlbmVyYXRvciUyMCUzRCUyMHRvcmNoLm1hbnVhbF9zZWVkKDg4ODgpJTBBJTBBZnJhbWVzJTIwJTNEJTIwcGlwZWxpbmUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwaW1hZ2UlM0RpbWFnZSUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q1MCUyQyUwQSUyMCUyMCUyMCUyMG5lZ2F0aXZlX3Byb21wdCUzRG5lZ2F0aXZlX3Byb21wdCUyQyUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNEOS4wJTJDJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTBBKS5mcmFtZXMlNUIwJTVEJTBBdmlkZW9fcGF0aCUyMCUzRCUyMGV4cG9ydF90b19naWYoZnJhbWVzJTJDJTIwJTIyaTJ2LmdpZiUyMik=",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> I2VGenXLPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_gif, load_image

<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = I2VGenXLPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;ali-vilab/i2vgen-xl&quot;</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">&quot;fp16&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline.enable_model_cpu_offload()

<span class="hljs-meta">&gt;&gt;&gt; </span>image_url = (
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/docs-images/resolve/main/i2vgen_xl_images/img_0009.png&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = load_image(image_url).convert(<span class="hljs-string">&quot;RGB&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;Papers were floating in the air on a table in the library&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = <span class="hljs-string">&quot;Distorted, discontinuous, Ugly, blurry, low resolution, motionless, static, disfigured, disconnected limbs, Ugly faces, incomplete arms&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generator = torch.manual_seed(<span class="hljs-number">8888</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>frames = pipeline(
<span class="hljs-meta">... </span>    prompt=prompt,
<span class="hljs-meta">... </span>    image=image,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">50</span>,
<span class="hljs-meta">... </span>    negative_prompt=negative_prompt,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">9.0</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>video_path = export_to_gif(frames, <span class="hljs-string">&quot;i2v.gif&quot;</span>)`,wrap:!1}}),{c(){i=l("p"),i.textContent=f,r=a(),h(c.$$.fragment)},l(d){i=p(d,"P",{"data-svelte-h":!0}),g(i)!=="svelte-kvfsh7"&&(i.textContent=f),r=o(d),_(c.$$.fragment,d)},m(d,I){s(d,i,I),s(d,r,I),v(c,d,I),u=!0},p:Ge,i(d){u||(b(c.$$.fragment,d),u=!0)},o(d){y(c.$$.fragment,d),u=!1},d(d){d&&(n(i),n(r)),w(c,d)}}}function Ye(J){let i,f,r,c,u,d,I,ne,P,Je='<a href="https://hf.co/papers/2311.04145.pdf" rel="nofollow">I2VGen-XL: High-Quality Image-to-Video Synthesis via Cascaded Diffusion Models</a> by Shiwei Zhang, Jiayu Wang, Yingya Zhang, Kang Zhao, Hangjie Yuan, Zhiwu Qin, Xiang Wang, Deli Zhao, and Jingren Zhou.',ie,k,Me="The abstract from the paper is:",se,C,Xe='<em>Video synthesis has recently made remarkable strides benefiting from the rapid development of diffusion models. However, it still encounters challenges in terms of semantic accuracy, clarity and spatio-temporal continuity. They primarily arise from the scarcity of well-aligned text-video data and the complex inherent structure of videos, making it difficult for the model to simultaneously ensure semantic and qualitative excellence. In this report, we propose a cascaded I2VGen-XL approach that enhances model performance by decoupling these two factors and ensures the alignment of the input data by utilizing static images as a form of crucial guidance. I2VGen-XL consists of two stages: i) the base stage guarantees coherent semantics and preserves content from input images by using two hierarchical encoders, and ii) the refinement stage enhances the video’s details by incorporating an additional brief text and improves the resolution to 1280×720. To improve the diversity, we collect around 35 million single-shot text-video pairs and 6 billion text-image pairs to optimize the model. By this means, I2VGen-XL can simultaneously enhance the semantic accuracy, continuity of details and clarity of generated videos. Through extensive experiments, we have investigated the underlying principles of I2VGen-XL and compared it with current top methods, which can demonstrate its effectiveness on diverse data. The source code and models will be publicly available at <a href="https://i2vgen-xl.github.io/" rel="nofollow">this https URL</a>.</em>',ae,Z,Ve='The original codebase can be found <a href="https://github.com/ali-vilab/i2vgen-xl/" rel="nofollow">here</a>. The model checkpoints can be found <a href="https://huggingface.co/ali-vilab/" rel="nofollow">here</a>.',oe,M,re,j,Pe="Sample output with I2VGenXL:",le,U,ke=`<tbody><tr><td><center>library.
        <br/> <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/i2vgen-xl-example.gif" alt="library" style="width: 300px;"/></center></td></tr></tbody>`,pe,B,de,W,Ce='<li>I2VGenXL always uses a <code>clip_skip</code> value of 1. This means it leverages the penultimate layer representations from the text encoder of CLIP.</li> <li>It can generate videos of quality that is often on par with <a href="../../using-diffusers/svd">Stable Video Diffusion</a> (SVD).</li> <li>Unlike SVD, it additionally accepts text prompts as inputs.</li> <li>It can generate higher resolution videos.</li> <li>When using the <a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a> (which is default for this pipeline), less than 50 steps for inference leads to bad results.</li> <li>This implementation is 1-stage variant of I2VGenXL. The main figure in the <a href="https://huggingface.co/papers/2311.04145" rel="nofollow">I2VGen-XL</a> paper shows a 2-stage variant, however, 1-stage variant works well. See <a href="https://github.com/huggingface/diffusers/discussions/7952" rel="nofollow">this discussion</a> for more details.</li>',ce,D,me,T,N,ye,$,S,we,F,Ze='The call function to the pipeline for image-to-video generation with <a href="/docs/diffusers/main/en/api/pipelines/i2vgenxl#diffusers.I2VGenXLPipeline">I2VGenXLPipeline</a>.',Ie,X,Te,V,E,xe,q,je="Encodes the prompt into text encoder hidden states.",ge,z,fe,x,R,$e,Q,Ue="Output class for image-to-video pipeline.",Le,Y,Be=`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>`,ue,H,he,te,_e;return u=new We({props:{warning:!0,$$slots:{default:[Fe]},$$scope:{ctx:J}}}),I=new be({props:{title:"I2VGen-XL",local:"i2vgen-xl",headingTag:"h1"}}),M=new We({props:{$$slots:{default:[qe]},$$scope:{ctx:J}}}),B=new be({props:{title:"Notes",local:"notes",headingTag:"h2"}}),D=new be({props:{title:"I2VGenXLPipeline",local:"diffusers.I2VGenXLPipeline",headingTag:"h2"}}),N=new ve({props:{name:"class diffusers.I2VGenXLPipeline",anchor:"diffusers.I2VGenXLPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"image_encoder",val:": CLIPVisionModelWithProjection"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"unet",val:": I2VGenXLUNet"},{name:"scheduler",val:": DDIMScheduler"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/i2vgen_xl/pipeline_i2vgen_xl.py#L99"}}),S=new ve({props:{name:"__call__",anchor:"diffusers.I2VGenXLPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = 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]] = None"},{name:"height",val:": typing.Optional[int] = 704"},{name:"width",val:": typing.Optional[int] = 1280"},{name:"target_fps",val:": typing.Optional[int] = 16"},{name:"num_frames",val:": int = 16"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 9.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"eta",val:": float = 0.0"},{name:"num_videos_per_prompt",val:": typing.Optional[int] = 1"},{name:"decode_chunk_size",val:": typing.Optional[int] = 1"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"cross_attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"clip_skip",val:": typing.Optional[int] = 1"}],parametersDescription:[{anchor:"diffusers.I2VGenXLPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide image generation. If not defined, you need to pass <code>prompt_embeds</code>.`,name:"prompt"},{anchor:"diffusers.I2VGenXLPipeline.__call__.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code> or <code>List[PIL.Image.Image]</code> or <code>torch.Tensor</code>) &#x2014;
Image or images to guide image generation. If you provide a tensor, it needs to be compatible with
<a href="https://huggingface.co/lambdalabs/sd-image-variations-diffusers/blob/main/feature_extractor/preprocessor_config.json" rel="nofollow"><code>CLIPImageProcessor</code></a>.`,name:"image"},{anchor:"diffusers.I2VGenXLPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.I2VGenXLPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.I2VGenXLPipeline.__call__.target_fps",description:`<strong>target_fps</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Frames per second. The rate at which the generated images shall be exported to a video after
generation. This is also used as a &#x201C;micro-condition&#x201D; while generation.`,name:"target_fps"},{anchor:"diffusers.I2VGenXLPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of video frames to generate.`,name:"num_frames"},{anchor:"diffusers.I2VGenXLPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of denoising steps.`,name:"num_inference_steps"},{anchor:"diffusers.I2VGenXLPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.I2VGenXLPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide what to not include in image generation. If not defined, you need to
pass <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (<code>guidance_scale &lt; 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.I2VGenXLPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Corresponds to parameter eta (&#x3B7;) from the <a href="https://huggingface.co/papers/2010.02502" rel="nofollow">DDIM</a> paper. Only
applies to the <a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.I2VGenXLPipeline.__call__.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of images to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.I2VGenXLPipeline.__call__.decode_chunk_size",description:`<strong>decode_chunk_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of frames to decode at a time. The higher the chunk size, the higher the temporal
consistency between frames, but also the higher the memory consumption. By default, the decoder will
decode all frames at once for maximal quality. Reduce <code>decode_chunk_size</code> to reduce memory usage.`,name:"decode_chunk_size"},{anchor:"diffusers.I2VGenXLPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.I2VGenXLPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.I2VGenXLPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.I2VGenXLPipeline.__call__.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 (prompt weighting). If
not provided, <code>negative_prompt_embeds</code> are generated from the <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.I2VGenXLPipeline.__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 generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.I2VGenXLPipeline.__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 <a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.I2VGenXLPipeline.__call__.cross_attention_kwargs",description:`<strong>cross_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 in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow"><code>self.processor</code></a>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.I2VGenXLPipeline.__call__.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/i2vgen_xl/pipeline_i2vgen_xl.py#L510",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/main/en/api/pipelines/i2vgenxl#diffusers.pipelines.i2vgen_xl.pipeline_i2vgen_xl.I2VGenXLPipelineOutput"
>pipelines.i2vgen_xl.pipeline_i2vgen_xl.I2VGenXLPipelineOutput</a> is
returned, otherwise a <code>tuple</code> is returned where the first element is a list with the generated frames.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/pipelines/i2vgenxl#diffusers.pipelines.i2vgen_xl.pipeline_i2vgen_xl.I2VGenXLPipelineOutput"
>pipelines.i2vgen_xl.pipeline_i2vgen_xl.I2VGenXLPipelineOutput</a> or <code>tuple</code></p>
`}}),X=new He({props:{anchor:"diffusers.I2VGenXLPipeline.__call__.example",$$slots:{default:[Qe]},$$scope:{ctx:J}}}),E=new ve({props:{name:"encode_prompt",anchor:"diffusers.I2VGenXLPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:""},{name:"num_videos_per_prompt",val:""},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"clip_skip",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.I2VGenXLPipeline.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.I2VGenXLPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>):
torch device`,name:"device"},{anchor:"diffusers.I2VGenXLPipeline.encode_prompt.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_videos_per_prompt"},{anchor:"diffusers.I2VGenXLPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.I2VGenXLPipeline.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.I2VGenXLPipeline.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.I2VGenXLPipeline.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.I2VGenXLPipeline.encode_prompt.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/i2vgen_xl/pipeline_i2vgen_xl.py#L162"}}),z=new be({props:{title:"I2VGenXLPipelineOutput",local:"diffusers.pipelines.i2vgen_xl.pipeline_i2vgen_xl.I2VGenXLPipelineOutput",headingTag:"h2"}}),R=new ve({props:{name:"class diffusers.pipelines.i2vgen_xl.pipeline_i2vgen_xl.I2VGenXLPipelineOutput",anchor:"diffusers.pipelines.i2vgen_xl.pipeline_i2vgen_xl.I2VGenXLPipelineOutput",parameters:[{name:"frames",val:": typing.Union[torch.Tensor, numpy.ndarray, typing.List[typing.List[PIL.Image.Image]]]"}],parametersDescription:[{anchor:"diffusers.pipelines.i2vgen_xl.pipeline_i2vgen_xl.I2VGenXLPipelineOutput.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`,name:"frames"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/i2vgen_xl/pipeline_i2vgen_xl.py#L83"}}),H=new Oe({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/i2vgenxl.md"}}),{c(){i=l("meta"),f=a(),r=l("p"),c=a(),h(u.$$.fragment),d=a(),h(I.$$.fragment),ne=a(),P=l("p"),P.innerHTML=Je,ie=a(),k=l("p"),k.textContent=Me,se=a(),C=l("p"),C.innerHTML=Xe,ae=a(),Z=l("p"),Z.innerHTML=Ve,oe=a(),h(M.$$.fragment),re=a(),j=l("p"),j.textContent=Pe,le=a(),U=l("table"),U.innerHTML=ke,pe=a(),h(B.$$.fragment),de=a(),W=l("ul"),W.innerHTML=Ce,ce=a(),h(D.$$.fragment),me=a(),T=l("div"),h(N.$$.fragment),ye=a(),$=l("div"),h(S.$$.fragment),we=a(),F=l("p"),F.innerHTML=Ze,Ie=a(),h(X.$$.fragment),Te=a(),V=l("div"),h(E.$$.fragment),xe=a(),q=l("p"),q.textContent=je,ge=a(),h(z.$$.fragment),fe=a(),x=l("div"),h(R.$$.fragment),$e=a(),Q=l("p"),Q.textContent=Ue,Le=a(),Y=l("p"),Y.innerHTML=Be,ue=a(),h(H.$$.fragment),he=a(),te=l("p"),this.h()},l(e){const t=ze("svelte-u9bgzb",document.head);i=p(t,"META",{name:!0,content:!0}),t.forEach(n),f=o(e),r=p(e,"P",{}),K(r).forEach(n),c=o(e),_(u.$$.fragment,e),d=o(e),_(I.$$.fragment,e),ne=o(e),P=p(e,"P",{"data-svelte-h":!0}),g(P)!=="svelte-1wrjkyv"&&(P.innerHTML=Je),ie=o(e),k=p(e,"P",{"data-svelte-h":!0}),g(k)!=="svelte-1cwsb16"&&(k.textContent=Me),se=o(e),C=p(e,"P",{"data-svelte-h":!0}),g(C)!=="svelte-uj6rwn"&&(C.innerHTML=Xe),ae=o(e),Z=p(e,"P",{"data-svelte-h":!0}),g(Z)!=="svelte-1okzf4k"&&(Z.innerHTML=Ve),oe=o(e),_(M.$$.fragment,e),re=o(e),j=p(e,"P",{"data-svelte-h":!0}),g(j)!=="svelte-e24chm"&&(j.textContent=Pe),le=o(e),U=p(e,"TABLE",{"data-svelte-h":!0}),g(U)!=="svelte-1d0ljr7"&&(U.innerHTML=ke),pe=o(e),_(B.$$.fragment,e),de=o(e),W=p(e,"UL",{"data-svelte-h":!0}),g(W)!=="svelte-dpq0rm"&&(W.innerHTML=Ce),ce=o(e),_(D.$$.fragment,e),me=o(e),T=p(e,"DIV",{class:!0});var L=K(T);_(N.$$.fragment,L),ye=o(L),$=p(L,"DIV",{class:!0});var G=K($);_(S.$$.fragment,G),we=o(G),F=p(G,"P",{"data-svelte-h":!0}),g(F)!=="svelte-wf4rrn"&&(F.innerHTML=Ze),Ie=o(G),_(X.$$.fragment,G),G.forEach(n),Te=o(L),V=p(L,"DIV",{class:!0});var O=K(V);_(E.$$.fragment,O),xe=o(O),q=p(O,"P",{"data-svelte-h":!0}),g(q)!=="svelte-16q0ax1"&&(q.textContent=je),O.forEach(n),L.forEach(n),ge=o(e),_(z.$$.fragment,e),fe=o(e),x=p(e,"DIV",{class:!0});var A=K(x);_(R.$$.fragment,A),$e=o(A),Q=p(A,"P",{"data-svelte-h":!0}),g(Q)!=="svelte-ulnuw9"&&(Q.textContent=Ue),Le=o(A),Y=p(A,"P",{"data-svelte-h":!0}),g(Y)!=="svelte-gk6g69"&&(Y.innerHTML=Be),A.forEach(n),ue=o(e),_(H.$$.fragment,e),he=o(e),te=p(e,"P",{}),K(te).forEach(n),this.h()},h(){ee(i,"name","hf:doc:metadata"),ee(i,"content",Ae),ee($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ee(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ee(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ee(x,"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,t){m(document.head,i),s(e,f,t),s(e,r,t),s(e,c,t),v(u,e,t),s(e,d,t),v(I,e,t),s(e,ne,t),s(e,P,t),s(e,ie,t),s(e,k,t),s(e,se,t),s(e,C,t),s(e,ae,t),s(e,Z,t),s(e,oe,t),v(M,e,t),s(e,re,t),s(e,j,t),s(e,le,t),s(e,U,t),s(e,pe,t),v(B,e,t),s(e,de,t),s(e,W,t),s(e,ce,t),v(D,e,t),s(e,me,t),s(e,T,t),v(N,T,null),m(T,ye),m(T,$),v(S,$,null),m($,we),m($,F),m($,Ie),v(X,$,null),m(T,Te),m(T,V),v(E,V,null),m(V,xe),m(V,q),s(e,ge,t),v(z,e,t),s(e,fe,t),s(e,x,t),v(R,x,null),m(x,$e),m(x,Q),m(x,Le),m(x,Y),s(e,ue,t),v(H,e,t),s(e,he,t),s(e,te,t),_e=!0},p(e,[t]){const L={};t&2&&(L.$$scope={dirty:t,ctx:e}),u.$set(L);const G={};t&2&&(G.$$scope={dirty:t,ctx:e}),M.$set(G);const O={};t&2&&(O.$$scope={dirty:t,ctx:e}),X.$set(O)},i(e){_e||(b(u.$$.fragment,e),b(I.$$.fragment,e),b(M.$$.fragment,e),b(B.$$.fragment,e),b(D.$$.fragment,e),b(N.$$.fragment,e),b(S.$$.fragment,e),b(X.$$.fragment,e),b(E.$$.fragment,e),b(z.$$.fragment,e),b(R.$$.fragment,e),b(H.$$.fragment,e),_e=!0)},o(e){y(u.$$.fragment,e),y(I.$$.fragment,e),y(M.$$.fragment,e),y(B.$$.fragment,e),y(D.$$.fragment,e),y(N.$$.fragment,e),y(S.$$.fragment,e),y(X.$$.fragment,e),y(E.$$.fragment,e),y(z.$$.fragment,e),y(R.$$.fragment,e),y(H.$$.fragment,e),_e=!1},d(e){e&&(n(f),n(r),n(c),n(d),n(ne),n(P),n(ie),n(k),n(se),n(C),n(ae),n(Z),n(oe),n(re),n(j),n(le),n(U),n(pe),n(de),n(W),n(ce),n(me),n(T),n(ge),n(fe),n(x),n(ue),n(he),n(te)),n(i),w(u,e),w(I,e),w(M,e),w(B,e),w(D,e),w(N),w(S),w(X),w(E),w(z,e),w(R),w(H,e)}}}const Ae='{"title":"I2VGen-XL","local":"i2vgen-xl","sections":[{"title":"Notes","local":"notes","sections":[],"depth":2},{"title":"I2VGenXLPipeline","local":"diffusers.I2VGenXLPipeline","sections":[],"depth":2},{"title":"I2VGenXLPipelineOutput","local":"diffusers.pipelines.i2vgen_xl.pipeline_i2vgen_xl.I2VGenXLPipelineOutput","sections":[],"depth":2}],"depth":1}';function Ke(J){return Ne(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class rt extends Se{constructor(i){super(),Ee(this,i,Ke,Ye,De,{})}}export{rt as component};
