import{S as ys,i as ws,s as Is,e as o,k as l,w as v,t as a,M as Ds,c as i,d as n,m as d,a as s,x as y,h as r,b as c,G as e,g as u,y as w,q as I,o as D,B as A,v as As,L as bs}from"../../../chunks/vendor-hf-doc-builder.js";import{T as Ps}from"../../../chunks/Tip-hf-doc-builder.js";import{D as E}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as vs}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ft}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as _s}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ms(Q){let m,k,_,g,M,f,P,F;return{c(){m=o("p"),k=a("Make sure to check out the Schedulers "),_=o("a"),g=a("guide"),M=a(" to learn how to explore the tradeoff between scheduler speed and quality, and see the "),f=o("a"),P=a("reuse components across pipelines"),F=a(" section to learn how to efficiently load the same components into multiple pipelines."),this.h()},l(R){m=i(R,"P",{});var C=s(m);k=r(C,"Make sure to check out the Schedulers "),_=i(C,"A",{href:!0});var T=s(_);g=r(T,"guide"),T.forEach(n),M=r(C," to learn how to explore the tradeoff between scheduler speed and quality, and see the "),f=i(C,"A",{href:!0});var Se=s(f);P=r(Se,"reuse components across pipelines"),Se.forEach(n),F=r(C," section to learn how to efficiently load the same components into multiple pipelines."),C.forEach(n),this.h()},h(){c(_,"href","/using-diffusers/schedulers"),c(f,"href","/using-diffusers/loading#reuse-components-across-pipelines")},m(R,C){u(R,m,C),e(m,k),e(m,_),e(_,g),e(m,M),e(m,f),e(f,P),e(m,F)},d(R){R&&n(m)}}}function $s(Q){let m,k,_,g,M;return g=new vs({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQWx0RGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwQWx0RGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMkJBQUklMkZBbHREaWZmdXNpb24tbTklMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBcGlwZSUyMCUzRCUyMHBpcGUudG8oJTIyY3VkYSUyMiklMEElMEElMjMlMjAlMjJkYXJrJTIwZWxmJTIwcHJpbmNlc3MlMkMlMjBoaWdobHklMjBkZXRhaWxlZCUyQyUyMGQlMjAlMjYlMjBkJTJDJTIwZmFudGFzeSUyQyUyMGhpZ2hseSUyMGRldGFpbGVkJTJDJTIwZGlnaXRhbCUyMHBhaW50aW5nJTJDJTIwdHJlbmRpbmclMjBvbiUyMGFydHN0YXRpb24lMkMlMjBjb25jZXB0JTIwYXJ0JTJDJTIwc2hhcnAlMjBmb2N1cyUyQyUyMGlsbHVzdHJhdGlvbiUyQyUyMGFydCUyMGJ5JTIwYXJ0Z2VybSUyMGFuZCUyMGdyZWclMjBydXRrb3dza2klMjBhbmQlMjBmdWppJTIwY2hva28lMjBhbmQlMjB2aWt0b3JpYSUyMGdhdnJpbGVua28lMjBhbmQlMjBob2FuZyUyMGxhcCUyMiUwQXByb21wdCUyMCUzRCUyMCUyMiVFOSVCQiU5MSVFNiU5QSU5NyVFNyVCMiVCRSVFNyU4MSVCNSVFNSU4NSVBQyVFNCVCOCVCQiVFRiVCQyU4QyVFOSU5RCU5RSVFNSVCOCVCOCVFOCVBRiVBNiVFNyVCQiU4NiVFRiVCQyU4QyVFNSVCOSVCQiVFNiU4MyVCMyVFRiVCQyU4QyVFOSU5RCU5RSVFNSVCOCVCOCVFOCVBRiVBNiVFNyVCQiU4NiVFRiVCQyU4QyVFNiU5NSVCMCVFNSVBRCU5NyVFNyVCQiU5OCVFNyU5NCVCQiVFRiVCQyU4QyVFNiVBNiU4MiVFNSVCRiVCNSVFOCU4OSVCQSVFNiU5QyVBRiVFRiVCQyU4QyVFNiU5NSU4RiVFOSU5NCU5MCVFNyU5QSU4NCVFNyU4NCVBNiVFNyU4MiVCOSVFRiVCQyU4QyVFNiU4RiU5MiVFNSU5QiVCRSUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",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> AltDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = AltDiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;BAAI/AltDiffusion-m9&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># &quot;dark elf princess, highly detailed, d &amp; d, fantasy, highly detailed, digital painting, trending on artstation, concept art, sharp focus, illustration, art by artgerm and greg rutkowski and fuji choko and viktoria gavrilenko and hoang lap&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;\u9ED1\u6697\u7CBE\u7075\u516C\u4E3B\uFF0C\u975E\u5E38\u8BE6\u7EC6\uFF0C\u5E7B\u60F3\uFF0C\u975E\u5E38\u8BE6\u7EC6\uFF0C\u6570\u5B57\u7ED8\u753B\uFF0C\u6982\u5FF5\u827A\u672F\uFF0C\u654F\u9510\u7684\u7126\u70B9\uFF0C\u63D2\u56FE&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){m=o("p"),k=a("Examples:"),_=l(),v(g.$$.fragment)},l(f){m=i(f,"P",{});var P=s(m);k=r(P,"Examples:"),P.forEach(n),_=d(f),y(g.$$.fragment,f)},m(f,P){u(f,m,P),e(m,k),u(f,_,P),w(g,f,P),M=!0},p:bs,i(f){M||(I(g.$$.fragment,f),M=!0)},o(f){D(g.$$.fragment,f),M=!1},d(f){f&&n(m),f&&n(_),A(g,f)}}}function ks(Q){let m,k,_,g,M;return g=new vs({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWZyb20lMjBpbyUyMGltcG9ydCUyMEJ5dGVzSU8lMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQWx0RGlmZnVzaW9uSW1nMkltZ1BpcGVsaW5lJTBBJTBBZGV2aWNlJTIwJTNEJTIwJTIyY3VkYSUyMiUwQW1vZGVsX2lkX29yX3BhdGglMjAlM0QlMjAlMjJCQUFJJTJGQWx0RGlmZnVzaW9uLW05JTIyJTBBcGlwZSUyMCUzRCUyMEFsdERpZmZ1c2lvbkltZzJJbWdQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWRfb3JfcGF0aCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwcGlwZS50byhkZXZpY2UpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZyYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tJTJGQ29tcFZpcyUyRnN0YWJsZS1kaWZmdXNpb24lMkZtYWluJTJGYXNzZXRzJTJGc3RhYmxlLXNhbXBsZXMlMkZpbWcyaW1nJTJGc2tldGNoLW1vdW50YWlucy1pbnB1dC5qcGclMjIlMEElMEFyZXNwb25zZSUyMCUzRCUyMHJlcXVlc3RzLmdldCh1cmwpJTBBaW5pdF9pbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4oQnl0ZXNJTyhyZXNwb25zZS5jb250ZW50KSkuY29udmVydCglMjJSR0IlMjIpJTBBaW5pdF9pbWFnZSUyMCUzRCUyMGluaXRfaW1hZ2UucmVzaXplKCg3NjglMkMlMjA1MTIpKSUwQSUwQSUyMyUyMCUyMkElMjBmYW50YXN5JTIwbGFuZHNjYXBlJTJDJTIwdHJlbmRpbmclMjBvbiUyMGFydHN0YXRpb24lMjIlMEFwcm9tcHQlMjAlM0QlMjAlMjIlRTUlQjklQkIlRTYlODMlQjMlRTklQTMlOEUlRTYlOTklQUYlMkMlMjBhcnRzdGF0aW9uJTIyJTBBJTBBaW1hZ2VzJTIwJTNEJTIwcGlwZShwcm9tcHQlM0Rwcm9tcHQlMkMlMjBpbWFnZSUzRGluaXRfaW1hZ2UlMkMlMjBzdHJlbmd0aCUzRDAuNzUlMkMlMjBndWlkYW5jZV9zY2FsZSUzRDcuNSkuaW1hZ2VzJTBBaW1hZ2VzJTVCMCU1RC5zYXZlKCUyMiVFNSVCOSVCQiVFNiU4MyVCMyVFOSVBMyU4RSVFNiU5OSVBRi5wbmclMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<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> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> io <span class="hljs-keyword">import</span> BytesIO

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AltDiffusionImg2ImgPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>device = <span class="hljs-string">&quot;cuda&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_id_or_path = <span class="hljs-string">&quot;BAAI/AltDiffusion-m9&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = AltDiffusionImg2ImgPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(device)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>response = requests.get(url)
<span class="hljs-meta">&gt;&gt;&gt; </span>init_image = Image.<span class="hljs-built_in">open</span>(BytesIO(response.content)).convert(<span class="hljs-string">&quot;RGB&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>init_image = init_image.resize((<span class="hljs-number">768</span>, <span class="hljs-number">512</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># &quot;A fantasy landscape, trending on artstation&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;\u5E7B\u60F3\u98CE\u666F, artstation&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>images = pipe(prompt=prompt, image=init_image, strength=<span class="hljs-number">0.75</span>, guidance_scale=<span class="hljs-number">7.5</span>).images
<span class="hljs-meta">&gt;&gt;&gt; </span>images[<span class="hljs-number">0</span>].save(<span class="hljs-string">&quot;\u5E7B\u60F3\u98CE\u666F.png&quot;</span>)`}}),{c(){m=o("p"),k=a("Examples:"),_=l(),v(g.$$.fragment)},l(f){m=i(f,"P",{});var P=s(m);k=r(P,"Examples:"),P.forEach(n),_=d(f),y(g.$$.fragment,f)},m(f,P){u(f,m,P),e(m,k),u(f,_,P),w(g,f,P),M=!0},p:bs,i(f){M||(I(g.$$.fragment,f),M=!0)},o(f){D(g.$$.fragment,f),M=!1},d(f){f&&n(m),f&&n(_),A(g,f)}}}function xs(Q){let m,k,_,g,M,f,P,F,R,C,T,Se,ue,hn,_n,Rt,Le,bn,Bt,Je,st,vn,Wt,B,z,at,ge,yn,rt,wn,Gt,W,lt,In,Dn,je,An,Pn,Ot,X,Zt,G,q,dt,he,Mn,ct,$n,Qt,h,_e,kn,ft,xn,Cn,be,En,Fe,Tn,Un,Vn,pt,Nn,Sn,U,Re,Be,Ln,Jn,jn,We,Ge,Fn,Rn,Bn,Oe,Ze,Wn,Gn,On,Y,Qe,Zn,Qn,mt,zn,Xn,qn,J,ve,Yn,ut,Hn,Kn,H,eo,K,ye,to,we,no,gt,oo,io,so,ee,Ie,ao,De,ro,ht,lo,co,fo,te,Ae,po,V,mo,_t,uo,go,bt,ho,_o,vt,bo,vo,yo,ne,Pe,wo,yt,Io,Do,oe,Me,Ao,wt,Po,zt,O,ie,It,$e,Mo,Dt,$o,Xt,$,ke,ko,At,xo,Co,xe,Eo,ze,To,Uo,Vo,Pt,No,So,N,Xe,qe,Lo,Jo,jo,Ye,He,Fo,Ro,Bo,Ke,et,Wo,Go,Oo,se,tt,Zo,Qo,Mt,zo,Xo,qo,j,Ce,Yo,$t,Ho,Ko,ae,ei,re,Ee,ti,S,ni,kt,oi,ii,xt,si,ai,Ct,ri,li,qt,Z,le,Et,Te,di,Tt,ci,Yt,L,Ue,fi,Ut,pi,mi,de,Ve,ui,Vt,gi,Ht;return f=new Ft({}),ge=new Ft({}),X=new Ps({props:{$$slots:{default:[Ms]},$$scope:{ctx:Q}}}),he=new Ft({}),_e=new E({props:{name:"class diffusers.AltDiffusionPipeline",anchor:"diffusers.AltDiffusionPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": RobertaSeriesModelWithTransformation"},{name:"tokenizer",val:": XLMRobertaTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.AltDiffusionPipeline.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.`,name:"vae"},{anchor:"diffusers.AltDiffusionPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>RobertaSeriesModelWithTransformation</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.AltDiffusionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/xlm-roberta#transformers.XLMRobertaTokenizer" rel="nofollow">XLMRobertaTokenizer</a>) &#x2014;
A <code>XLMRobertaTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.AltDiffusionPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.AltDiffusionPipeline.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 latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.AltDiffusionPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for more details
about a model&#x2019;s potential harms.`,name:"safety_checker"},{anchor:"diffusers.AltDiffusionPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a>) &#x2014;
A <code>CLIPImageProcessor</code> to extract features from generated images; used as inputs to the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L70"}}),ve=new E({props:{name:"__call__",anchor:"diffusers.AltDiffusionPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{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_images_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.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"guidance_rescale",val:": float = 0.0"}],parametersDescription:[{anchor:"diffusers.AltDiffusionPipeline.__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.AltDiffusionPipeline.__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.AltDiffusionPipeline.__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.AltDiffusionPipeline.__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.AltDiffusionPipeline.__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.AltDiffusionPipeline.__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.AltDiffusionPipeline.__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.`,name:"num_images_per_prompt"},{anchor:"diffusers.AltDiffusionPipeline.__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://arxiv.org/abs/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.AltDiffusionPipeline.__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.AltDiffusionPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.AltDiffusionPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</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.AltDiffusionPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</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.AltDiffusionPipeline.__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.AltDiffusionPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>~pipelines.stable_diffusion.AltDiffusionPipelineOutput</code> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.AltDiffusionPipeline.__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.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.AltDiffusionPipeline.__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"},{anchor:"diffusers.AltDiffusionPipeline.__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.AltDiffusionPipeline.__call__.guidance_rescale",description:`<strong>guidance_rescale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.7) &#x2014;
Guidance rescale factor from <a href="https://arxiv.org/pdf/2305.08891.pdf" rel="nofollow">Common Diffusion Noise Schedules and Sample Steps are
Flawed</a>. Guidance rescale factor should fix overexposure when
using zero terminal SNR.`,name:"guidance_rescale"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L522",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <code>~pipelines.stable_diffusion.AltDiffusionPipelineOutput</code> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images and the
second element is a list of <code>bool</code>s indicating whether the corresponding generated image contains
\u201Cnot-safe-for-work\u201D (nsfw) content.</p>
`,returnType:`
<p><code>~pipelines.stable_diffusion.AltDiffusionPipelineOutput</code> or <code>tuple</code></p>
`}}),H=new _s({props:{anchor:"diffusers.AltDiffusionPipeline.__call__.example",$$slots:{default:[$s]},$$scope:{ctx:Q}}}),ye=new E({props:{name:"disable_vae_slicing",anchor:"diffusers.AltDiffusionPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L201"}}),Ie=new E({props:{name:"disable_vae_tiling",anchor:"diffusers.AltDiffusionPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L216"}}),Ae=new E({props:{name:"enable_model_cpu_offload",anchor:"diffusers.AltDiffusionPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L223"}}),Pe=new E({props:{name:"enable_vae_slicing",anchor:"diffusers.AltDiffusionPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L194"}}),Me=new E({props:{name:"enable_vae_tiling",anchor:"diffusers.AltDiffusionPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L208"}}),$e=new Ft({}),ke=new E({props:{name:"class diffusers.AltDiffusionImg2ImgPipeline",anchor:"diffusers.AltDiffusionImg2ImgPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": RobertaSeriesModelWithTransformation"},{name:"tokenizer",val:": XLMRobertaTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.AltDiffusionImg2ImgPipeline.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.`,name:"vae"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>RobertaSeriesModelWithTransformation</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.AltDiffusionImg2ImgPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/xlm-roberta#transformers.XLMRobertaTokenizer" rel="nofollow">XLMRobertaTokenizer</a>) &#x2014;
A <code>XLMRobertaTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.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 latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for more details
about a model&#x2019;s potential harms.`,name:"safety_checker"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a>) &#x2014;
A <code>CLIPImageProcessor</code> to extract features from generated images; used as inputs to the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py#L98"}}),Ce=new E({props:{name:"__call__",anchor:"diffusers.AltDiffusionImg2ImgPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[torch.FloatTensor, PIL.Image.Image, numpy.ndarray, typing.List[torch.FloatTensor], typing.List[PIL.Image.Image], typing.List[numpy.ndarray]] = None"},{name:"strength",val:": float = 0.8"},{name:"num_inference_steps",val:": typing.Optional[int] = 50"},{name:"guidance_scale",val:": typing.Optional[float] = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": typing.Optional[float] = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"}],parametersDescription:[{anchor:"diffusers.AltDiffusionImg2ImgPipeline.__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.AltDiffusionImg2ImgPipeline.__call__.image",description:`<strong>image</strong> (<code>torch.FloatTensor</code>, <code>PIL.Image.Image</code>, <code>np.ndarray</code>, <code>List[torch.FloatTensor]</code>, <code>List[PIL.Image.Image]</code>, or <code>List[np.ndarray]</code>) &#x2014;
<code>Image</code> or tensor representing an image batch to be used as the starting point. Can also accept image
latents as <code>image</code>, but if passing latents directly it is not encoded again.`,name:"image"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.__call__.strength",description:`<strong>strength</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
Indicates extent to transform the reference <code>image</code>. Must be between 0 and 1. <code>image</code> is used as a
starting point and more noise is added the higher the <code>strength</code>. The number of denoising steps depends
on the amount of noise initially added. When <code>strength</code> is 1, added noise is maximum and the denoising
process runs for the full number of iterations specified in <code>num_inference_steps</code>. A value of 1
essentially ignores <code>image</code>.`,name:"strength"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.__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. This parameter is modulated by <code>strength</code>.`,name:"num_inference_steps"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.__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.AltDiffusionImg2ImgPipeline.__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.AltDiffusionImg2ImgPipeline.__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.`,name:"num_images_per_prompt"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.__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://arxiv.org/abs/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.AltDiffusionImg2ImgPipeline.__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.AltDiffusionImg2ImgPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</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.AltDiffusionImg2ImgPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</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.AltDiffusionImg2ImgPipeline.__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.AltDiffusionImg2ImgPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>~pipelines.stable_diffusion.AltDiffusionPipelineOutput</code> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.__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.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.__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"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.__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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py#L565",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <code>~pipelines.stable_diffusion.AltDiffusionPipelineOutput</code> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images and the
second element is a list of <code>bool</code>s indicating whether the corresponding generated image contains
\u201Cnot-safe-for-work\u201D (nsfw) content.</p>
`,returnType:`
<p><code>~pipelines.stable_diffusion.AltDiffusionPipelineOutput</code> or <code>tuple</code></p>
`}}),ae=new _s({props:{anchor:"diffusers.AltDiffusionImg2ImgPipeline.__call__.example",$$slots:{default:[ks]},$$scope:{ctx:Q}}}),Ee=new E({props:{name:"enable_model_cpu_offload",anchor:"diffusers.AltDiffusionImg2ImgPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py#L224"}}),Te=new Ft({}),Ue=new E({props:{name:"class diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput",anchor:"diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"},{name:"nsfw_content_detected",val:": typing.Optional[typing.List[bool]]"}],parametersDescription:[{anchor:"diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput.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.pipelines.alt_diffusion.AltDiffusionPipelineOutput.nsfw_content_detected",description:`<strong>nsfw_content_detected</strong> (<code>List[bool]</code>) &#x2014;
List indicating whether the corresponding generated image contains &#x201C;not-safe-for-work&#x201D; (nsfw) content or
<code>None</code> if safety checking could not be performed.`,name:"nsfw_content_detected"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/__init__.py#L13"}}),Ve=new E({props:{name:"__call__",anchor:"diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),{c(){m=o("meta"),k=l(),_=o("h1"),g=o("a"),M=o("span"),v(f.$$.fragment),P=l(),F=o("span"),R=a("AltDiffusion"),C=l(),T=o("p"),Se=a("AltDiffusion was proposed in "),ue=o("a"),hn=a("AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities"),_n=a(" by Zhongzhi Chen, Guang Liu, Bo-Wen Zhang, Fulong Ye, Qinghong Yang, Ledell Wu."),Rt=l(),Le=o("p"),bn=a("The abstract from the paper is:"),Bt=l(),Je=o("p"),st=o("em"),vn=a("In this work, we present a conceptually simple and effective method to train a strong bilingual multimodal representation model. Starting from the pretrained multimodal representation model CLIP released by OpenAI, we switched its text encoder with a pretrained multilingual text encoder XLM-R, and aligned both languages and image representations by a two-stage training schema consisting of teacher learning and contrastive learning. We validate our method through evaluations of a wide range of tasks. We set new state-of-the-art performances on a bunch of tasks including ImageNet-CN, Flicker30k- CN, and COCO-CN. Further, we obtain very close performances with CLIP on almost all tasks, suggesting that one can simply alter the text encoder in CLIP for extended capabilities such as multilingual understanding."),Wt=l(),B=o("h2"),z=o("a"),at=o("span"),v(ge.$$.fragment),yn=l(),rt=o("span"),wn=a("Tips"),Gt=l(),W=o("p"),lt=o("code"),In=a("AltDiffusion"),Dn=a(" is conceptually the same as "),je=o("a"),An=a("Stable Diffusion"),Pn=a("."),Ot=l(),v(X.$$.fragment),Zt=l(),G=o("h2"),q=o("a"),dt=o("span"),v(he.$$.fragment),Mn=l(),ct=o("span"),$n=a("AltDiffusionPipeline"),Qt=l(),h=o("div"),v(_e.$$.fragment),kn=l(),ft=o("p"),xn=a("Pipeline for text-to-image generation using Alt Diffusion."),Cn=l(),be=o("p"),En=a("This model inherits from "),Fe=o("a"),Tn=a("DiffusionPipeline"),Un=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Vn=l(),pt=o("p"),Nn=a("The pipeline also inherits the following loading methods:"),Sn=l(),U=o("ul"),Re=o("li"),Be=o("a"),Ln=a("load_textual_inversion()"),Jn=a(" for loading textual inversion embeddings"),jn=l(),We=o("li"),Ge=o("a"),Fn=a("load_lora_weights()"),Rn=a(" for loading LoRA weights"),Bn=l(),Oe=o("li"),Ze=o("a"),Wn=a("save_lora_weights()"),Gn=a(" for saving LoRA weights"),On=l(),Y=o("li"),Qe=o("a"),Zn=a("from_single_file()"),Qn=a(" for loading "),mt=o("code"),zn=a(".ckpt"),Xn=a(" files"),qn=l(),J=o("div"),v(ve.$$.fragment),Yn=l(),ut=o("p"),Hn=a("The call function to the pipeline for generation."),Kn=l(),v(H.$$.fragment),eo=l(),K=o("div"),v(ye.$$.fragment),to=l(),we=o("p"),no=a("Disable sliced VAE decoding. If "),gt=o("code"),oo=a("enable_vae_slicing"),io=a(` was previously enabled, this method will go back to
computing decoding in one step.`),so=l(),ee=o("div"),v(Ie.$$.fragment),ao=l(),De=o("p"),ro=a("Disable tiled VAE decoding. If "),ht=o("code"),lo=a("enable_vae_tiling"),co=a(` was previously enabled, this method will go back to
computing decoding in one step.`),fo=l(),te=o("div"),v(Ae.$$.fragment),po=l(),V=o("p"),mo=a(`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),_t=o("code"),uo=a("forward"),go=a(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),bt=o("code"),ho=a("enable_sequential_cpu_offload"),_o=a(`, but performance is much better due to the
iterative execution of the `),vt=o("code"),bo=a("unet"),vo=a("."),yo=l(),ne=o("div"),v(Pe.$$.fragment),wo=l(),yt=o("p"),Io=a(`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.`),Do=l(),oe=o("div"),v(Me.$$.fragment),Ao=l(),wt=o("p"),Po=a(`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.`),zt=l(),O=o("h2"),ie=o("a"),It=o("span"),v($e.$$.fragment),Mo=l(),Dt=o("span"),$o=a("AltDiffusionImg2ImgPipeline"),Xt=l(),$=o("div"),v(ke.$$.fragment),ko=l(),At=o("p"),xo=a("Pipeline for text-guided image-to-image generation using Alt Diffusion."),Co=l(),xe=o("p"),Eo=a("This model inherits from "),ze=o("a"),To=a("DiffusionPipeline"),Uo=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Vo=l(),Pt=o("p"),No=a("The pipeline also inherits the following loading methods:"),So=l(),N=o("ul"),Xe=o("li"),qe=o("a"),Lo=a("load_textual_inversion()"),Jo=a(" for loading textual inversion embeddings"),jo=l(),Ye=o("li"),He=o("a"),Fo=a("load_lora_weights()"),Ro=a(" for loading LoRA weights"),Bo=l(),Ke=o("li"),et=o("a"),Wo=a("save_lora_weights()"),Go=a(" for saving LoRA weights"),Oo=l(),se=o("li"),tt=o("a"),Zo=a("from_single_file()"),Qo=a(" for loading "),Mt=o("code"),zo=a(".ckpt"),Xo=a(" files"),qo=l(),j=o("div"),v(Ce.$$.fragment),Yo=l(),$t=o("p"),Ho=a("The call function to the pipeline for generation."),Ko=l(),v(ae.$$.fragment),ei=l(),re=o("div"),v(Ee.$$.fragment),ti=l(),S=o("p"),ni=a(`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),kt=o("code"),oi=a("forward"),ii=a(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),xt=o("code"),si=a("enable_sequential_cpu_offload"),ai=a(`, but performance is much better due to the
iterative execution of the `),Ct=o("code"),ri=a("unet"),li=a("."),qt=l(),Z=o("h2"),le=o("a"),Et=o("span"),v(Te.$$.fragment),di=l(),Tt=o("span"),ci=a("AltDiffusionPipelineOutput"),Yt=l(),L=o("div"),v(Ue.$$.fragment),fi=l(),Ut=o("p"),pi=a("Output class for Alt Diffusion pipelines."),mi=l(),de=o("div"),v(Ve.$$.fragment),ui=l(),Vt=o("p"),gi=a("Call self as a function."),this.h()},l(t){const p=Ds('[data-svelte="svelte-1phssyn"]',document.head);m=i(p,"META",{name:!0,content:!0}),p.forEach(n),k=d(t),_=i(t,"H1",{class:!0});var Ne=s(_);g=i(Ne,"A",{id:!0,class:!0,href:!0});var Nt=s(g);M=i(Nt,"SPAN",{});var St=s(M);y(f.$$.fragment,St),St.forEach(n),Nt.forEach(n),P=d(Ne),F=i(Ne,"SPAN",{});var Ii=s(F);R=r(Ii,"AltDiffusion"),Ii.forEach(n),Ne.forEach(n),C=d(t),T=i(t,"P",{});var Kt=s(T);Se=r(Kt,"AltDiffusion was proposed in "),ue=i(Kt,"A",{href:!0,rel:!0});var Di=s(ue);hn=r(Di,"AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities"),Di.forEach(n),_n=r(Kt," by Zhongzhi Chen, Guang Liu, Bo-Wen Zhang, Fulong Ye, Qinghong Yang, Ledell Wu."),Kt.forEach(n),Rt=d(t),Le=i(t,"P",{});var Ai=s(Le);bn=r(Ai,"The abstract from the paper is:"),Ai.forEach(n),Bt=d(t),Je=i(t,"P",{});var Pi=s(Je);st=i(Pi,"EM",{});var Mi=s(st);vn=r(Mi,"In this work, we present a conceptually simple and effective method to train a strong bilingual multimodal representation model. Starting from the pretrained multimodal representation model CLIP released by OpenAI, we switched its text encoder with a pretrained multilingual text encoder XLM-R, and aligned both languages and image representations by a two-stage training schema consisting of teacher learning and contrastive learning. We validate our method through evaluations of a wide range of tasks. We set new state-of-the-art performances on a bunch of tasks including ImageNet-CN, Flicker30k- CN, and COCO-CN. Further, we obtain very close performances with CLIP on almost all tasks, suggesting that one can simply alter the text encoder in CLIP for extended capabilities such as multilingual understanding."),Mi.forEach(n),Pi.forEach(n),Wt=d(t),B=i(t,"H2",{class:!0});var en=s(B);z=i(en,"A",{id:!0,class:!0,href:!0});var $i=s(z);at=i($i,"SPAN",{});var ki=s(at);y(ge.$$.fragment,ki),ki.forEach(n),$i.forEach(n),yn=d(en),rt=i(en,"SPAN",{});var xi=s(rt);wn=r(xi,"Tips"),xi.forEach(n),en.forEach(n),Gt=d(t),W=i(t,"P",{});var Lt=s(W);lt=i(Lt,"CODE",{});var Ci=s(lt);In=r(Ci,"AltDiffusion"),Ci.forEach(n),Dn=r(Lt," is conceptually the same as "),je=i(Lt,"A",{href:!0});var Ei=s(je);An=r(Ei,"Stable Diffusion"),Ei.forEach(n),Pn=r(Lt,"."),Lt.forEach(n),Ot=d(t),y(X.$$.fragment,t),Zt=d(t),G=i(t,"H2",{class:!0});var tn=s(G);q=i(tn,"A",{id:!0,class:!0,href:!0});var Ti=s(q);dt=i(Ti,"SPAN",{});var Ui=s(dt);y(he.$$.fragment,Ui),Ui.forEach(n),Ti.forEach(n),Mn=d(tn),ct=i(tn,"SPAN",{});var Vi=s(ct);$n=r(Vi,"AltDiffusionPipeline"),Vi.forEach(n),tn.forEach(n),Qt=d(t),h=i(t,"DIV",{class:!0});var b=s(h);y(_e.$$.fragment,b),kn=d(b),ft=i(b,"P",{});var Ni=s(ft);xn=r(Ni,"Pipeline for text-to-image generation using Alt Diffusion."),Ni.forEach(n),Cn=d(b),be=i(b,"P",{});var nn=s(be);En=r(nn,"This model inherits from "),Fe=i(nn,"A",{href:!0});var Si=s(Fe);Tn=r(Si,"DiffusionPipeline"),Si.forEach(n),Un=r(nn,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),nn.forEach(n),Vn=d(b),pt=i(b,"P",{});var Li=s(pt);Nn=r(Li,"The pipeline also inherits the following loading methods:"),Li.forEach(n),Sn=d(b),U=i(b,"UL",{});var ce=s(U);Re=i(ce,"LI",{});var hi=s(Re);Be=i(hi,"A",{href:!0});var Ji=s(Be);Ln=r(Ji,"load_textual_inversion()"),Ji.forEach(n),Jn=r(hi," for loading textual inversion embeddings"),hi.forEach(n),jn=d(ce),We=i(ce,"LI",{});var _i=s(We);Ge=i(_i,"A",{href:!0});var ji=s(Ge);Fn=r(ji,"load_lora_weights()"),ji.forEach(n),Rn=r(_i," for loading LoRA weights"),_i.forEach(n),Bn=d(ce),Oe=i(ce,"LI",{});var bi=s(Oe);Ze=i(bi,"A",{href:!0});var Fi=s(Ze);Wn=r(Fi,"save_lora_weights()"),Fi.forEach(n),Gn=r(bi," for saving LoRA weights"),bi.forEach(n),On=d(ce),Y=i(ce,"LI",{});var Jt=s(Y);Qe=i(Jt,"A",{href:!0});var Ri=s(Qe);Zn=r(Ri,"from_single_file()"),Ri.forEach(n),Qn=r(Jt," for loading "),mt=i(Jt,"CODE",{});var Bi=s(mt);zn=r(Bi,".ckpt"),Bi.forEach(n),Xn=r(Jt," files"),Jt.forEach(n),ce.forEach(n),qn=d(b),J=i(b,"DIV",{class:!0});var nt=s(J);y(ve.$$.fragment,nt),Yn=d(nt),ut=i(nt,"P",{});var Wi=s(ut);Hn=r(Wi,"The call function to the pipeline for generation."),Wi.forEach(n),Kn=d(nt),y(H.$$.fragment,nt),nt.forEach(n),eo=d(b),K=i(b,"DIV",{class:!0});var on=s(K);y(ye.$$.fragment,on),to=d(on),we=i(on,"P",{});var sn=s(we);no=r(sn,"Disable sliced VAE decoding. If "),gt=i(sn,"CODE",{});var Gi=s(gt);oo=r(Gi,"enable_vae_slicing"),Gi.forEach(n),io=r(sn,` was previously enabled, this method will go back to
computing decoding in one step.`),sn.forEach(n),on.forEach(n),so=d(b),ee=i(b,"DIV",{class:!0});var an=s(ee);y(Ie.$$.fragment,an),ao=d(an),De=i(an,"P",{});var rn=s(De);ro=r(rn,"Disable tiled VAE decoding. If "),ht=i(rn,"CODE",{});var Oi=s(ht);lo=r(Oi,"enable_vae_tiling"),Oi.forEach(n),co=r(rn,` was previously enabled, this method will go back to
computing decoding in one step.`),rn.forEach(n),an.forEach(n),fo=d(b),te=i(b,"DIV",{class:!0});var ln=s(te);y(Ae.$$.fragment,ln),po=d(ln),V=i(ln,"P",{});var fe=s(V);mo=r(fe,`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),_t=i(fe,"CODE",{});var Zi=s(_t);uo=r(Zi,"forward"),Zi.forEach(n),go=r(fe,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),bt=i(fe,"CODE",{});var Qi=s(bt);ho=r(Qi,"enable_sequential_cpu_offload"),Qi.forEach(n),_o=r(fe,`, but performance is much better due to the
iterative execution of the `),vt=i(fe,"CODE",{});var zi=s(vt);bo=r(zi,"unet"),zi.forEach(n),vo=r(fe,"."),fe.forEach(n),ln.forEach(n),yo=d(b),ne=i(b,"DIV",{class:!0});var dn=s(ne);y(Pe.$$.fragment,dn),wo=d(dn),yt=i(dn,"P",{});var Xi=s(yt);Io=r(Xi,`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.`),Xi.forEach(n),dn.forEach(n),Do=d(b),oe=i(b,"DIV",{class:!0});var cn=s(oe);y(Me.$$.fragment,cn),Ao=d(cn),wt=i(cn,"P",{});var qi=s(wt);Po=r(qi,`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.`),qi.forEach(n),cn.forEach(n),b.forEach(n),zt=d(t),O=i(t,"H2",{class:!0});var fn=s(O);ie=i(fn,"A",{id:!0,class:!0,href:!0});var Yi=s(ie);It=i(Yi,"SPAN",{});var Hi=s(It);y($e.$$.fragment,Hi),Hi.forEach(n),Yi.forEach(n),Mo=d(fn),Dt=i(fn,"SPAN",{});var Ki=s(Dt);$o=r(Ki,"AltDiffusionImg2ImgPipeline"),Ki.forEach(n),fn.forEach(n),Xt=d(t),$=i(t,"DIV",{class:!0});var x=s($);y(ke.$$.fragment,x),ko=d(x),At=i(x,"P",{});var es=s(At);xo=r(es,"Pipeline for text-guided image-to-image generation using Alt Diffusion."),es.forEach(n),Co=d(x),xe=i(x,"P",{});var pn=s(xe);Eo=r(pn,"This model inherits from "),ze=i(pn,"A",{href:!0});var ts=s(ze);To=r(ts,"DiffusionPipeline"),ts.forEach(n),Uo=r(pn,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),pn.forEach(n),Vo=d(x),Pt=i(x,"P",{});var ns=s(Pt);No=r(ns,"The pipeline also inherits the following loading methods:"),ns.forEach(n),So=d(x),N=i(x,"UL",{});var pe=s(N);Xe=i(pe,"LI",{});var vi=s(Xe);qe=i(vi,"A",{href:!0});var os=s(qe);Lo=r(os,"load_textual_inversion()"),os.forEach(n),Jo=r(vi," for loading textual inversion embeddings"),vi.forEach(n),jo=d(pe),Ye=i(pe,"LI",{});var yi=s(Ye);He=i(yi,"A",{href:!0});var is=s(He);Fo=r(is,"load_lora_weights()"),is.forEach(n),Ro=r(yi," for loading LoRA weights"),yi.forEach(n),Bo=d(pe),Ke=i(pe,"LI",{});var wi=s(Ke);et=i(wi,"A",{href:!0});var ss=s(et);Wo=r(ss,"save_lora_weights()"),ss.forEach(n),Go=r(wi," for saving LoRA weights"),wi.forEach(n),Oo=d(pe),se=i(pe,"LI",{});var jt=s(se);tt=i(jt,"A",{href:!0});var as=s(tt);Zo=r(as,"from_single_file()"),as.forEach(n),Qo=r(jt," for loading "),Mt=i(jt,"CODE",{});var rs=s(Mt);zo=r(rs,".ckpt"),rs.forEach(n),Xo=r(jt," files"),jt.forEach(n),pe.forEach(n),qo=d(x),j=i(x,"DIV",{class:!0});var ot=s(j);y(Ce.$$.fragment,ot),Yo=d(ot),$t=i(ot,"P",{});var ls=s($t);Ho=r(ls,"The call function to the pipeline for generation."),ls.forEach(n),Ko=d(ot),y(ae.$$.fragment,ot),ot.forEach(n),ei=d(x),re=i(x,"DIV",{class:!0});var mn=s(re);y(Ee.$$.fragment,mn),ti=d(mn),S=i(mn,"P",{});var me=s(S);ni=r(me,`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),kt=i(me,"CODE",{});var ds=s(kt);oi=r(ds,"forward"),ds.forEach(n),ii=r(me,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),xt=i(me,"CODE",{});var cs=s(xt);si=r(cs,"enable_sequential_cpu_offload"),cs.forEach(n),ai=r(me,`, but performance is much better due to the
iterative execution of the `),Ct=i(me,"CODE",{});var fs=s(Ct);ri=r(fs,"unet"),fs.forEach(n),li=r(me,"."),me.forEach(n),mn.forEach(n),x.forEach(n),qt=d(t),Z=i(t,"H2",{class:!0});var un=s(Z);le=i(un,"A",{id:!0,class:!0,href:!0});var ps=s(le);Et=i(ps,"SPAN",{});var ms=s(Et);y(Te.$$.fragment,ms),ms.forEach(n),ps.forEach(n),di=d(un),Tt=i(un,"SPAN",{});var us=s(Tt);ci=r(us,"AltDiffusionPipelineOutput"),us.forEach(n),un.forEach(n),Yt=d(t),L=i(t,"DIV",{class:!0});var it=s(L);y(Ue.$$.fragment,it),fi=d(it),Ut=i(it,"P",{});var gs=s(Ut);pi=r(gs,"Output class for Alt Diffusion pipelines."),gs.forEach(n),mi=d(it),de=i(it,"DIV",{class:!0});var gn=s(de);y(Ve.$$.fragment,gn),ui=d(gn),Vt=i(gn,"P",{});var hs=s(Vt);gi=r(hs,"Call self as a function."),hs.forEach(n),gn.forEach(n),it.forEach(n),this.h()},h(){c(m,"name","hf:doc:metadata"),c(m,"content",JSON.stringify(Cs)),c(g,"id","altdiffusion"),c(g,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(g,"href","#altdiffusion"),c(_,"class","relative group"),c(ue,"href","https://huggingface.co/papers/2211.06679"),c(ue,"rel","nofollow"),c(z,"id","tips"),c(z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(z,"href","#tips"),c(B,"class","relative group"),c(je,"href","./stable_diffusion/overview"),c(q,"id","diffusers.AltDiffusionPipeline"),c(q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(q,"href","#diffusers.AltDiffusionPipeline"),c(G,"class","relative group"),c(Fe,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),c(Be,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion"),c(Ge,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights"),c(Ze,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights"),c(Qe,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline.from_single_file"),c(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(h,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ie,"id","diffusers.AltDiffusionImg2ImgPipeline"),c(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ie,"href","#diffusers.AltDiffusionImg2ImgPipeline"),c(O,"class","relative group"),c(ze,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),c(qe,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion"),c(He,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights"),c(et,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights"),c(tt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline.from_single_file"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(le,"id","diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput"),c(le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(le,"href","#diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput"),c(Z,"class","relative group"),c(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,p){e(document.head,m),u(t,k,p),u(t,_,p),e(_,g),e(g,M),w(f,M,null),e(_,P),e(_,F),e(F,R),u(t,C,p),u(t,T,p),e(T,Se),e(T,ue),e(ue,hn),e(T,_n),u(t,Rt,p),u(t,Le,p),e(Le,bn),u(t,Bt,p),u(t,Je,p),e(Je,st),e(st,vn),u(t,Wt,p),u(t,B,p),e(B,z),e(z,at),w(ge,at,null),e(B,yn),e(B,rt),e(rt,wn),u(t,Gt,p),u(t,W,p),e(W,lt),e(lt,In),e(W,Dn),e(W,je),e(je,An),e(W,Pn),u(t,Ot,p),w(X,t,p),u(t,Zt,p),u(t,G,p),e(G,q),e(q,dt),w(he,dt,null),e(G,Mn),e(G,ct),e(ct,$n),u(t,Qt,p),u(t,h,p),w(_e,h,null),e(h,kn),e(h,ft),e(ft,xn),e(h,Cn),e(h,be),e(be,En),e(be,Fe),e(Fe,Tn),e(be,Un),e(h,Vn),e(h,pt),e(pt,Nn),e(h,Sn),e(h,U),e(U,Re),e(Re,Be),e(Be,Ln),e(Re,Jn),e(U,jn),e(U,We),e(We,Ge),e(Ge,Fn),e(We,Rn),e(U,Bn),e(U,Oe),e(Oe,Ze),e(Ze,Wn),e(Oe,Gn),e(U,On),e(U,Y),e(Y,Qe),e(Qe,Zn),e(Y,Qn),e(Y,mt),e(mt,zn),e(Y,Xn),e(h,qn),e(h,J),w(ve,J,null),e(J,Yn),e(J,ut),e(ut,Hn),e(J,Kn),w(H,J,null),e(h,eo),e(h,K),w(ye,K,null),e(K,to),e(K,we),e(we,no),e(we,gt),e(gt,oo),e(we,io),e(h,so),e(h,ee),w(Ie,ee,null),e(ee,ao),e(ee,De),e(De,ro),e(De,ht),e(ht,lo),e(De,co),e(h,fo),e(h,te),w(Ae,te,null),e(te,po),e(te,V),e(V,mo),e(V,_t),e(_t,uo),e(V,go),e(V,bt),e(bt,ho),e(V,_o),e(V,vt),e(vt,bo),e(V,vo),e(h,yo),e(h,ne),w(Pe,ne,null),e(ne,wo),e(ne,yt),e(yt,Io),e(h,Do),e(h,oe),w(Me,oe,null),e(oe,Ao),e(oe,wt),e(wt,Po),u(t,zt,p),u(t,O,p),e(O,ie),e(ie,It),w($e,It,null),e(O,Mo),e(O,Dt),e(Dt,$o),u(t,Xt,p),u(t,$,p),w(ke,$,null),e($,ko),e($,At),e(At,xo),e($,Co),e($,xe),e(xe,Eo),e(xe,ze),e(ze,To),e(xe,Uo),e($,Vo),e($,Pt),e(Pt,No),e($,So),e($,N),e(N,Xe),e(Xe,qe),e(qe,Lo),e(Xe,Jo),e(N,jo),e(N,Ye),e(Ye,He),e(He,Fo),e(Ye,Ro),e(N,Bo),e(N,Ke),e(Ke,et),e(et,Wo),e(Ke,Go),e(N,Oo),e(N,se),e(se,tt),e(tt,Zo),e(se,Qo),e(se,Mt),e(Mt,zo),e(se,Xo),e($,qo),e($,j),w(Ce,j,null),e(j,Yo),e(j,$t),e($t,Ho),e(j,Ko),w(ae,j,null),e($,ei),e($,re),w(Ee,re,null),e(re,ti),e(re,S),e(S,ni),e(S,kt),e(kt,oi),e(S,ii),e(S,xt),e(xt,si),e(S,ai),e(S,Ct),e(Ct,ri),e(S,li),u(t,qt,p),u(t,Z,p),e(Z,le),e(le,Et),w(Te,Et,null),e(Z,di),e(Z,Tt),e(Tt,ci),u(t,Yt,p),u(t,L,p),w(Ue,L,null),e(L,fi),e(L,Ut),e(Ut,pi),e(L,mi),e(L,de),w(Ve,de,null),e(de,ui),e(de,Vt),e(Vt,gi),Ht=!0},p(t,[p]){const Ne={};p&2&&(Ne.$$scope={dirty:p,ctx:t}),X.$set(Ne);const Nt={};p&2&&(Nt.$$scope={dirty:p,ctx:t}),H.$set(Nt);const St={};p&2&&(St.$$scope={dirty:p,ctx:t}),ae.$set(St)},i(t){Ht||(I(f.$$.fragment,t),I(ge.$$.fragment,t),I(X.$$.fragment,t),I(he.$$.fragment,t),I(_e.$$.fragment,t),I(ve.$$.fragment,t),I(H.$$.fragment,t),I(ye.$$.fragment,t),I(Ie.$$.fragment,t),I(Ae.$$.fragment,t),I(Pe.$$.fragment,t),I(Me.$$.fragment,t),I($e.$$.fragment,t),I(ke.$$.fragment,t),I(Ce.$$.fragment,t),I(ae.$$.fragment,t),I(Ee.$$.fragment,t),I(Te.$$.fragment,t),I(Ue.$$.fragment,t),I(Ve.$$.fragment,t),Ht=!0)},o(t){D(f.$$.fragment,t),D(ge.$$.fragment,t),D(X.$$.fragment,t),D(he.$$.fragment,t),D(_e.$$.fragment,t),D(ve.$$.fragment,t),D(H.$$.fragment,t),D(ye.$$.fragment,t),D(Ie.$$.fragment,t),D(Ae.$$.fragment,t),D(Pe.$$.fragment,t),D(Me.$$.fragment,t),D($e.$$.fragment,t),D(ke.$$.fragment,t),D(Ce.$$.fragment,t),D(ae.$$.fragment,t),D(Ee.$$.fragment,t),D(Te.$$.fragment,t),D(Ue.$$.fragment,t),D(Ve.$$.fragment,t),Ht=!1},d(t){n(m),t&&n(k),t&&n(_),A(f),t&&n(C),t&&n(T),t&&n(Rt),t&&n(Le),t&&n(Bt),t&&n(Je),t&&n(Wt),t&&n(B),A(ge),t&&n(Gt),t&&n(W),t&&n(Ot),A(X,t),t&&n(Zt),t&&n(G),A(he),t&&n(Qt),t&&n(h),A(_e),A(ve),A(H),A(ye),A(Ie),A(Ae),A(Pe),A(Me),t&&n(zt),t&&n(O),A($e),t&&n(Xt),t&&n($),A(ke),A(Ce),A(ae),A(Ee),t&&n(qt),t&&n(Z),A(Te),t&&n(Yt),t&&n(L),A(Ue),A(Ve)}}}const Cs={local:"altdiffusion",sections:[{local:"tips",title:"Tips"},{local:"diffusers.AltDiffusionPipeline",title:"AltDiffusionPipeline"},{local:"diffusers.AltDiffusionImg2ImgPipeline",title:"AltDiffusionImg2ImgPipeline"},{local:"diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput",title:"AltDiffusionPipelineOutput"}],title:"AltDiffusion"};function Es(Q){return As(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Js extends ys{constructor(m){super();ws(this,m,Es,xs,Is,{})}}export{Js as default,Cs as metadata};
