import{s as vt,o as It,n as Qe}from"../chunks/scheduler.8c3d61f6.js";import{S as Tt,i as Jt,g as l,s,r as c,A as Ut,h as r,f as n,c as o,j as fe,u as m,x as d,k as ce,y as w,a as i,v as u,d as g,t as f,w as h}from"../chunks/index.da70eac4.js";import{T as nt}from"../chunks/Tip.1d9b8c37.js";import{D as ze}from"../chunks/Docstring.36ab7a66.js";import{C as it}from"../chunks/CodeBlock.a9c4becf.js";import{E as Pt}from"../chunks/ExampleCodeBlock.a18c7ba7.js";import{H as A,E as Zt}from"../chunks/getInferenceSnippets.33773fa8.js";function xt(T){let a,y="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(){a=l("p"),a.textContent=y},l(p){a=r(p,"P",{"data-svelte-h":!0}),d(a)!=="svelte-ic4u42"&&(a.textContent=y)},m(p,b){i(p,a,b)},p:Qe,d(p){p&&n(a)}}}function $t(T){let a,y="If you plan on using a scheduler that can clip samples, make sure to disable it by setting <code>clip_sample=False</code> in the scheduler as this can also have an adverse effect on generated samples. Additionally, the PIA checkpoints can be sensitive to the beta schedule of the scheduler. We recommend setting this to <code>linear</code>.";return{c(){a=l("p"),a.innerHTML=y},l(p){a=r(p,"P",{"data-svelte-h":!0}),d(a)!=="svelte-1a93myr"&&(a.innerHTML=y)},m(p,b){i(p,a,b)},p:Qe,d(p){p&&n(a)}}}function jt(T){let a,y="FreeInit is not really free - the improved quality comes at the cost of extra computation. It requires sampling a few extra times depending on the <code>num_iters</code> parameter that is set when enabling it. Setting the <code>use_fast_sampling</code> parameter to <code>True</code> can improve the overall performance (at the cost of lower quality compared to when <code>use_fast_sampling=False</code> but still better results than vanilla video generation models).";return{c(){a=l("p"),a.innerHTML=y},l(p){a=r(p,"P",{"data-svelte-h":!0}),d(a)!=="svelte-xxwpr5"&&(a.innerHTML=y)},m(p,b){i(p,a,b)},p:Qe,d(p){p&&n(a)}}}function kt(T){let a,y="Examples:",p,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lMjBpbiUyMGElMjBoYXQlMjIlMEFuZWdhdGl2ZV9wcm9tcHQlMjAlM0QlMjAlMjJ3cm9uZyUyMHdoaXRlJTIwYmFsYW5jZSUyQyUyMGRhcmslMkMlMjBza2V0Y2hlcyUyQyUyMHdvcnN0JTIwcXVhbGl0eSUyQyUyMGxvdyUyMHF1YWxpdHklMkMlMjBkZWZvcm1lZCUyQyUyMGRpc3RvcnRlZCUyMiUwQWdlbmVyYXRvciUyMCUzRCUyMHRvcmNoLkdlbmVyYXRvciglMjJjcHUlMjIpLm1hbnVhbF9zZWVkKDApJTBBb3V0cHV0JTIwJTNEJTIwcGlwZShpbWFnZSUzRGltYWdlJTJDJTIwcHJvbXB0JTNEcHJvbXB0JTJDJTIwbmVnYXRpdmVfcHJvbXB0JTNEbmVnYXRpdmVfcHJvbXB0JTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yKSUwQWZyYW1lcyUyMCUzRCUyMG91dHB1dC5mcmFtZXMlNUIwJTVEJTBBZXhwb3J0X3RvX2dpZihmcmFtZXMlMkMlMjAlMjJwaWEtYW5pbWF0aW9uLmdpZiUyMik=",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> EulerDiscreteScheduler, MotionAdapter, PIAPipeline
<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>adapter = MotionAdapter.from_pretrained(<span class="hljs-string">&quot;openmmlab/PIA-condition-adapter&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = PIAPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;SG161222/Realistic_Vision_V6.0_B1_noVAE&quot;</span>, motion_adapter=adapter, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
<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/hf-internal-testing/diffusers-images/resolve/main/pix2pix/cat_6.png?download=true&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = image.resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;cat in a hat&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = <span class="hljs-string">&quot;wrong white balance, dark, sketches, worst quality, low quality, deformed, distorted&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generator = torch.Generator(<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>output = pipe(image=image, prompt=prompt, negative_prompt=negative_prompt, generator=generator)
<span class="hljs-meta">&gt;&gt;&gt; </span>frames = output.frames[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>export_to_gif(frames, <span class="hljs-string">&quot;pia-animation.gif&quot;</span>)`,wrap:!1}}),{c(){a=l("p"),a.textContent=y,p=s(),c(b.$$.fragment)},l(_){a=r(_,"P",{"data-svelte-h":!0}),d(a)!=="svelte-kvfsh7"&&(a.textContent=y),p=o(_),m(b.$$.fragment,_)},m(_,v){i(_,a,v),i(_,p,v),u(b,_,v),M=!0},p:Qe,i(_){M||(g(b.$$.fragment,_),M=!0)},o(_){f(b.$$.fragment,_),M=!1},d(_){_&&(n(a),n(p)),h(b,_)}}}function Gt(T){let a,y,p,b,M,_,v,_e,x,at='<img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/>',be,W,ye,V,st='<a href="https://huggingface.co/papers/2312.13964" rel="nofollow">PIA: Your Personalized Image Animator via Plug-and-Play Modules in Text-to-Image Models</a> by Yiming Zhang, Zhening Xing, Yanhong Zeng, Youqing Fang, Kai Chen',Me,B,ot="Recent advancements in personalized text-to-image (T2I) models have revolutionized content creation, empowering non-experts to generate stunning images with unique styles. While promising, adding realistic motions into these personalized images by text poses significant challenges in preserving distinct styles, high-fidelity details, and achieving motion controllability by text. In this paper, we present PIA, a Personalized Image Animator that excels in aligning with condition images, achieving motion controllability by text, and the compatibility with various personalized T2I models without specific tuning. To achieve these goals, PIA builds upon a base T2I model with well-trained temporal alignment layers, allowing for the seamless transformation of any personalized T2I model into an image animation model. A key component of PIA is the introduction of the condition module, which utilizes the condition frame and inter-frame affinity as input to transfer appearance information guided by the affinity hint for individual frame synthesis in the latent space. This design mitigates the challenges of appearance-related image alignment within and allows for a stronger focus on aligning with motion-related guidance.",we,C,lt='<a href="https://pi-animator.github.io/" rel="nofollow">Project page</a>',ve,X,Ie,R,rt='<thead><tr><th>Pipeline</th> <th>Tasks</th> <th align="center">Demo</th></tr></thead> <tbody><tr><td><a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pia/pipeline_pia.py" rel="nofollow">PIAPipeline</a></td> <td><em>Image-to-Video Generation with PIA</em></td> <td align="center"></td></tr></tbody>',Te,E,Je,Y,pt='Motion Adapter checkpoints for PIA can be found under the <a href="https://huggingface.co/openmmlab/PIA-condition-adapter" rel="nofollow">OpenMMLab org</a>. These checkpoints are meant to work with any model based on Stable Diffusion 1.5',Ue,N,Pe,F,dt="PIA works with a MotionAdapter checkpoint and a Stable Diffusion 1.5 model checkpoint. The MotionAdapter is a collection of Motion Modules that are responsible for adding coherent motion across image frames. These modules are applied after the Resnet and Attention blocks in the Stable Diffusion UNet. In addition to the motion modules, PIA also replaces the input convolution layer of the SD 1.5 UNet model with a 9 channel input convolution layer.",Ze,S,ct="The following example demonstrates how to use PIA to generate a video from a single image.",xe,L,$e,H,mt="Here are some sample outputs:",je,z,ut=`<tbody><tr><td><center>cat in a field.
        <br/> <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/pia-default-output.gif" alt="cat in a field" style="width: 300px;"/></center></td></tr></tbody>`,ke,$,Ge,Q,Ae,q,gt='<a href="https://huggingface.co/papers/2312.07537" rel="nofollow">FreeInit: Bridging Initialization Gap in Video Diffusion Models</a> by Tianxing Wu, Chenyang Si, Yuming Jiang, Ziqi Huang, Ziwei Liu.',We,D,ft="FreeInit is an effective method that improves temporal consistency and overall quality of videos generated using video-diffusion-models without any addition training. It can be applied to PIA, AnimateDiff, ModelScope, VideoCrafter and various other video generation models seamlessly at inference time, and works by iteratively refining the latent-initialization noise. More details can be found it the paper.",Ve,O,ht="The following example demonstrates the usage of FreeInit.",Be,K,Ce,ee,_t=`<tbody><tr><td><center>cat in a field.
        <br/> <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/pia-freeinit-output-cat.gif" alt="cat in a field" style="width: 300px;"/></center></td></tr></tbody>`,Xe,j,Re,te,Ee,I,ne,qe,J,ie,De,me,bt="The call function to the pipeline for generation.",Oe,k,Ke,G,ae,et,ue,yt="Encodes the prompt into text encoder hidden states.",Ye,se,Mt="<li>enable_freeu</li> <li>disable_freeu</li> <li>enable_free_init</li> <li>disable_free_init</li> <li>enable_vae_slicing</li> <li>disable_vae_slicing</li> <li>enable_vae_tiling</li> <li>disable_vae_tiling</li>",Ne,oe,Fe,U,le,tt,ge,wt="Output class for PIAPipeline.",Se,re,Le,he,He;return M=new nt({props:{warning:!0,$$slots:{default:[xt]},$$scope:{ctx:T}}}),v=new A({props:{title:"Image-to-Video Generation with PIA (Personalized Image Animator)",local:"image-to-video-generation-with-pia-personalized-image-animator",headingTag:"h1"}}),W=new A({props:{title:"Overview",local:"overview",headingTag:"h2"}}),X=new A({props:{title:"Available Pipelines",local:"available-pipelines",headingTag:"h2"}}),E=new A({props:{title:"Available checkpoints",local:"available-checkpoints",headingTag:"h2"}}),N=new A({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WFpbiUyRnBpeDJwaXglMkZjYXRfNi5wbmclM0Zkb3dubG9hZCUzRHRydWUlMjIlMEEpJTBBaW1hZ2UlMjAlM0QlMjBpbWFnZS5yZXNpemUoKDUxMiUyQyUyMDUxMikpJTBBcHJvbXB0JTIwJTNEJTIwJTIyY2F0JTIwaW4lMjBhJTIwZmllbGQlMjIlMEFuZWdhdGl2ZV9wcm9tcHQlMjAlM0QlMjAlMjJ3cm9uZyUyMHdoaXRlJTIwYmFsYW5jZSUyQyUyMGRhcmslMkMlMjBza2V0Y2hlcyUyQ3dvcnN0JTIwcXVhbGl0eSUyQ2xvdyUyMHF1YWxpdHklMjIlMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoJTIyY3B1JTIyKS5tYW51YWxfc2VlZCgwKSUwQW91dHB1dCUyMCUzRCUyMHBpcGUoaW1hZ2UlM0RpbWFnZSUyQyUyMHByb21wdCUzRHByb21wdCUyQyUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciklMEFmcmFtZXMlMjAlM0QlMjBvdXRwdXQuZnJhbWVzJTVCMCU1RCUwQWV4cG9ydF90b19naWYoZnJhbWVzJTJDJTIwJTIycGlhLWFuaW1hdGlvbi5naWYlMjIp",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> (
    EulerDiscreteScheduler,
    MotionAdapter,
    PIAPipeline,
)
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_gif, load_image

adapter = MotionAdapter.from_pretrained(<span class="hljs-string">&quot;openmmlab/PIA-condition-adapter&quot;</span>)
pipe = PIAPipeline.from_pretrained(<span class="hljs-string">&quot;SG161222/Realistic_Vision_V6.0_B1_noVAE&quot;</span>, motion_adapter=adapter, torch_dtype=torch.float16)

pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
pipe.enable_model_cpu_offload()
pipe.enable_vae_slicing()

image = load_image(
    <span class="hljs-string">&quot;https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/pix2pix/cat_6.png?download=true&quot;</span>
)
image = image.resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))
prompt = <span class="hljs-string">&quot;cat in a field&quot;</span>
negative_prompt = <span class="hljs-string">&quot;wrong white balance, dark, sketches,worst quality,low quality&quot;</span>

generator = torch.Generator(<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
output = pipe(image=image, prompt=prompt, generator=generator)
frames = output.frames[<span class="hljs-number">0</span>]
export_to_gif(frames, <span class="hljs-string">&quot;pia-animation.gif&quot;</span>)`,wrap:!1}}),$=new nt({props:{$$slots:{default:[$t]},$$scope:{ctx:T}}}),Q=new A({props:{title:"Using FreeInit",local:"using-freeinit",headingTag:"h2"}}),K=new it({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwKCUwQSUyMCUyMCUyMCUyMERESU1TY2hlZHVsZXIlMkMlMEElMjAlMjAlMjAlMjBNb3Rpb25BZGFwdGVyJTJDJTBBJTIwJTIwJTIwJTIwUElBUGlwZWxpbmUlMkMlMEEpJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b19naWYlMkMlMjBsb2FkX2ltYWdlJTBBJTBBYWRhcHRlciUyMCUzRCUyME1vdGlvbkFkYXB0ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5tbWxhYiUyRlBJQS1jb25kaXRpb24tYWRhcHRlciUyMiklMEFwaXBlJTIwJTNEJTIwUElBUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMlNHMTYxMjIyJTJGUmVhbGlzdGljX1Zpc2lvbl9WNi4wX0IxX25vVkFFJTIyJTJDJTIwbW90aW9uX2FkYXB0ZXIlM0RhZGFwdGVyKSUwQSUwQSUyMyUyMGVuYWJsZSUyMEZyZWVJbml0JTB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NEJTIwdG9yY2guR2VuZXJhdG9yKCUyMmNwdSUyMikubWFudWFsX3NlZWQoMCklMEElMEFvdXRwdXQlMjAlM0QlMjBwaXBlKGltYWdlJTNEaW1hZ2UlMkMlMjBwcm9tcHQlM0Rwcm9tcHQlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IpJTBBZnJhbWVzJTIwJTNEJTIwb3V0cHV0LmZyYW1lcyU1QjAlNUQlMEFleHBvcnRfdG9fZ2lmKGZyYW1lcyUyQyUyMCUyMnBpYS1mcmVlaW5pdC1hbmltYXRpb24uZ2lmJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> (
    DDIMScheduler,
    MotionAdapter,
    PIAPipeline,
)
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_gif, load_image

adapter = MotionAdapter.from_pretrained(<span class="hljs-string">&quot;openmmlab/PIA-condition-adapter&quot;</span>)
pipe = PIAPipeline.from_pretrained(<span class="hljs-string">&quot;SG161222/Realistic_Vision_V6.0_B1_noVAE&quot;</span>, motion_adapter=adapter)

<span class="hljs-comment"># enable FreeInit</span>
<span class="hljs-comment"># Refer to the enable_free_init documentation for a full list of configurable parameters</span>
pipe.enable_free_init(method=<span class="hljs-string">&quot;butterworth&quot;</span>, use_fast_sampling=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># Memory saving options</span>
pipe.enable_model_cpu_offload()
pipe.enable_vae_slicing()

pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
image = load_image(
    <span class="hljs-string">&quot;https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/pix2pix/cat_6.png?download=true&quot;</span>
)
image = image.resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))
prompt = <span class="hljs-string">&quot;cat in a field&quot;</span>
negative_prompt = <span class="hljs-string">&quot;wrong white balance, dark, sketches,worst quality,low quality&quot;</span>

generator = torch.Generator(<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">0</span>)

output = pipe(image=image, prompt=prompt, generator=generator)
frames = output.frames[<span class="hljs-number">0</span>]
export_to_gif(frames, <span class="hljs-string">&quot;pia-freeinit-animation.gif&quot;</span>)`,wrap:!1}}),j=new nt({props:{warning:!0,$$slots:{default:[jt]},$$scope:{ctx:T}}}),te=new A({props:{title:"PIAPipeline",local:"diffusers.PIAPipeline",headingTag:"h2"}}),ne=new ze({props:{name:"class diffusers.PIAPipeline",anchor:"diffusers.PIAPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": typing.Union[diffusers.models.unets.unet_2d_condition.UNet2DConditionModel, diffusers.models.unets.unet_motion_model.UNetMotionModel]"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_pndm.PNDMScheduler, diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler, diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteScheduler, diffusers.schedulers.scheduling_euler_ancestral_discrete.EulerAncestralDiscreteScheduler, diffusers.schedulers.scheduling_dpmsolver_multistep.DPMSolverMultistepScheduler]"},{name:"motion_adapter",val:": typing.Optional[diffusers.models.unets.unet_motion_model.MotionAdapter] = None"},{name:"feature_extractor",val:": CLIPImageProcessor = None"},{name:"image_encoder",val:": CLIPVisionModelWithProjection = None"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pia/pipeline_pia.py#L134"}}),ie=new ze({props:{name:"__call__",anchor:"diffusers.PIAPipeline.__call__",parameters:[{name:"image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor]]"},{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"strength",val:": float = 1.0"},{name:"num_frames",val:": typing.Optional[int] = 16"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_videos_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{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:"ip_adapter_image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor], NoneType] = None"},{name:"ip_adapter_image_embeds",val:": typing.Optional[typing.List[torch.Tensor]] = None"},{name:"motion_scale",val:": int = 0"},{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] = 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']"}],parametersDescription:[{anchor:"diffusers.PIAPipeline.__call__.image",description:`<strong>image</strong> (<code>PipelineImageInput</code>) &#x2014;
The input image to be used for video generation.`,name:"image"},{anchor:"diffusers.PIAPipeline.__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.PIAPipeline.__call__.strength",description:`<strong>strength</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Indicates extent to transform the reference <code>image</code>. Must be between 0 and 1.`,name:"strength"},{anchor:"diffusers.PIAPipeline.__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 video.`,name:"height"},{anchor:"diffusers.PIAPipeline.__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 video.`,name:"width"},{anchor:"diffusers.PIAPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The number of video frames that are generated. Defaults to 16 frames which at 8 frames per seconds
amounts to 2 seconds of video.`,name:"num_frames"},{anchor:"diffusers.PIAPipeline.__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 videos at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.PIAPipeline.__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.PIAPipeline.__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.PIAPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#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.PIAPipeline.__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.PIAPipeline.__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 video
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>. Latents should be of shape
<code>(batch_size, num_channel, num_frames, height, width)</code>.`,name:"latents"},{anchor:"diffusers.PIAPipeline.__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.PIAPipeline.__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.PIAPipeline.__call__.ip_adapter_image",description:`<strong>ip_adapter_image</strong> &#x2014; (<code>PipelineImageInput</code>, <em>optional</em>):
Optional image input to work with IP Adapters.`,name:"ip_adapter_image"},{anchor:"diffusers.PIAPipeline.__call__.ip_adapter_image_embeds",description:`<strong>ip_adapter_image_embeds</strong> (<code>List[torch.Tensor]</code>, <em>optional</em>) &#x2014;
Pre-generated image embeddings for IP-Adapter. It should be a list of length same as number of
IP-adapters. Each element should be a tensor of shape <code>(batch_size, num_images, emb_dim)</code>. It should
contain the negative image embedding if <code>do_classifier_free_guidance</code> is set to <code>True</code>. If not
provided, embeddings are computed from the <code>ip_adapter_image</code> input argument.`,name:"ip_adapter_image_embeds"},{anchor:"diffusers.PIAPipeline.__call__.motion_scale",description:`<strong>motion_scale</strong> &#x2014; (<code>int</code>, <em>optional</em>, defaults to 0):
Parameter that controls the amount and type of motion that is added to the image. Increasing the value
increases the amount of motion, while specific ranges of values control the type of motion that is
added. Must be between 0 and 8. Set between 0-2 to only increase the amount of motion. Set between 3-5
to create looping motion. Set between 6-8 to perform motion with image style transfer.`,name:"motion_scale"},{anchor:"diffusers.PIAPipeline.__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 video. Choose between <code>torch.Tensor</code>, <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.PIAPipeline.__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/text_to_video#diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput">TextToVideoSDPipelineOutput</a> instead
of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.PIAPipeline.__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.PIAPipeline.__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"},{anchor:"diffusers.PIAPipeline.__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.PIAPipeline.__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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pia/pipeline_pia.py#L672",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/pia#diffusers.pipelines.pia.PIAPipelineOutput"
>PIAPipelineOutput</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/pia#diffusers.pipelines.pia.PIAPipelineOutput"
>PIAPipelineOutput</a> or <code>tuple</code></p>
`}}),k=new Pt({props:{anchor:"diffusers.PIAPipeline.__call__.example",$$slots:{default:[kt]},$$scope:{ctx:T}}}),ae=new ze({props:{name:"encode_prompt",anchor:"diffusers.PIAPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:""},{name:"num_images_per_prompt",val:""},{name:"do_classifier_free_guidance",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:"lora_scale",val:": typing.Optional[float] = None"},{name:"clip_skip",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.PIAPipeline.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.PIAPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>):
torch device`,name:"device"},{anchor:"diffusers.PIAPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.PIAPipeline.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.PIAPipeline.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.PIAPipeline.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.PIAPipeline.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.PIAPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A LoRA scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"},{anchor:"diffusers.PIAPipeline.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/pia/pipeline_pia.py#L213"}}),oe=new A({props:{title:"PIAPipelineOutput",local:"diffusers.pipelines.pia.PIAPipelineOutput",headingTag:"h2"}}),le=new ze({props:{name:"class diffusers.pipelines.pia.PIAPipelineOutput",anchor:"diffusers.pipelines.pia.PIAPipelineOutput",parameters:[{name:"frames",val:": typing.Union[torch.Tensor, numpy.ndarray, typing.List[typing.List[PIL.Image.Image]]]"}],parametersDescription:[{anchor:"diffusers.pipelines.pia.PIAPipelineOutput.frames",description:`<strong>frames</strong> (<code>torch.Tensor</code>, <code>np.ndarray</code>, or List[List[PIL.Image.Image]]) &#x2014;
Nested list of length <code>batch_size</code> with denoised PIL image sequences of length <code>num_frames</code>, NumPy array of
shape <code>(batch_size, num_frames, channels, height, width, Torch tensor of shape </code>(batch_size, num_frames,
channels, height, width)\`.`,name:"frames"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pia/pipeline_pia.py#L119"}}),re=new Zt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/pia.md"}}),{c(){a=l("meta"),y=s(),p=l("p"),b=s(),c(M.$$.fragment),_=s(),c(v.$$.fragment),_e=s(),x=l("div"),x.innerHTML=at,be=s(),c(W.$$.fragment),ye=s(),V=l("p"),V.innerHTML=st,Me=s(),B=l("p"),B.textContent=ot,we=s(),C=l("p"),C.innerHTML=lt,ve=s(),c(X.$$.fragment),Ie=s(),R=l("table"),R.innerHTML=rt,Te=s(),c(E.$$.fragment),Je=s(),Y=l("p"),Y.innerHTML=pt,Ue=s(),c(N.$$.fragment),Pe=s(),F=l("p"),F.textContent=dt,Ze=s(),S=l("p"),S.textContent=ct,xe=s(),c(L.$$.fragment),$e=s(),H=l("p"),H.textContent=mt,je=s(),z=l("table"),z.innerHTML=ut,ke=s(),c($.$$.fragment),Ge=s(),c(Q.$$.fragment),Ae=s(),q=l("p"),q.innerHTML=gt,We=s(),D=l("p"),D.textContent=ft,Ve=s(),O=l("p"),O.textContent=ht,Be=s(),c(K.$$.fragment),Ce=s(),ee=l("table"),ee.innerHTML=_t,Xe=s(),c(j.$$.fragment),Re=s(),c(te.$$.fragment),Ee=s(),I=l("div"),c(ne.$$.fragment),qe=s(),J=l("div"),c(ie.$$.fragment),De=s(),me=l("p"),me.textContent=bt,Oe=s(),c(k.$$.fragment),Ke=s(),G=l("div"),c(ae.$$.fragment),et=s(),ue=l("p"),ue.textContent=yt,Ye=s(),se=l("ul"),se.innerHTML=Mt,Ne=s(),c(oe.$$.fragment),Fe=s(),U=l("div"),c(le.$$.fragment),tt=s(),ge=l("p"),ge.textContent=wt,Se=s(),c(re.$$.fragment),Le=s(),he=l("p"),this.h()},l(e){const t=Ut("svelte-u9bgzb",document.head);a=r(t,"META",{name:!0,content:!0}),t.forEach(n),y=o(e),p=r(e,"P",{}),fe(p).forEach(n),b=o(e),m(M.$$.fragment,e),_=o(e),m(v.$$.fragment,e),_e=o(e),x=r(e,"DIV",{class:!0,"data-svelte-h":!0}),d(x)!=="svelte-si9ct8"&&(x.innerHTML=at),be=o(e),m(W.$$.fragment,e),ye=o(e),V=r(e,"P",{"data-svelte-h":!0}),d(V)!=="svelte-1p34tvn"&&(V.innerHTML=st),Me=o(e),B=r(e,"P",{"data-svelte-h":!0}),d(B)!=="svelte-1jcs7ly"&&(B.textContent=ot),we=o(e),C=r(e,"P",{"data-svelte-h":!0}),d(C)!=="svelte-q609lx"&&(C.innerHTML=lt),ve=o(e),m(X.$$.fragment,e),Ie=o(e),R=r(e,"TABLE",{"data-svelte-h":!0}),d(R)!=="svelte-5p4fpx"&&(R.innerHTML=rt),Te=o(e),m(E.$$.fragment,e),Je=o(e),Y=r(e,"P",{"data-svelte-h":!0}),d(Y)!=="svelte-1bi1ry7"&&(Y.innerHTML=pt),Ue=o(e),m(N.$$.fragment,e),Pe=o(e),F=r(e,"P",{"data-svelte-h":!0}),d(F)!=="svelte-woui0n"&&(F.textContent=dt),Ze=o(e),S=r(e,"P",{"data-svelte-h":!0}),d(S)!=="svelte-wwfxrb"&&(S.textContent=ct),xe=o(e),m(L.$$.fragment,e),$e=o(e),H=r(e,"P",{"data-svelte-h":!0}),d(H)!=="svelte-1pxzje"&&(H.textContent=mt),je=o(e),z=r(e,"TABLE",{"data-svelte-h":!0}),d(z)!=="svelte-7kzy88"&&(z.innerHTML=ut),ke=o(e),m($.$$.fragment,e),Ge=o(e),m(Q.$$.fragment,e),Ae=o(e),q=r(e,"P",{"data-svelte-h":!0}),d(q)!=="svelte-cdtrwq"&&(q.innerHTML=gt),We=o(e),D=r(e,"P",{"data-svelte-h":!0}),d(D)!=="svelte-bwalkj"&&(D.textContent=ft),Ve=o(e),O=r(e,"P",{"data-svelte-h":!0}),d(O)!=="svelte-1qq4ux4"&&(O.textContent=ht),Be=o(e),m(K.$$.fragment,e),Ce=o(e),ee=r(e,"TABLE",{"data-svelte-h":!0}),d(ee)!=="svelte-fegy4a"&&(ee.innerHTML=_t),Xe=o(e),m(j.$$.fragment,e),Re=o(e),m(te.$$.fragment,e),Ee=o(e),I=r(e,"DIV",{class:!0});var P=fe(I);m(ne.$$.fragment,P),qe=o(P),J=r(P,"DIV",{class:!0});var Z=fe(J);m(ie.$$.fragment,Z),De=o(Z),me=r(Z,"P",{"data-svelte-h":!0}),d(me)!=="svelte-50j04k"&&(me.textContent=bt),Oe=o(Z),m(k.$$.fragment,Z),Z.forEach(n),Ke=o(P),G=r(P,"DIV",{class:!0});var pe=fe(G);m(ae.$$.fragment,pe),et=o(pe),ue=r(pe,"P",{"data-svelte-h":!0}),d(ue)!=="svelte-16q0ax1"&&(ue.textContent=yt),pe.forEach(n),P.forEach(n),Ye=o(e),se=r(e,"UL",{"data-svelte-h":!0}),d(se)!=="svelte-1piu0vk"&&(se.innerHTML=Mt),Ne=o(e),m(oe.$$.fragment,e),Fe=o(e),U=r(e,"DIV",{class:!0});var de=fe(U);m(le.$$.fragment,de),tt=o(de),ge=r(de,"P",{"data-svelte-h":!0}),d(ge)!=="svelte-6skj8c"&&(ge.textContent=wt),de.forEach(n),Se=o(e),m(re.$$.fragment,e),Le=o(e),he=r(e,"P",{}),fe(he).forEach(n),this.h()},h(){ce(a,"name","hf:doc:metadata"),ce(a,"content",At),ce(x,"class","flex flex-wrap space-x-1"),ce(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ce(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ce(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ce(U,"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){w(document.head,a),i(e,y,t),i(e,p,t),i(e,b,t),u(M,e,t),i(e,_,t),u(v,e,t),i(e,_e,t),i(e,x,t),i(e,be,t),u(W,e,t),i(e,ye,t),i(e,V,t),i(e,Me,t),i(e,B,t),i(e,we,t),i(e,C,t),i(e,ve,t),u(X,e,t),i(e,Ie,t),i(e,R,t),i(e,Te,t),u(E,e,t),i(e,Je,t),i(e,Y,t),i(e,Ue,t),u(N,e,t),i(e,Pe,t),i(e,F,t),i(e,Ze,t),i(e,S,t),i(e,xe,t),u(L,e,t),i(e,$e,t),i(e,H,t),i(e,je,t),i(e,z,t),i(e,ke,t),u($,e,t),i(e,Ge,t),u(Q,e,t),i(e,Ae,t),i(e,q,t),i(e,We,t),i(e,D,t),i(e,Ve,t),i(e,O,t),i(e,Be,t),u(K,e,t),i(e,Ce,t),i(e,ee,t),i(e,Xe,t),u(j,e,t),i(e,Re,t),u(te,e,t),i(e,Ee,t),i(e,I,t),u(ne,I,null),w(I,qe),w(I,J),u(ie,J,null),w(J,De),w(J,me),w(J,Oe),u(k,J,null),w(I,Ke),w(I,G),u(ae,G,null),w(G,et),w(G,ue),i(e,Ye,t),i(e,se,t),i(e,Ne,t),u(oe,e,t),i(e,Fe,t),i(e,U,t),u(le,U,null),w(U,tt),w(U,ge),i(e,Se,t),u(re,e,t),i(e,Le,t),i(e,he,t),He=!0},p(e,[t]){const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),M.$set(P);const Z={};t&2&&(Z.$$scope={dirty:t,ctx:e}),$.$set(Z);const pe={};t&2&&(pe.$$scope={dirty:t,ctx:e}),j.$set(pe);const de={};t&2&&(de.$$scope={dirty:t,ctx:e}),k.$set(de)},i(e){He||(g(M.$$.fragment,e),g(v.$$.fragment,e),g(W.$$.fragment,e),g(X.$$.fragment,e),g(E.$$.fragment,e),g(N.$$.fragment,e),g(L.$$.fragment,e),g($.$$.fragment,e),g(Q.$$.fragment,e),g(K.$$.fragment,e),g(j.$$.fragment,e),g(te.$$.fragment,e),g(ne.$$.fragment,e),g(ie.$$.fragment,e),g(k.$$.fragment,e),g(ae.$$.fragment,e),g(oe.$$.fragment,e),g(le.$$.fragment,e),g(re.$$.fragment,e),He=!0)},o(e){f(M.$$.fragment,e),f(v.$$.fragment,e),f(W.$$.fragment,e),f(X.$$.fragment,e),f(E.$$.fragment,e),f(N.$$.fragment,e),f(L.$$.fragment,e),f($.$$.fragment,e),f(Q.$$.fragment,e),f(K.$$.fragment,e),f(j.$$.fragment,e),f(te.$$.fragment,e),f(ne.$$.fragment,e),f(ie.$$.fragment,e),f(k.$$.fragment,e),f(ae.$$.fragment,e),f(oe.$$.fragment,e),f(le.$$.fragment,e),f(re.$$.fragment,e),He=!1},d(e){e&&(n(y),n(p),n(b),n(_),n(_e),n(x),n(be),n(ye),n(V),n(Me),n(B),n(we),n(C),n(ve),n(Ie),n(R),n(Te),n(Je),n(Y),n(Ue),n(Pe),n(F),n(Ze),n(S),n(xe),n($e),n(H),n(je),n(z),n(ke),n(Ge),n(Ae),n(q),n(We),n(D),n(Ve),n(O),n(Be),n(Ce),n(ee),n(Xe),n(Re),n(Ee),n(I),n(Ye),n(se),n(Ne),n(Fe),n(U),n(Se),n(Le),n(he)),n(a),h(M,e),h(v,e),h(W,e),h(X,e),h(E,e),h(N,e),h(L,e),h($,e),h(Q,e),h(K,e),h(j,e),h(te,e),h(ne),h(ie),h(k),h(ae),h(oe,e),h(le),h(re,e)}}}const At='{"title":"Image-to-Video Generation with PIA (Personalized Image Animator)","local":"image-to-video-generation-with-pia-personalized-image-animator","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Available Pipelines","local":"available-pipelines","sections":[],"depth":2},{"title":"Available checkpoints","local":"available-checkpoints","sections":[],"depth":2},{"title":"Usage example","local":"usage-example","sections":[],"depth":2},{"title":"Using FreeInit","local":"using-freeinit","sections":[],"depth":2},{"title":"PIAPipeline","local":"diffusers.PIAPipeline","sections":[],"depth":2},{"title":"PIAPipelineOutput","local":"diffusers.pipelines.pia.PIAPipelineOutput","sections":[],"depth":2}],"depth":1}';function Wt(T){return It(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Nt extends Tt{constructor(a){super(),Jt(this,a,Wt,Gt,vt,{})}}export{Nt as component};
