import{s as di,o as mi,n as jn}from"../chunks/scheduler.8c3d61f6.js";import{S as fi,i as ci,g as r,s as i,r as m,A as ui,h as l,f as n,c as s,j as x,u as f,x as p,k as y,y as o,a,v as c,d as u,t as g,w as h}from"../chunks/index.da70eac4.js";import{T as In}from"../chunks/Tip.1d9b8c37.js";import{D as v}from"../chunks/Docstring.36ab7a66.js";import{C as ke}from"../chunks/CodeBlock.a9c4becf.js";import{H as $,E as gi}from"../chunks/getInferenceSnippets.33773fa8.js";function hi(J){let _,T="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(){_=r("p"),_.textContent=T},l(w){_=l(w,"P",{"data-svelte-h":!0}),p(_)!=="svelte-ic4u42"&&(_.textContent=T)},m(w,M){a(w,_,M)},p:jn,d(w){w&&n(_)}}}function _i(J){let _,T="There is currently an issue on PyTorch 1.X where the output images are all black or the pixel values become <code>NaNs</code>. This issue can be mitigated by switching to PyTorch 2.X.";return{c(){_=r("p"),_.innerHTML=T},l(w){_=l(w,"P",{"data-svelte-h":!0}),p(_)!=="svelte-1uoi7bt"&&(_.innerHTML=T)},m(w,M){a(w,_,M)},p:jn,d(w){w&&n(_)}}}function bi(J){let _,T='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.';return{c(){_=r("p"),_.innerHTML=T},l(w){_=l(w,"P",{"data-svelte-h":!0}),p(_)!=="svelte-1qn15hi"&&(_.innerHTML=T)},m(w,M){a(w,_,M)},p:jn,d(w){w&&n(_)}}}function wi(J){let _,T,w,M,Z,it,F,st,I,Wn='<img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/>',at,Q,Gn='The UniDiffuser model was proposed in <a href="https://huggingface.co/papers/2303.06555" rel="nofollow">One Transformer Fits All Distributions in Multi-Modal Diffusion at Scale</a> by Fan Bao, Shen Nie, Kaiwen Xue, Chongxuan Li, Shi Pu, Yaole Wang, Gang Yue, Yue Cao, Hang Su, Jun Zhu.',ot,z,Xn="The abstract from the paper is:",rt,S,Pn="<em>This paper proposes a unified diffusion framework (dubbed UniDiffuser) to fit all distributions relevant to a set of multi-modal data in one model. Our key insight is — learning diffusion models for marginal, conditional, and joint distributions can be unified as predicting the noise in the perturbed data, where the perturbation levels (i.e. timesteps) can be different for different modalities. Inspired by the unified view, UniDiffuser learns all distributions simultaneously with a minimal modification to the original diffusion model — perturbs data in all modalities instead of a single modality, inputs individual timesteps in different modalities, and predicts the noise of all modalities instead of a single modality. UniDiffuser is parameterized by a transformer for diffusion models to handle input types of different modalities. Implemented on large-scale paired image-text data, UniDiffuser is able to perform image, text, text-to-image, image-to-text, and image-text pair generation by setting proper timesteps without additional overhead. In particular, UniDiffuser is able to produce perceptually realistic samples in all tasks and its quantitative results (e.g., the FID and CLIP score) are not only superior to existing general-purpose models but also comparable to the bespoken models (e.g., Stable Diffusion and DALL-E 2) in representative tasks (e.g., text-to-image generation).</em>",lt,Y,Cn='You can find the original codebase at <a href="https://github.com/thu-ml/unidiffuser" rel="nofollow">thu-ml/unidiffuser</a> and additional checkpoints at <a href="https://huggingface.co/thu-ml" rel="nofollow">thu-ml</a>.',pt,j,dt,H,Vn='This pipeline was contributed by <a href="https://github.com/dg845" rel="nofollow">dg845</a>. ❤️',mt,q,ft,A,Dn="Because the UniDiffuser model is trained to model the joint distribution of (image, text) pairs, it is capable of performing a diverse range of generation tasks:",ct,O,ut,K,En='Unconditional generation (where we start from only latents sampled from a standard Gaussian prior) from a <a href="/docs/diffusers/main/en/api/pipelines/unidiffuser#diffusers.UniDiffuserPipeline">UniDiffuserPipeline</a> will produce a (image, text) pair:',gt,ee,ht,te,Bn="This is also called “joint” generation in the UniDiffuser paper, since we are sampling from the joint image-text distribution.",_t,ne,kn=`Note that the generation task is inferred from the inputs used when calling the pipeline.
It is also possible to manually specify the unconditional generation task (“mode”) manually with <a href="/docs/diffusers/main/en/api/pipelines/unidiffuser#diffusers.UniDiffuserPipeline.set_joint_mode">UniDiffuserPipeline.set_joint_mode()</a>:`,bt,ie,wt,se,Rn=`When the mode is set manually, subsequent calls to the pipeline will use the set mode without attempting to infer the mode.
You can reset the mode with <a href="/docs/diffusers/main/en/api/pipelines/unidiffuser#diffusers.UniDiffuserPipeline.reset_mode">UniDiffuserPipeline.reset_mode()</a>, after which the pipeline will once again infer the mode.`,yt,ae,Ln="You can also generate only an image or only text (which the UniDiffuser paper calls “marginal” generation since we sample from the marginal distribution of images and text, respectively):",xt,oe,vt,re,Tt,le,Nn=`UniDiffuser is also capable of sampling from conditional distributions; that is, the distribution of images conditioned on a text prompt or the distribution of texts conditioned on an image.
Here is an example of sampling from the conditional image distribution (text-to-image generation or text-conditioned image generation):`,Mt,pe,Ut,de,Fn='The <code>text2img</code> mode requires that either an input <code>prompt</code> or <code>prompt_embeds</code> be supplied. You can set the <code>text2img</code> mode manually with <a href="/docs/diffusers/main/en/api/pipelines/unidiffuser#diffusers.UniDiffuserPipeline.set_text_to_image_mode">UniDiffuserPipeline.set_text_to_image_mode()</a>.',$t,me,Jt,fe,Qn="Similarly, UniDiffuser can also produce text samples given an image (image-to-text or image-conditioned text generation):",Zt,ce,It,ue,zn='The <code>img2text</code> mode requires that an input <code>image</code> be supplied. You can set the <code>img2text</code> mode manually with <a href="/docs/diffusers/main/en/api/pipelines/unidiffuser#diffusers.UniDiffuserPipeline.set_image_to_text_mode">UniDiffuserPipeline.set_image_to_text_mode()</a>.',jt,ge,Wt,he,Sn=`The UniDiffuser authors suggest performing image variation through a “round-trip” generation method, where given an input image, we first perform an image-to-text generation, and then perform a text-to-image generation on the outputs of the first generation.
This produces a new image which is semantically similar to the input image:`,Gt,_e,Xt,be,Pt,we,Yn="Similarly, text variation can be performed on an input prompt with a text-to-image generation followed by a image-to-text generation:",Ct,ye,Vt,W,Dt,xe,Et,d,ve,tn,Re,Hn=`Pipeline for a bimodal image-text model which supports unconditional text and image generation, text-conditioned
image generation, image-conditioned text generation, and joint image-text generation.`,nn,Le,qn=`This model inherits from <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`,sn,G,Te,an,Ne,An="The call function to the pipeline for generation.",on,X,Me,rn,Fe,On=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,ln,P,Ue,pn,Qe,Kn=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to
computing decoding in one step.`,dn,C,$e,mn,ze,ei=`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.`,fn,V,Je,cn,Se,ti=`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.`,un,D,Ze,gn,Ye,ni="Encodes the prompt into text encoder hidden states.",hn,E,Ie,_n,He,ii="Removes a manually set mode; after calling this, the pipeline will infer the mode from inputs.",bn,B,je,wn,qe,si="Manually set the generation mode to unconditional (“marginal”) image generation.",yn,k,We,xn,Ae,ai="Manually set the generation mode to image-conditioned text generation.",vn,R,Ge,Tn,Oe,oi="Manually set the generation mode to unconditional joint image-text generation.",Mn,L,Xe,Un,Ke,ri="Manually set the generation mode to unconditional (“marginal”) text generation.",$n,N,Pe,Jn,et,li="Manually set the generation mode to text-conditioned image generation.",Bt,Ce,kt,U,Ve,Zn,tt,pi="Output class for joint image-text pipelines.",Rt,De,Lt,nt,Nt;return Z=new In({props:{warning:!0,$$slots:{default:[hi]},$$scope:{ctx:J}}}),F=new $({props:{title:"UniDiffuser",local:"unidiffuser",headingTag:"h1"}}),j=new In({props:{warning:!0,$$slots:{default:[_i]},$$scope:{ctx:J}}}),q=new $({props:{title:"Usage Examples",local:"usage-examples",headingTag:"h2"}}),O=new $({props:{title:"Unconditional Image and Text Generation",local:"unconditional-image-and-text-generation",headingTag:"h3"}}),ee=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwVW5pRGlmZnVzZXJQaXBlbGluZSUwQSUwQWRldmljZSUyMCUzRCUyMCUyMmN1ZGElMjIlMEFtb2RlbF9pZF9vcl9wYXRoJTIwJTNEJTIwJTIydGh1LW1sJTJGdW5pZGlmZnVzZXItdjElMjIlMEFwaXBlJTIwJTNEJTIwVW5pRGlmZnVzZXJQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWRfb3JfcGF0aCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlLnRvKGRldmljZSklMEElMEElMjMlMjBVbmNvbmRpdGlvbmFsJTIwaW1hZ2UlMjBhbmQlMjB0ZXh0JTIwZ2VuZXJhdGlvbi4lMjBUaGUlMjBnZW5lcmF0aW9uJTIwdGFzayUyMGlzJTIwYXV0b21hdGljYWxseSUyMGluZmVycmVkLiUwQXNhbXBsZSUyMCUzRCUyMHBpcGUobnVtX2luZmVyZW5jZV9zdGVwcyUzRDIwJTJDJTIwZ3VpZGFuY2Vfc2NhbGUlM0Q4LjApJTBBaW1hZ2UlMjAlM0QlMjBzYW1wbGUuaW1hZ2VzJTVCMCU1RCUwQXRleHQlMjAlM0QlMjBzYW1wbGUudGV4dCU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMnVuaWRpZmZ1c2VyX2pvaW50X3NhbXBsZV9pbWFnZS5wbmclMjIpJTBBcHJpbnQodGV4dCk=",highlighted:`<span class="hljs-keyword">import</span> torch

<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UniDiffuserPipeline

device = <span class="hljs-string">&quot;cuda&quot;</span>
model_id_or_path = <span class="hljs-string">&quot;thu-ml/unidiffuser-v1&quot;</span>
pipe = UniDiffuserPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16)
pipe.to(device)

<span class="hljs-comment"># Unconditional image and text generation. The generation task is automatically inferred.</span>
sample = pipe(num_inference_steps=<span class="hljs-number">20</span>, guidance_scale=<span class="hljs-number">8.0</span>)
image = sample.images[<span class="hljs-number">0</span>]
text = sample.text[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;unidiffuser_joint_sample_image.png&quot;</span>)
<span class="hljs-built_in">print</span>(text)`,wrap:!1}}),ie=new ke({props:{code:"JTIzJTIwRXF1aXZhbGVudCUyMHRvJTIwdGhlJTIwYWJvdmUuJTBBcGlwZS5zZXRfam9pbnRfbW9kZSgpJTBBc2FtcGxlJTIwJTNEJTIwcGlwZShudW1faW5mZXJlbmNlX3N0ZXBzJTNEMjAlMkMlMjBndWlkYW5jZV9zY2FsZSUzRDguMCk=",highlighted:`<span class="hljs-comment"># Equivalent to the above.</span>
pipe.set_joint_mode()
sample = pipe(num_inference_steps=<span class="hljs-number">20</span>, guidance_scale=<span class="hljs-number">8.0</span>)`,wrap:!1}}),oe=new ke({props:{code:"JTIzJTIwVW5saWtlJTIwb3RoZXIlMjBnZW5lcmF0aW9uJTIwdGFza3MlMkMlMjBpbWFnZS1vbmx5JTIwYW5kJTIwdGV4dC1vbmx5JTIwZ2VuZXJhdGlvbiUyMGRvbid0JTIwdXNlJTIwY2xhc3NpZmllci1mcmVlJTIwZ3VpZGFuY2UlMEElMjMlMjBJbWFnZS1vbmx5JTIwZ2VuZXJhdGlvbiUwQXBpcGUuc2V0X2ltYWdlX21vZGUoKSUwQXNhbXBsZV9pbWFnZSUyMCUzRCUyMHBpcGUobnVtX2luZmVyZW5jZV9zdGVwcyUzRDIwKS5pbWFnZXMlNUIwJTVEJTBBJTIzJTIwVGV4dC1vbmx5JTIwZ2VuZXJhdGlvbiUwQXBpcGUuc2V0X3RleHRfbW9kZSgpJTBBc2FtcGxlX3RleHQlMjAlM0QlMjBwaXBlKG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QyMCkudGV4dCU1QjAlNUQ=",highlighted:`<span class="hljs-comment"># Unlike other generation tasks, image-only and text-only generation don&#x27;t use classifier-free guidance</span>
<span class="hljs-comment"># Image-only generation</span>
pipe.set_image_mode()
sample_image = pipe(num_inference_steps=<span class="hljs-number">20</span>).images[<span class="hljs-number">0</span>]
<span class="hljs-comment"># Text-only generation</span>
pipe.set_text_mode()
sample_text = pipe(num_inference_steps=<span class="hljs-number">20</span>).text[<span class="hljs-number">0</span>]`,wrap:!1}}),re=new $({props:{title:"Text-to-Image Generation",local:"text-to-image-generation",headingTag:"h3"}}),pe=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwVW5pRGlmZnVzZXJQaXBlbGluZSUwQSUwQWRldmljZSUyMCUzRCUyMCUyMmN1ZGElMjIlMEFtb2RlbF9pZF9vcl9wYXRoJTIwJTNEJTIwJTIydGh1LW1sJTJGdW5pZGlmZnVzZXItdjElMjIlMEFwaXBlJTIwJTNEJTIwVW5pRGlmZnVzZXJQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWRfb3JfcGF0aCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlLnRvKGRldmljZSklMEElMEElMjMlMjBUZXh0LXRvLWltYWdlJTIwZ2VuZXJhdGlvbiUwQXByb21wdCUyMCUzRCUyMCUyMmFuJTIwZWxlcGhhbnQlMjB1bmRlciUyMHRoZSUyMHNlYSUyMiUwQSUwQXNhbXBsZSUyMCUzRCUyMHBpcGUocHJvbXB0JTNEcHJvbXB0JTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDIwJTJDJTIwZ3VpZGFuY2Vfc2NhbGUlM0Q4LjApJTBBdDJpX2ltYWdlJTIwJTNEJTIwc2FtcGxlLmltYWdlcyU1QjAlNUQlMEF0MmlfaW1hZ2U=",highlighted:`<span class="hljs-keyword">import</span> torch

<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UniDiffuserPipeline

device = <span class="hljs-string">&quot;cuda&quot;</span>
model_id_or_path = <span class="hljs-string">&quot;thu-ml/unidiffuser-v1&quot;</span>
pipe = UniDiffuserPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16)
pipe.to(device)

<span class="hljs-comment"># Text-to-image generation</span>
prompt = <span class="hljs-string">&quot;an elephant under the sea&quot;</span>

sample = pipe(prompt=prompt, num_inference_steps=<span class="hljs-number">20</span>, guidance_scale=<span class="hljs-number">8.0</span>)
t2i_image = sample.images[<span class="hljs-number">0</span>]
t2i_image`,wrap:!1}}),me=new $({props:{title:"Image-to-Text Generation",local:"image-to-text-generation",headingTag:"h3"}}),ce=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwVW5pRGlmZnVzZXJQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBJTBBZGV2aWNlJTIwJTNEJTIwJTIyY3VkYSUyMiUwQW1vZGVsX2lkX29yX3BhdGglMjAlM0QlMjAlMjJ0aHUtbWwlMkZ1bmlkaWZmdXNlci12MSUyMiUwQXBpcGUlMjAlM0QlMjBVbmlEaWZmdXNlclBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZF9vcl9wYXRoJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KSUwQXBpcGUudG8oZGV2aWNlKSUwQSUwQSUyMyUyMEltYWdlLXRvLXRleHQlMjBnZW5lcmF0aW9uJTBBaW1hZ2VfdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaGYtaW50ZXJuYWwtdGVzdGluZyUyRmRpZmZ1c2Vycy1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRnVuaWRpZmZ1c2VyJTJGdW5pZGlmZnVzZXJfZXhhbXBsZV9pbWFnZS5qcGclMjIlMEFpbml0X2ltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZShpbWFnZV91cmwpLnJlc2l6ZSgoNTEyJTJDJTIwNTEyKSklMEElMEFzYW1wbGUlMjAlM0QlMjBwaXBlKGltYWdlJTNEaW5pdF9pbWFnZSUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QyMCUyQyUyMGd1aWRhbmNlX3NjYWxlJTNEOC4wKSUwQWkydF90ZXh0JTIwJTNEJTIwc2FtcGxlLnRleHQlNUIwJTVEJTBBcHJpbnQoaTJ0X3RleHQp",highlighted:`<span class="hljs-keyword">import</span> torch

<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UniDiffuserPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

device = <span class="hljs-string">&quot;cuda&quot;</span>
model_id_or_path = <span class="hljs-string">&quot;thu-ml/unidiffuser-v1&quot;</span>
pipe = UniDiffuserPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16)
pipe.to(device)

<span class="hljs-comment"># Image-to-text generation</span>
image_url = <span class="hljs-string">&quot;https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/unidiffuser/unidiffuser_example_image.jpg&quot;</span>
init_image = load_image(image_url).resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))

sample = pipe(image=init_image, num_inference_steps=<span class="hljs-number">20</span>, guidance_scale=<span class="hljs-number">8.0</span>)
i2t_text = sample.text[<span class="hljs-number">0</span>]
<span class="hljs-built_in">print</span>(i2t_text)`,wrap:!1}}),ge=new $({props:{title:"Image Variation",local:"image-variation",headingTag:"h3"}}),_e=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwVW5pRGlmZnVzZXJQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBJTBBZGV2aWNlJTIwJTNEJTIwJTIyY3VkYSUyMiUwQW1vZGVsX2lkX29yX3BhdGglMjAlM0QlMjAlMjJ0aHUtbWwlMkZ1bmlkaWZmdXNlci12MSUyMiUwQXBpcGUlMjAlM0QlMjBVbmlEaWZmdXNlclBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZF9vcl9wYXRoJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KSUwQXBpcGUudG8oZGV2aWNlKSUwQSUwQSUyMyUyMEltYWdlJTIwdmFyaWF0aW9uJTIwY2FuJTIwYmUlMjBwZXJmb3JtZWQlMjB3aXRoJTIwYW4lMjBpbWFnZS10by10ZXh0JTIwZ2VuZXJhdGlvbiUyMGZvbGxvd2VkJTIwYnklMjBhJTIwdGV4dC10by1pbWFnZSUyMGdlbmVyYXRpb24lM0ElMEElMjMlMjAxLiUyMEltYWdlLXRvLXRleHQlMjBnZW5lcmF0aW9uJTBBaW1hZ2VfdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaGYtaW50ZXJuYWwtdGVzdGluZyUyRmRpZmZ1c2Vycy1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRnVuaWRpZmZ1c2VyJTJGdW5pZGlmZnVzZXJfZXhhbXBsZV9pbWFnZS5qcGclMjIlMEFpbml0X2ltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZShpbWFnZV91cmwpLnJlc2l6ZSgoNTEyJTJDJTIwNTEyKSklMEElMEFzYW1wbGUlMjAlM0QlMjBwaXBlKGltYWdlJTNEaW5pdF9pbWFnZSUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QyMCUyQyUyMGd1aWRhbmNlX3NjYWxlJTNEOC4wKSUwQWkydF90ZXh0JTIwJTNEJTIwc2FtcGxlLnRleHQlNUIwJTVEJTBBcHJpbnQoaTJ0X3RleHQpJTBBJTBBJTIzJTIwMi4lMjBUZXh0LXRvLWltYWdlJTIwZ2VuZXJhdGlvbiUwQXNhbXBsZSUyMCUzRCUyMHBpcGUocHJvbXB0JTNEaTJ0X3RleHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMjAlMkMlMjBndWlkYW5jZV9zY2FsZSUzRDguMCklMEFmaW5hbF9pbWFnZSUyMCUzRCUyMHNhbXBsZS5pbWFnZXMlNUIwJTVEJTBBZmluYWxfaW1hZ2Uuc2F2ZSglMjJ1bmlkaWZmdXNlcl9pbWFnZV92YXJpYXRpb25fc2FtcGxlLnBuZyUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch

<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UniDiffuserPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

device = <span class="hljs-string">&quot;cuda&quot;</span>
model_id_or_path = <span class="hljs-string">&quot;thu-ml/unidiffuser-v1&quot;</span>
pipe = UniDiffuserPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16)
pipe.to(device)

<span class="hljs-comment"># Image variation can be performed with an image-to-text generation followed by a text-to-image generation:</span>
<span class="hljs-comment"># 1. Image-to-text generation</span>
image_url = <span class="hljs-string">&quot;https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/unidiffuser/unidiffuser_example_image.jpg&quot;</span>
init_image = load_image(image_url).resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))

sample = pipe(image=init_image, num_inference_steps=<span class="hljs-number">20</span>, guidance_scale=<span class="hljs-number">8.0</span>)
i2t_text = sample.text[<span class="hljs-number">0</span>]
<span class="hljs-built_in">print</span>(i2t_text)

<span class="hljs-comment"># 2. Text-to-image generation</span>
sample = pipe(prompt=i2t_text, num_inference_steps=<span class="hljs-number">20</span>, guidance_scale=<span class="hljs-number">8.0</span>)
final_image = sample.images[<span class="hljs-number">0</span>]
final_image.save(<span class="hljs-string">&quot;unidiffuser_image_variation_sample.png&quot;</span>)`,wrap:!1}}),be=new $({props:{title:"Text Variation",local:"text-variation",headingTag:"h3"}}),ye=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwVW5pRGlmZnVzZXJQaXBlbGluZSUwQSUwQWRldmljZSUyMCUzRCUyMCUyMmN1ZGElMjIlMEFtb2RlbF9pZF9vcl9wYXRoJTIwJTNEJTIwJTIydGh1LW1sJTJGdW5pZGlmZnVzZXItdjElMjIlMEFwaXBlJTIwJTNEJTIwVW5pRGlmZnVzZXJQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWRfb3JfcGF0aCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlLnRvKGRldmljZSklMEElMEElMjMlMjBUZXh0JTIwdmFyaWF0aW9uJTIwY2FuJTIwYmUlMjBwZXJmb3JtZWQlMjB3aXRoJTIwYSUyMHRleHQtdG8taW1hZ2UlMjBnZW5lcmF0aW9uJTIwZm9sbG93ZWQlMjBieSUyMGElMjBpbWFnZS10by10ZXh0JTIwZ2VuZXJhdGlvbiUzQSUwQSUyMyUyMDEuJTIwVGV4dC10by1pbWFnZSUyMGdlbmVyYXRpb24lMEFwcm9tcHQlMjAlM0QlMjAlMjJhbiUyMGVsZXBoYW50JTIwdW5kZXIlMjB0aGUlMjBzZWElMjIlMEElMEFzYW1wbGUlMjAlM0QlMjBwaXBlKHByb21wdCUzRHByb21wdCUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QyMCUyQyUyMGd1aWRhbmNlX3NjYWxlJTNEOC4wKSUwQXQyaV9pbWFnZSUyMCUzRCUyMHNhbXBsZS5pbWFnZXMlNUIwJTVEJTBBdDJpX2ltYWdlLnNhdmUoJTIydW5pZGlmZnVzZXJfdGV4dDJpbWdfc2FtcGxlX2ltYWdlLnBuZyUyMiklMEElMEElMjMlMjAyLiUyMEltYWdlLXRvLXRleHQlMjBnZW5lcmF0aW9uJTBBc2FtcGxlJTIwJTNEJTIwcGlwZShpbWFnZSUzRHQyaV9pbWFnZSUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QyMCUyQyUyMGd1aWRhbmNlX3NjYWxlJTNEOC4wKSUwQWZpbmFsX3Byb21wdCUyMCUzRCUyMHNhbXBsZS50ZXh0JTVCMCU1RCUwQXByaW50KGZpbmFsX3Byb21wdCk=",highlighted:`<span class="hljs-keyword">import</span> torch

<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UniDiffuserPipeline

device = <span class="hljs-string">&quot;cuda&quot;</span>
model_id_or_path = <span class="hljs-string">&quot;thu-ml/unidiffuser-v1&quot;</span>
pipe = UniDiffuserPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16)
pipe.to(device)

<span class="hljs-comment"># Text variation can be performed with a text-to-image generation followed by a image-to-text generation:</span>
<span class="hljs-comment"># 1. Text-to-image generation</span>
prompt = <span class="hljs-string">&quot;an elephant under the sea&quot;</span>

sample = pipe(prompt=prompt, num_inference_steps=<span class="hljs-number">20</span>, guidance_scale=<span class="hljs-number">8.0</span>)
t2i_image = sample.images[<span class="hljs-number">0</span>]
t2i_image.save(<span class="hljs-string">&quot;unidiffuser_text2img_sample_image.png&quot;</span>)

<span class="hljs-comment"># 2. Image-to-text generation</span>
sample = pipe(image=t2i_image, num_inference_steps=<span class="hljs-number">20</span>, guidance_scale=<span class="hljs-number">8.0</span>)
final_prompt = sample.text[<span class="hljs-number">0</span>]
<span class="hljs-built_in">print</span>(final_prompt)`,wrap:!1}}),W=new In({props:{$$slots:{default:[bi]},$$scope:{ctx:J}}}),xe=new $({props:{title:"UniDiffuserPipeline",local:"diffusers.UniDiffuserPipeline",headingTag:"h2"}}),ve=new v({props:{name:"class diffusers.UniDiffuserPipeline",anchor:"diffusers.UniDiffuserPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"image_encoder",val:": CLIPVisionModelWithProjection"},{name:"clip_image_processor",val:": CLIPImageProcessor"},{name:"clip_tokenizer",val:": CLIPTokenizer"},{name:"text_decoder",val:": UniDiffuserTextDecoder"},{name:"text_tokenizer",val:": GPT2Tokenizer"},{name:"unet",val:": UniDiffuserModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"}],parametersDescription:[{anchor:"diffusers.UniDiffuserPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations. This
is part of the UniDiffuser image representation along with the CLIP vision encoding.`,name:"vae"},{anchor:"diffusers.UniDiffuserPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.UniDiffuserPipeline.image_encoder",description:`<strong>image_encoder</strong> (<code>CLIPVisionModel</code>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPVisionModel" rel="nofollow">CLIPVisionModel</a> to encode images as part of its image representation along with the VAE
latent representation.`,name:"image_encoder"},{anchor:"diffusers.UniDiffuserPipeline.image_processor",description:`<strong>image_processor</strong> (<code>CLIPImageProcessor</code>) &#x2014;
<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a> to preprocess an image before CLIP encoding it with <code>image_encoder</code>.`,name:"image_processor"},{anchor:"diffusers.UniDiffuserPipeline.clip_tokenizer",description:`<strong>clip_tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a> to tokenize the prompt before encoding it with <code>text_encoder</code>.`,name:"clip_tokenizer"},{anchor:"diffusers.UniDiffuserPipeline.text_decoder",description:`<strong>text_decoder</strong> (<code>UniDiffuserTextDecoder</code>) &#x2014;
Frozen text decoder. This is a GPT-style model which is used to generate text from the UniDiffuser
embedding.`,name:"text_decoder"},{anchor:"diffusers.UniDiffuserPipeline.text_tokenizer",description:`<strong>text_tokenizer</strong> (<code>GPT2Tokenizer</code>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/model_doc/gpt2#transformers.GPT2Tokenizer" rel="nofollow">GPT2Tokenizer</a> to decode text for text generation; used along with the <code>text_decoder</code>.`,name:"text_tokenizer"},{anchor:"diffusers.UniDiffuserPipeline.unet",description:`<strong>unet</strong> (<code>UniDiffuserModel</code>) &#x2014;
A <a href="https://github.com/baofff/U-ViT" rel="nofollow">U-ViT</a> model with UNNet-style skip connections between transformer
layers to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.UniDiffuserPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image and/or text latents. The
original UniDiffuser paper uses the <a href="/docs/diffusers/main/en/api/schedulers/multistep_dpm_solver#diffusers.DPMSolverMultistepScheduler">DPMSolverMultistepScheduler</a> scheduler.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L65"}}),Te=new v({props:{name:"__call__",anchor:"diffusers.UniDiffuserPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image, NoneType] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"data_type",val:": typing.Optional[int] = 1"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 8.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"num_prompts_per_image",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_latents",val:": typing.Optional[torch.Tensor] = None"},{name:"vae_latents",val:": typing.Optional[torch.Tensor] = None"},{name:"clip_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:"callback",val:": typing.Optional[typing.Callable[[int, int, torch.Tensor], NoneType]] = None"},{name:"callback_steps",val:": int = 1"}],parametersDescription:[{anchor:"diffusers.UniDiffuserPipeline.__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>.
Required for text-conditioned image generation (<code>text2img</code>) mode.`,name:"prompt"},{anchor:"diffusers.UniDiffuserPipeline.__call__.image",description:`<strong>image</strong> (<code>torch.Tensor</code> or <code>PIL.Image.Image</code>, <em>optional</em>) &#x2014;
<code>Image</code> or tensor representing an image batch. Required for image-conditioned text generation
(<code>img2text</code>) mode.`,name:"image"},{anchor:"diffusers.UniDiffuserPipeline.__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.UniDiffuserPipeline.__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.UniDiffuserPipeline.__call__.data_type",description:`<strong>data_type</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The data type (either 0 or 1). Only used if you are loading a checkpoint which supports a data type
embedding; this is added for compatibility with the
<a href="https://huggingface.co/thu-ml/unidiffuser-v1" rel="nofollow">UniDiffuser-v1</a> checkpoint.`,name:"data_type"},{anchor:"diffusers.UniDiffuserPipeline.__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.UniDiffuserPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 8.0) &#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.UniDiffuserPipeline.__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>). Used in
text-conditioned image generation (<code>text2img</code>) mode.`,name:"negative_prompt"},{anchor:"diffusers.UniDiffuserPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt. Used in <code>text2img</code> (text-conditioned image generation) and
<code>img</code> mode. If the mode is joint and both <code>num_images_per_prompt</code> and <code>num_prompts_per_image</code> are
supplied, <code>min(num_images_per_prompt, num_prompts_per_image)</code> samples are generated.`,name:"num_images_per_prompt"},{anchor:"diffusers.UniDiffuserPipeline.__call__.num_prompts_per_image",description:`<strong>num_prompts_per_image</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of prompts to generate per image. Used in <code>img2text</code> (image-conditioned text generation) and
<code>text</code> mode. If the mode is joint and both <code>num_images_per_prompt</code> and <code>num_prompts_per_image</code> are
supplied, <code>min(num_images_per_prompt, num_prompts_per_image)</code> samples are generated.`,name:"num_prompts_per_image"},{anchor:"diffusers.UniDiffuserPipeline.__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.UniDiffuserPipeline.__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.UniDiffuserPipeline.__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 joint
image-text 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>. This assumes
a full set of VAE, CLIP, and text latents, if supplied, overrides the value of <code>prompt_latents</code>,
<code>vae_latents</code>, and <code>clip_latents</code>.`,name:"latents"},{anchor:"diffusers.UniDiffuserPipeline.__call__.prompt_latents",description:`<strong>prompt_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 text
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:"prompt_latents"},{anchor:"diffusers.UniDiffuserPipeline.__call__.vae_latents",description:`<strong>vae_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:"vae_latents"},{anchor:"diffusers.UniDiffuserPipeline.__call__.clip_latents",description:`<strong>clip_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:"clip_latents"},{anchor:"diffusers.UniDiffuserPipeline.__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. Used in text-conditioned
image generation (<code>text2img</code>) mode.`,name:"prompt_embeds"},{anchor:"diffusers.UniDiffuserPipeline.__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 be generated from the <code>negative_prompt</code> input argument. Used
in text-conditioned image generation (<code>text2img</code>) mode.`,name:"negative_prompt_embeds"},{anchor:"diffusers.UniDiffuserPipeline.__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.UniDiffuserPipeline.__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/unidiffuser#diffusers.ImageTextPipelineOutput">ImageTextPipelineOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.UniDiffuserPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls every <code>callback_steps</code> steps during inference. The function is called with the
following arguments: <code>callback(step: int, timestep: int, latents: torch.Tensor)</code>.`,name:"callback"},{anchor:"diffusers.UniDiffuserPipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function is called. If not specified, the callback is called at
every step.`,name:"callback_steps"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L1095",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/unidiffuser#diffusers.ImageTextPipelineOutput"
>ImageTextPipelineOutput</a> is returned, otherwise a
<code>tuple</code> is returned where the first element is a list with the generated images and the second element
is a list of generated texts.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/pipelines/unidiffuser#diffusers.ImageTextPipelineOutput"
>ImageTextPipelineOutput</a> or <code>tuple</code></p>
`}}),Me=new v({props:{name:"disable_vae_slicing",anchor:"diffusers.UniDiffuserPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L238"}}),Ue=new v({props:{name:"disable_vae_tiling",anchor:"diffusers.UniDiffuserPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L255"}}),$e=new v({props:{name:"enable_vae_slicing",anchor:"diffusers.UniDiffuserPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L230"}}),Je=new v({props:{name:"enable_vae_tiling",anchor:"diffusers.UniDiffuserPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L246"}}),Ze=new v({props:{name:"encode_prompt",anchor:"diffusers.UniDiffuserPipeline.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.UniDiffuserPipeline.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.UniDiffuserPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>):
torch device`,name:"device"},{anchor:"diffusers.UniDiffuserPipeline.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.UniDiffuserPipeline.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.UniDiffuserPipeline.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.UniDiffuserPipeline.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.UniDiffuserPipeline.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.UniDiffuserPipeline.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.UniDiffuserPipeline.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/unidiffuser/pipeline_unidiffuser.py#L397"}}),Ie=new v({props:{name:"reset_mode",anchor:"diffusers.UniDiffuserPipeline.reset_mode",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L283"}}),je=new v({props:{name:"set_image_mode",anchor:"diffusers.UniDiffuserPipeline.set_image_mode",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L267"}}),We=new v({props:{name:"set_image_to_text_mode",anchor:"diffusers.UniDiffuserPipeline.set_image_to_text_mode",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L275"}}),Ge=new v({props:{name:"set_joint_mode",anchor:"diffusers.UniDiffuserPipeline.set_joint_mode",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L279"}}),Xe=new v({props:{name:"set_text_mode",anchor:"diffusers.UniDiffuserPipeline.set_text_mode",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L263"}}),Pe=new v({props:{name:"set_text_to_image_mode",anchor:"diffusers.UniDiffuserPipeline.set_text_to_image_mode",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L271"}}),Ce=new $({props:{title:"ImageTextPipelineOutput",local:"diffusers.ImageTextPipelineOutput",headingTag:"h2"}}),Ve=new v({props:{name:"class diffusers.ImageTextPipelineOutput",anchor:"diffusers.ImageTextPipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray, NoneType]"},{name:"text",val:": typing.Union[typing.List[str], typing.List[typing.List[str]], NoneType]"}],parametersDescription:[{anchor:"diffusers.ImageTextPipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or NumPy array of shape <code>(batch_size, height, width, num_channels)</code>.`,name:"images"},{anchor:"diffusers.ImageTextPipelineOutput.text",description:`<strong>text</strong> (<code>List[str]</code> or <code>List[List[str]]</code>) &#x2014;
List of generated text strings of length <code>batch_size</code> or a list of list of strings whose outer list has
length <code>batch_size</code>.`,name:"text"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py#L47"}}),De=new gi({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/unidiffuser.md"}}),{c(){_=r("meta"),T=i(),w=r("p"),M=i(),m(Z.$$.fragment),it=i(),m(F.$$.fragment),st=i(),I=r("div"),I.innerHTML=Wn,at=i(),Q=r("p"),Q.innerHTML=Gn,ot=i(),z=r("p"),z.textContent=Xn,rt=i(),S=r("p"),S.innerHTML=Pn,lt=i(),Y=r("p"),Y.innerHTML=Cn,pt=i(),m(j.$$.fragment),dt=i(),H=r("p"),H.innerHTML=Vn,mt=i(),m(q.$$.fragment),ft=i(),A=r("p"),A.textContent=Dn,ct=i(),m(O.$$.fragment),ut=i(),K=r("p"),K.innerHTML=En,gt=i(),m(ee.$$.fragment),ht=i(),te=r("p"),te.textContent=Bn,_t=i(),ne=r("p"),ne.innerHTML=kn,bt=i(),m(ie.$$.fragment),wt=i(),se=r("p"),se.innerHTML=Rn,yt=i(),ae=r("p"),ae.textContent=Ln,xt=i(),m(oe.$$.fragment),vt=i(),m(re.$$.fragment),Tt=i(),le=r("p"),le.textContent=Nn,Mt=i(),m(pe.$$.fragment),Ut=i(),de=r("p"),de.innerHTML=Fn,$t=i(),m(me.$$.fragment),Jt=i(),fe=r("p"),fe.textContent=Qn,Zt=i(),m(ce.$$.fragment),It=i(),ue=r("p"),ue.innerHTML=zn,jt=i(),m(ge.$$.fragment),Wt=i(),he=r("p"),he.textContent=Sn,Gt=i(),m(_e.$$.fragment),Xt=i(),m(be.$$.fragment),Pt=i(),we=r("p"),we.textContent=Yn,Ct=i(),m(ye.$$.fragment),Vt=i(),m(W.$$.fragment),Dt=i(),m(xe.$$.fragment),Et=i(),d=r("div"),m(ve.$$.fragment),tn=i(),Re=r("p"),Re.textContent=Hn,nn=i(),Le=r("p"),Le.innerHTML=qn,sn=i(),G=r("div"),m(Te.$$.fragment),an=i(),Ne=r("p"),Ne.textContent=An,on=i(),X=r("div"),m(Me.$$.fragment),rn=i(),Fe=r("p"),Fe.innerHTML=On,ln=i(),P=r("div"),m(Ue.$$.fragment),pn=i(),Qe=r("p"),Qe.innerHTML=Kn,dn=i(),C=r("div"),m($e.$$.fragment),mn=i(),ze=r("p"),ze.textContent=ei,fn=i(),V=r("div"),m(Je.$$.fragment),cn=i(),Se=r("p"),Se.textContent=ti,un=i(),D=r("div"),m(Ze.$$.fragment),gn=i(),Ye=r("p"),Ye.textContent=ni,hn=i(),E=r("div"),m(Ie.$$.fragment),_n=i(),He=r("p"),He.textContent=ii,bn=i(),B=r("div"),m(je.$$.fragment),wn=i(),qe=r("p"),qe.textContent=si,yn=i(),k=r("div"),m(We.$$.fragment),xn=i(),Ae=r("p"),Ae.textContent=ai,vn=i(),R=r("div"),m(Ge.$$.fragment),Tn=i(),Oe=r("p"),Oe.textContent=oi,Mn=i(),L=r("div"),m(Xe.$$.fragment),Un=i(),Ke=r("p"),Ke.textContent=ri,$n=i(),N=r("div"),m(Pe.$$.fragment),Jn=i(),et=r("p"),et.textContent=li,Bt=i(),m(Ce.$$.fragment),kt=i(),U=r("div"),m(Ve.$$.fragment),Zn=i(),tt=r("p"),tt.textContent=pi,Rt=i(),m(De.$$.fragment),Lt=i(),nt=r("p"),this.h()},l(e){const t=ui("svelte-u9bgzb",document.head);_=l(t,"META",{name:!0,content:!0}),t.forEach(n),T=s(e),w=l(e,"P",{}),x(w).forEach(n),M=s(e),f(Z.$$.fragment,e),it=s(e),f(F.$$.fragment,e),st=s(e),I=l(e,"DIV",{class:!0,"data-svelte-h":!0}),p(I)!=="svelte-si9ct8"&&(I.innerHTML=Wn),at=s(e),Q=l(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-x4qgym"&&(Q.innerHTML=Gn),ot=s(e),z=l(e,"P",{"data-svelte-h":!0}),p(z)!=="svelte-1cwsb16"&&(z.textContent=Xn),rt=s(e),S=l(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-1rrofj2"&&(S.innerHTML=Pn),lt=s(e),Y=l(e,"P",{"data-svelte-h":!0}),p(Y)!=="svelte-1mkhqav"&&(Y.innerHTML=Cn),pt=s(e),f(j.$$.fragment,e),dt=s(e),H=l(e,"P",{"data-svelte-h":!0}),p(H)!=="svelte-1eykv1b"&&(H.innerHTML=Vn),mt=s(e),f(q.$$.fragment,e),ft=s(e),A=l(e,"P",{"data-svelte-h":!0}),p(A)!=="svelte-cbm0c5"&&(A.textContent=Dn),ct=s(e),f(O.$$.fragment,e),ut=s(e),K=l(e,"P",{"data-svelte-h":!0}),p(K)!=="svelte-c6xivp"&&(K.innerHTML=En),gt=s(e),f(ee.$$.fragment,e),ht=s(e),te=l(e,"P",{"data-svelte-h":!0}),p(te)!=="svelte-19mmnnc"&&(te.textContent=Bn),_t=s(e),ne=l(e,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-uomou7"&&(ne.innerHTML=kn),bt=s(e),f(ie.$$.fragment,e),wt=s(e),se=l(e,"P",{"data-svelte-h":!0}),p(se)!=="svelte-tnllgp"&&(se.innerHTML=Rn),yt=s(e),ae=l(e,"P",{"data-svelte-h":!0}),p(ae)!=="svelte-1y647uj"&&(ae.textContent=Ln),xt=s(e),f(oe.$$.fragment,e),vt=s(e),f(re.$$.fragment,e),Tt=s(e),le=l(e,"P",{"data-svelte-h":!0}),p(le)!=="svelte-euu6tg"&&(le.textContent=Nn),Mt=s(e),f(pe.$$.fragment,e),Ut=s(e),de=l(e,"P",{"data-svelte-h":!0}),p(de)!=="svelte-19zjjlo"&&(de.innerHTML=Fn),$t=s(e),f(me.$$.fragment,e),Jt=s(e),fe=l(e,"P",{"data-svelte-h":!0}),p(fe)!=="svelte-tubb14"&&(fe.textContent=Qn),Zt=s(e),f(ce.$$.fragment,e),It=s(e),ue=l(e,"P",{"data-svelte-h":!0}),p(ue)!=="svelte-1sf5a0r"&&(ue.innerHTML=zn),jt=s(e),f(ge.$$.fragment,e),Wt=s(e),he=l(e,"P",{"data-svelte-h":!0}),p(he)!=="svelte-lnxqa8"&&(he.textContent=Sn),Gt=s(e),f(_e.$$.fragment,e),Xt=s(e),f(be.$$.fragment,e),Pt=s(e),we=l(e,"P",{"data-svelte-h":!0}),p(we)!=="svelte-1t6lzo0"&&(we.textContent=Yn),Ct=s(e),f(ye.$$.fragment,e),Vt=s(e),f(W.$$.fragment,e),Dt=s(e),f(xe.$$.fragment,e),Et=s(e),d=l(e,"DIV",{class:!0});var b=x(d);f(ve.$$.fragment,b),tn=s(b),Re=l(b,"P",{"data-svelte-h":!0}),p(Re)!=="svelte-qg5tdp"&&(Re.textContent=Hn),nn=s(b),Le=l(b,"P",{"data-svelte-h":!0}),p(Le)!=="svelte-496sm0"&&(Le.innerHTML=qn),sn=s(b),G=l(b,"DIV",{class:!0});var Ee=x(G);f(Te.$$.fragment,Ee),an=s(Ee),Ne=l(Ee,"P",{"data-svelte-h":!0}),p(Ne)!=="svelte-50j04k"&&(Ne.textContent=An),Ee.forEach(n),on=s(b),X=l(b,"DIV",{class:!0});var Be=x(X);f(Me.$$.fragment,Be),rn=s(Be),Fe=l(Be,"P",{"data-svelte-h":!0}),p(Fe)!=="svelte-1s3c06i"&&(Fe.innerHTML=On),Be.forEach(n),ln=s(b),P=l(b,"DIV",{class:!0});var Ft=x(P);f(Ue.$$.fragment,Ft),pn=s(Ft),Qe=l(Ft,"P",{"data-svelte-h":!0}),p(Qe)!=="svelte-pkn4ui"&&(Qe.innerHTML=Kn),Ft.forEach(n),dn=s(b),C=l(b,"DIV",{class:!0});var Qt=x(C);f($e.$$.fragment,Qt),mn=s(Qt),ze=l(Qt,"P",{"data-svelte-h":!0}),p(ze)!=="svelte-14bnrb6"&&(ze.textContent=ei),Qt.forEach(n),fn=s(b),V=l(b,"DIV",{class:!0});var zt=x(V);f(Je.$$.fragment,zt),cn=s(zt),Se=l(zt,"P",{"data-svelte-h":!0}),p(Se)!=="svelte-1xwrf7t"&&(Se.textContent=ti),zt.forEach(n),un=s(b),D=l(b,"DIV",{class:!0});var St=x(D);f(Ze.$$.fragment,St),gn=s(St),Ye=l(St,"P",{"data-svelte-h":!0}),p(Ye)!=="svelte-16q0ax1"&&(Ye.textContent=ni),St.forEach(n),hn=s(b),E=l(b,"DIV",{class:!0});var Yt=x(E);f(Ie.$$.fragment,Yt),_n=s(Yt),He=l(Yt,"P",{"data-svelte-h":!0}),p(He)!=="svelte-ycux85"&&(He.textContent=ii),Yt.forEach(n),bn=s(b),B=l(b,"DIV",{class:!0});var Ht=x(B);f(je.$$.fragment,Ht),wn=s(Ht),qe=l(Ht,"P",{"data-svelte-h":!0}),p(qe)!=="svelte-f12s4l"&&(qe.textContent=si),Ht.forEach(n),yn=s(b),k=l(b,"DIV",{class:!0});var qt=x(k);f(We.$$.fragment,qt),xn=s(qt),Ae=l(qt,"P",{"data-svelte-h":!0}),p(Ae)!=="svelte-1b9y8l5"&&(Ae.textContent=ai),qt.forEach(n),vn=s(b),R=l(b,"DIV",{class:!0});var At=x(R);f(Ge.$$.fragment,At),Tn=s(At),Oe=l(At,"P",{"data-svelte-h":!0}),p(Oe)!=="svelte-u7njpc"&&(Oe.textContent=oi),At.forEach(n),Mn=s(b),L=l(b,"DIV",{class:!0});var Ot=x(L);f(Xe.$$.fragment,Ot),Un=s(Ot),Ke=l(Ot,"P",{"data-svelte-h":!0}),p(Ke)!=="svelte-p08nnp"&&(Ke.textContent=ri),Ot.forEach(n),$n=s(b),N=l(b,"DIV",{class:!0});var Kt=x(N);f(Pe.$$.fragment,Kt),Jn=s(Kt),et=l(Kt,"P",{"data-svelte-h":!0}),p(et)!=="svelte-rah46x"&&(et.textContent=li),Kt.forEach(n),b.forEach(n),Bt=s(e),f(Ce.$$.fragment,e),kt=s(e),U=l(e,"DIV",{class:!0});var en=x(U);f(Ve.$$.fragment,en),Zn=s(en),tt=l(en,"P",{"data-svelte-h":!0}),p(tt)!=="svelte-1i2ycus"&&(tt.textContent=pi),en.forEach(n),Rt=s(e),f(De.$$.fragment,e),Lt=s(e),nt=l(e,"P",{}),x(nt).forEach(n),this.h()},h(){y(_,"name","hf:doc:metadata"),y(_,"content",yi),y(I,"class","flex flex-wrap space-x-1"),y(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(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){o(document.head,_),a(e,T,t),a(e,w,t),a(e,M,t),c(Z,e,t),a(e,it,t),c(F,e,t),a(e,st,t),a(e,I,t),a(e,at,t),a(e,Q,t),a(e,ot,t),a(e,z,t),a(e,rt,t),a(e,S,t),a(e,lt,t),a(e,Y,t),a(e,pt,t),c(j,e,t),a(e,dt,t),a(e,H,t),a(e,mt,t),c(q,e,t),a(e,ft,t),a(e,A,t),a(e,ct,t),c(O,e,t),a(e,ut,t),a(e,K,t),a(e,gt,t),c(ee,e,t),a(e,ht,t),a(e,te,t),a(e,_t,t),a(e,ne,t),a(e,bt,t),c(ie,e,t),a(e,wt,t),a(e,se,t),a(e,yt,t),a(e,ae,t),a(e,xt,t),c(oe,e,t),a(e,vt,t),c(re,e,t),a(e,Tt,t),a(e,le,t),a(e,Mt,t),c(pe,e,t),a(e,Ut,t),a(e,de,t),a(e,$t,t),c(me,e,t),a(e,Jt,t),a(e,fe,t),a(e,Zt,t),c(ce,e,t),a(e,It,t),a(e,ue,t),a(e,jt,t),c(ge,e,t),a(e,Wt,t),a(e,he,t),a(e,Gt,t),c(_e,e,t),a(e,Xt,t),c(be,e,t),a(e,Pt,t),a(e,we,t),a(e,Ct,t),c(ye,e,t),a(e,Vt,t),c(W,e,t),a(e,Dt,t),c(xe,e,t),a(e,Et,t),a(e,d,t),c(ve,d,null),o(d,tn),o(d,Re),o(d,nn),o(d,Le),o(d,sn),o(d,G),c(Te,G,null),o(G,an),o(G,Ne),o(d,on),o(d,X),c(Me,X,null),o(X,rn),o(X,Fe),o(d,ln),o(d,P),c(Ue,P,null),o(P,pn),o(P,Qe),o(d,dn),o(d,C),c($e,C,null),o(C,mn),o(C,ze),o(d,fn),o(d,V),c(Je,V,null),o(V,cn),o(V,Se),o(d,un),o(d,D),c(Ze,D,null),o(D,gn),o(D,Ye),o(d,hn),o(d,E),c(Ie,E,null),o(E,_n),o(E,He),o(d,bn),o(d,B),c(je,B,null),o(B,wn),o(B,qe),o(d,yn),o(d,k),c(We,k,null),o(k,xn),o(k,Ae),o(d,vn),o(d,R),c(Ge,R,null),o(R,Tn),o(R,Oe),o(d,Mn),o(d,L),c(Xe,L,null),o(L,Un),o(L,Ke),o(d,$n),o(d,N),c(Pe,N,null),o(N,Jn),o(N,et),a(e,Bt,t),c(Ce,e,t),a(e,kt,t),a(e,U,t),c(Ve,U,null),o(U,Zn),o(U,tt),a(e,Rt,t),c(De,e,t),a(e,Lt,t),a(e,nt,t),Nt=!0},p(e,[t]){const b={};t&2&&(b.$$scope={dirty:t,ctx:e}),Z.$set(b);const Ee={};t&2&&(Ee.$$scope={dirty:t,ctx:e}),j.$set(Ee);const Be={};t&2&&(Be.$$scope={dirty:t,ctx:e}),W.$set(Be)},i(e){Nt||(u(Z.$$.fragment,e),u(F.$$.fragment,e),u(j.$$.fragment,e),u(q.$$.fragment,e),u(O.$$.fragment,e),u(ee.$$.fragment,e),u(ie.$$.fragment,e),u(oe.$$.fragment,e),u(re.$$.fragment,e),u(pe.$$.fragment,e),u(me.$$.fragment,e),u(ce.$$.fragment,e),u(ge.$$.fragment,e),u(_e.$$.fragment,e),u(be.$$.fragment,e),u(ye.$$.fragment,e),u(W.$$.fragment,e),u(xe.$$.fragment,e),u(ve.$$.fragment,e),u(Te.$$.fragment,e),u(Me.$$.fragment,e),u(Ue.$$.fragment,e),u($e.$$.fragment,e),u(Je.$$.fragment,e),u(Ze.$$.fragment,e),u(Ie.$$.fragment,e),u(je.$$.fragment,e),u(We.$$.fragment,e),u(Ge.$$.fragment,e),u(Xe.$$.fragment,e),u(Pe.$$.fragment,e),u(Ce.$$.fragment,e),u(Ve.$$.fragment,e),u(De.$$.fragment,e),Nt=!0)},o(e){g(Z.$$.fragment,e),g(F.$$.fragment,e),g(j.$$.fragment,e),g(q.$$.fragment,e),g(O.$$.fragment,e),g(ee.$$.fragment,e),g(ie.$$.fragment,e),g(oe.$$.fragment,e),g(re.$$.fragment,e),g(pe.$$.fragment,e),g(me.$$.fragment,e),g(ce.$$.fragment,e),g(ge.$$.fragment,e),g(_e.$$.fragment,e),g(be.$$.fragment,e),g(ye.$$.fragment,e),g(W.$$.fragment,e),g(xe.$$.fragment,e),g(ve.$$.fragment,e),g(Te.$$.fragment,e),g(Me.$$.fragment,e),g(Ue.$$.fragment,e),g($e.$$.fragment,e),g(Je.$$.fragment,e),g(Ze.$$.fragment,e),g(Ie.$$.fragment,e),g(je.$$.fragment,e),g(We.$$.fragment,e),g(Ge.$$.fragment,e),g(Xe.$$.fragment,e),g(Pe.$$.fragment,e),g(Ce.$$.fragment,e),g(Ve.$$.fragment,e),g(De.$$.fragment,e),Nt=!1},d(e){e&&(n(T),n(w),n(M),n(it),n(st),n(I),n(at),n(Q),n(ot),n(z),n(rt),n(S),n(lt),n(Y),n(pt),n(dt),n(H),n(mt),n(ft),n(A),n(ct),n(ut),n(K),n(gt),n(ht),n(te),n(_t),n(ne),n(bt),n(wt),n(se),n(yt),n(ae),n(xt),n(vt),n(Tt),n(le),n(Mt),n(Ut),n(de),n($t),n(Jt),n(fe),n(Zt),n(It),n(ue),n(jt),n(Wt),n(he),n(Gt),n(Xt),n(Pt),n(we),n(Ct),n(Vt),n(Dt),n(Et),n(d),n(Bt),n(kt),n(U),n(Rt),n(Lt),n(nt)),n(_),h(Z,e),h(F,e),h(j,e),h(q,e),h(O,e),h(ee,e),h(ie,e),h(oe,e),h(re,e),h(pe,e),h(me,e),h(ce,e),h(ge,e),h(_e,e),h(be,e),h(ye,e),h(W,e),h(xe,e),h(ve),h(Te),h(Me),h(Ue),h($e),h(Je),h(Ze),h(Ie),h(je),h(We),h(Ge),h(Xe),h(Pe),h(Ce,e),h(Ve),h(De,e)}}}const yi='{"title":"UniDiffuser","local":"unidiffuser","sections":[{"title":"Usage Examples","local":"usage-examples","sections":[{"title":"Unconditional Image and Text Generation","local":"unconditional-image-and-text-generation","sections":[],"depth":3},{"title":"Text-to-Image Generation","local":"text-to-image-generation","sections":[],"depth":3},{"title":"Image-to-Text Generation","local":"image-to-text-generation","sections":[],"depth":3},{"title":"Image Variation","local":"image-variation","sections":[],"depth":3},{"title":"Text Variation","local":"text-variation","sections":[],"depth":3}],"depth":2},{"title":"UniDiffuserPipeline","local":"diffusers.UniDiffuserPipeline","sections":[],"depth":2},{"title":"ImageTextPipelineOutput","local":"diffusers.ImageTextPipelineOutput","sections":[],"depth":2}],"depth":1}';function xi(J){return mi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zi extends fi{constructor(_){super(),ci(this,_,xi,wi,di,{})}}export{Zi as component};
