import{S as ys,i as ws,s as Is,e as i,k as l,w as v,t as a,M as Ds,c as o,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=i("p"),k=a("Make sure to check out the Schedulers "),_=i("a"),g=a("guide"),M=a(" to learn how to explore the tradeoff between scheduler speed and quality, and see the "),f=i("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=o(R,"P",{});var C=s(m);k=r(C,"Make sure to check out the Schedulers "),_=o(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=o(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=i("p"),k=a("Examples:"),_=l(),v(g.$$.fragment)},l(f){m=o(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=i("p"),k=a("Examples:"),_=l(),v(g.$$.fragment)},l(f){m=o(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,ei,K,ye,ti,we,ni,gt,ii,oi,si,ee,Ie,ai,De,ri,ht,li,di,ci,te,Ae,fi,V,pi,_t,mi,ui,bt,gi,hi,vt,_i,bi,vi,ne,Pe,yi,yt,wi,Ii,ie,Me,Di,wt,Ai,zt,O,oe,It,$e,Pi,Dt,Mi,Xt,$,ke,$i,At,ki,xi,xe,Ci,ze,Ei,Ti,Ui,Pt,Vi,Ni,N,Xe,qe,Si,Li,Ji,Ye,He,ji,Fi,Ri,Ke,et,Bi,Wi,Gi,se,tt,Oi,Zi,Mt,Qi,zi,Xi,j,Ce,qi,$t,Yi,Hi,ae,Ki,re,Ee,eo,S,to,kt,no,io,xt,oo,so,Ct,ao,ro,qt,Z,le,Et,Te,lo,Tt,co,Yt,L,Ue,fo,Ut,po,mo,de,Ve,uo,Vt,go,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#L515",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#L558",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=i("meta"),k=l(),_=i("h1"),g=i("a"),M=i("span"),v(f.$$.fragment),P=l(),F=i("span"),R=a("AltDiffusion"),C=l(),T=i("p"),Se=a("AltDiffusion was proposed in "),ue=i("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=i("p"),bn=a("The abstract from the paper is:"),Bt=l(),Je=i("p"),st=i("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=i("h2"),z=i("a"),at=i("span"),v(ge.$$.fragment),yn=l(),rt=i("span"),wn=a("Tips"),Gt=l(),W=i("p"),lt=i("code"),In=a("AltDiffusion"),Dn=a(" is conceptually the same as "),je=i("a"),An=a("Stable Diffusion"),Pn=a("."),Ot=l(),v(X.$$.fragment),Zt=l(),G=i("h2"),q=i("a"),dt=i("span"),v(he.$$.fragment),Mn=l(),ct=i("span"),$n=a("AltDiffusionPipeline"),Qt=l(),h=i("div"),v(_e.$$.fragment),kn=l(),ft=i("p"),xn=a("Pipeline for text-to-image generation using Alt Diffusion."),Cn=l(),be=i("p"),En=a("This model inherits from "),Fe=i("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=i("p"),Nn=a("The pipeline also inherits the following loading methods:"),Sn=l(),U=i("ul"),Re=i("li"),Be=i("a"),Ln=a("load_textual_inversion()"),Jn=a(" for loading textual inversion embeddings"),jn=l(),We=i("li"),Ge=i("a"),Fn=a("load_lora_weights()"),Rn=a(" for loading LoRA weights"),Bn=l(),Oe=i("li"),Ze=i("a"),Wn=a("save_lora_weights()"),Gn=a(" for saving LoRA weights"),On=l(),Y=i("li"),Qe=i("a"),Zn=a("from_single_file()"),Qn=a(" for loading "),mt=i("code"),zn=a(".ckpt"),Xn=a(" files"),qn=l(),J=i("div"),v(ve.$$.fragment),Yn=l(),ut=i("p"),Hn=a("The call function to the pipeline for generation."),Kn=l(),v(H.$$.fragment),ei=l(),K=i("div"),v(ye.$$.fragment),ti=l(),we=i("p"),ni=a("Disable sliced VAE decoding. If "),gt=i("code"),ii=a("enable_vae_slicing"),oi=a(` was previously enabled, this method will go back to
computing decoding in one step.`),si=l(),ee=i("div"),v(Ie.$$.fragment),ai=l(),De=i("p"),ri=a("Disable tiled VAE decoding. If "),ht=i("code"),li=a("enable_vae_tiling"),di=a(` was previously enabled, this method will go back to
computing decoding in one step.`),ci=l(),te=i("div"),v(Ae.$$.fragment),fi=l(),V=i("p"),pi=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=i("code"),mi=a("forward"),ui=a(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),bt=i("code"),gi=a("enable_sequential_cpu_offload"),hi=a(`, but performance is much better due to the
iterative execution of the `),vt=i("code"),_i=a("unet"),bi=a("."),vi=l(),ne=i("div"),v(Pe.$$.fragment),yi=l(),yt=i("p"),wi=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.`),Ii=l(),ie=i("div"),v(Me.$$.fragment),Di=l(),wt=i("p"),Ai=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=i("h2"),oe=i("a"),It=i("span"),v($e.$$.fragment),Pi=l(),Dt=i("span"),Mi=a("AltDiffusionImg2ImgPipeline"),Xt=l(),$=i("div"),v(ke.$$.fragment),$i=l(),At=i("p"),ki=a("Pipeline for text-guided image-to-image generation using Alt Diffusion."),xi=l(),xe=i("p"),Ci=a("This model inherits from "),ze=i("a"),Ei=a("DiffusionPipeline"),Ti=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Ui=l(),Pt=i("p"),Vi=a("The pipeline also inherits the following loading methods:"),Ni=l(),N=i("ul"),Xe=i("li"),qe=i("a"),Si=a("load_textual_inversion()"),Li=a(" for loading textual inversion embeddings"),Ji=l(),Ye=i("li"),He=i("a"),ji=a("load_lora_weights()"),Fi=a(" for loading LoRA weights"),Ri=l(),Ke=i("li"),et=i("a"),Bi=a("save_lora_weights()"),Wi=a(" for saving LoRA weights"),Gi=l(),se=i("li"),tt=i("a"),Oi=a("from_single_file()"),Zi=a(" for loading "),Mt=i("code"),Qi=a(".ckpt"),zi=a(" files"),Xi=l(),j=i("div"),v(Ce.$$.fragment),qi=l(),$t=i("p"),Yi=a("The call function to the pipeline for generation."),Hi=l(),v(ae.$$.fragment),Ki=l(),re=i("div"),v(Ee.$$.fragment),eo=l(),S=i("p"),to=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=i("code"),no=a("forward"),io=a(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),xt=i("code"),oo=a("enable_sequential_cpu_offload"),so=a(`, but performance is much better due to the
iterative execution of the `),Ct=i("code"),ao=a("unet"),ro=a("."),qt=l(),Z=i("h2"),le=i("a"),Et=i("span"),v(Te.$$.fragment),lo=l(),Tt=i("span"),co=a("AltDiffusionPipelineOutput"),Yt=l(),L=i("div"),v(Ue.$$.fragment),fo=l(),Ut=i("p"),po=a("Output class for Alt Diffusion pipelines."),mo=l(),de=i("div"),v(Ve.$$.fragment),uo=l(),Vt=i("p"),go=a("Call self as a function."),this.h()},l(t){const p=Ds('[data-svelte="svelte-1phssyn"]',document.head);m=o(p,"META",{name:!0,content:!0}),p.forEach(n),k=d(t),_=o(t,"H1",{class:!0});var Ne=s(_);g=o(Ne,"A",{id:!0,class:!0,href:!0});var Nt=s(g);M=o(Nt,"SPAN",{});var St=s(M);y(f.$$.fragment,St),St.forEach(n),Nt.forEach(n),P=d(Ne),F=o(Ne,"SPAN",{});var Io=s(F);R=r(Io,"AltDiffusion"),Io.forEach(n),Ne.forEach(n),C=d(t),T=o(t,"P",{});var Kt=s(T);Se=r(Kt,"AltDiffusion was proposed in "),ue=o(Kt,"A",{href:!0,rel:!0});var Do=s(ue);hn=r(Do,"AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities"),Do.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=o(t,"P",{});var Ao=s(Le);bn=r(Ao,"The abstract from the paper is:"),Ao.forEach(n),Bt=d(t),Je=o(t,"P",{});var Po=s(Je);st=o(Po,"EM",{});var Mo=s(st);vn=r(Mo,"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."),Mo.forEach(n),Po.forEach(n),Wt=d(t),B=o(t,"H2",{class:!0});var en=s(B);z=o(en,"A",{id:!0,class:!0,href:!0});var $o=s(z);at=o($o,"SPAN",{});var ko=s(at);y(ge.$$.fragment,ko),ko.forEach(n),$o.forEach(n),yn=d(en),rt=o(en,"SPAN",{});var xo=s(rt);wn=r(xo,"Tips"),xo.forEach(n),en.forEach(n),Gt=d(t),W=o(t,"P",{});var Lt=s(W);lt=o(Lt,"CODE",{});var Co=s(lt);In=r(Co,"AltDiffusion"),Co.forEach(n),Dn=r(Lt," is conceptually the same as "),je=o(Lt,"A",{href:!0});var Eo=s(je);An=r(Eo,"Stable Diffusion"),Eo.forEach(n),Pn=r(Lt,"."),Lt.forEach(n),Ot=d(t),y(X.$$.fragment,t),Zt=d(t),G=o(t,"H2",{class:!0});var tn=s(G);q=o(tn,"A",{id:!0,class:!0,href:!0});var To=s(q);dt=o(To,"SPAN",{});var Uo=s(dt);y(he.$$.fragment,Uo),Uo.forEach(n),To.forEach(n),Mn=d(tn),ct=o(tn,"SPAN",{});var Vo=s(ct);$n=r(Vo,"AltDiffusionPipeline"),Vo.forEach(n),tn.forEach(n),Qt=d(t),h=o(t,"DIV",{class:!0});var b=s(h);y(_e.$$.fragment,b),kn=d(b),ft=o(b,"P",{});var No=s(ft);xn=r(No,"Pipeline for text-to-image generation using Alt Diffusion."),No.forEach(n),Cn=d(b),be=o(b,"P",{});var nn=s(be);En=r(nn,"This model inherits from "),Fe=o(nn,"A",{href:!0});var So=s(Fe);Tn=r(So,"DiffusionPipeline"),So.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=o(b,"P",{});var Lo=s(pt);Nn=r(Lo,"The pipeline also inherits the following loading methods:"),Lo.forEach(n),Sn=d(b),U=o(b,"UL",{});var ce=s(U);Re=o(ce,"LI",{});var ho=s(Re);Be=o(ho,"A",{href:!0});var Jo=s(Be);Ln=r(Jo,"load_textual_inversion()"),Jo.forEach(n),Jn=r(ho," for loading textual inversion embeddings"),ho.forEach(n),jn=d(ce),We=o(ce,"LI",{});var _o=s(We);Ge=o(_o,"A",{href:!0});var jo=s(Ge);Fn=r(jo,"load_lora_weights()"),jo.forEach(n),Rn=r(_o," for loading LoRA weights"),_o.forEach(n),Bn=d(ce),Oe=o(ce,"LI",{});var bo=s(Oe);Ze=o(bo,"A",{href:!0});var Fo=s(Ze);Wn=r(Fo,"save_lora_weights()"),Fo.forEach(n),Gn=r(bo," for saving LoRA weights"),bo.forEach(n),On=d(ce),Y=o(ce,"LI",{});var Jt=s(Y);Qe=o(Jt,"A",{href:!0});var Ro=s(Qe);Zn=r(Ro,"from_single_file()"),Ro.forEach(n),Qn=r(Jt," for loading "),mt=o(Jt,"CODE",{});var Bo=s(mt);zn=r(Bo,".ckpt"),Bo.forEach(n),Xn=r(Jt," files"),Jt.forEach(n),ce.forEach(n),qn=d(b),J=o(b,"DIV",{class:!0});var nt=s(J);y(ve.$$.fragment,nt),Yn=d(nt),ut=o(nt,"P",{});var Wo=s(ut);Hn=r(Wo,"The call function to the pipeline for generation."),Wo.forEach(n),Kn=d(nt),y(H.$$.fragment,nt),nt.forEach(n),ei=d(b),K=o(b,"DIV",{class:!0});var on=s(K);y(ye.$$.fragment,on),ti=d(on),we=o(on,"P",{});var sn=s(we);ni=r(sn,"Disable sliced VAE decoding. If "),gt=o(sn,"CODE",{});var Go=s(gt);ii=r(Go,"enable_vae_slicing"),Go.forEach(n),oi=r(sn,` was previously enabled, this method will go back to
computing decoding in one step.`),sn.forEach(n),on.forEach(n),si=d(b),ee=o(b,"DIV",{class:!0});var an=s(ee);y(Ie.$$.fragment,an),ai=d(an),De=o(an,"P",{});var rn=s(De);ri=r(rn,"Disable tiled VAE decoding. If "),ht=o(rn,"CODE",{});var Oo=s(ht);li=r(Oo,"enable_vae_tiling"),Oo.forEach(n),di=r(rn,` was previously enabled, this method will go back to
computing decoding in one step.`),rn.forEach(n),an.forEach(n),ci=d(b),te=o(b,"DIV",{class:!0});var ln=s(te);y(Ae.$$.fragment,ln),fi=d(ln),V=o(ln,"P",{});var fe=s(V);pi=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=o(fe,"CODE",{});var Zo=s(_t);mi=r(Zo,"forward"),Zo.forEach(n),ui=r(fe,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),bt=o(fe,"CODE",{});var Qo=s(bt);gi=r(Qo,"enable_sequential_cpu_offload"),Qo.forEach(n),hi=r(fe,`, but performance is much better due to the
iterative execution of the `),vt=o(fe,"CODE",{});var zo=s(vt);_i=r(zo,"unet"),zo.forEach(n),bi=r(fe,"."),fe.forEach(n),ln.forEach(n),vi=d(b),ne=o(b,"DIV",{class:!0});var dn=s(ne);y(Pe.$$.fragment,dn),yi=d(dn),yt=o(dn,"P",{});var Xo=s(yt);wi=r(Xo,`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.`),Xo.forEach(n),dn.forEach(n),Ii=d(b),ie=o(b,"DIV",{class:!0});var cn=s(ie);y(Me.$$.fragment,cn),Di=d(cn),wt=o(cn,"P",{});var qo=s(wt);Ai=r(qo,`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.`),qo.forEach(n),cn.forEach(n),b.forEach(n),zt=d(t),O=o(t,"H2",{class:!0});var fn=s(O);oe=o(fn,"A",{id:!0,class:!0,href:!0});var Yo=s(oe);It=o(Yo,"SPAN",{});var Ho=s(It);y($e.$$.fragment,Ho),Ho.forEach(n),Yo.forEach(n),Pi=d(fn),Dt=o(fn,"SPAN",{});var Ko=s(Dt);Mi=r(Ko,"AltDiffusionImg2ImgPipeline"),Ko.forEach(n),fn.forEach(n),Xt=d(t),$=o(t,"DIV",{class:!0});var x=s($);y(ke.$$.fragment,x),$i=d(x),At=o(x,"P",{});var es=s(At);ki=r(es,"Pipeline for text-guided image-to-image generation using Alt Diffusion."),es.forEach(n),xi=d(x),xe=o(x,"P",{});var pn=s(xe);Ci=r(pn,"This model inherits from "),ze=o(pn,"A",{href:!0});var ts=s(ze);Ei=r(ts,"DiffusionPipeline"),ts.forEach(n),Ti=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),Ui=d(x),Pt=o(x,"P",{});var ns=s(Pt);Vi=r(ns,"The pipeline also inherits the following loading methods:"),ns.forEach(n),Ni=d(x),N=o(x,"UL",{});var pe=s(N);Xe=o(pe,"LI",{});var vo=s(Xe);qe=o(vo,"A",{href:!0});var is=s(qe);Si=r(is,"load_textual_inversion()"),is.forEach(n),Li=r(vo," for loading textual inversion embeddings"),vo.forEach(n),Ji=d(pe),Ye=o(pe,"LI",{});var yo=s(Ye);He=o(yo,"A",{href:!0});var os=s(He);ji=r(os,"load_lora_weights()"),os.forEach(n),Fi=r(yo," for loading LoRA weights"),yo.forEach(n),Ri=d(pe),Ke=o(pe,"LI",{});var wo=s(Ke);et=o(wo,"A",{href:!0});var ss=s(et);Bi=r(ss,"save_lora_weights()"),ss.forEach(n),Wi=r(wo," for saving LoRA weights"),wo.forEach(n),Gi=d(pe),se=o(pe,"LI",{});var jt=s(se);tt=o(jt,"A",{href:!0});var as=s(tt);Oi=r(as,"from_single_file()"),as.forEach(n),Zi=r(jt," for loading "),Mt=o(jt,"CODE",{});var rs=s(Mt);Qi=r(rs,".ckpt"),rs.forEach(n),zi=r(jt," files"),jt.forEach(n),pe.forEach(n),Xi=d(x),j=o(x,"DIV",{class:!0});var it=s(j);y(Ce.$$.fragment,it),qi=d(it),$t=o(it,"P",{});var ls=s($t);Yi=r(ls,"The call function to the pipeline for generation."),ls.forEach(n),Hi=d(it),y(ae.$$.fragment,it),it.forEach(n),Ki=d(x),re=o(x,"DIV",{class:!0});var mn=s(re);y(Ee.$$.fragment,mn),eo=d(mn),S=o(mn,"P",{});var me=s(S);to=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=o(me,"CODE",{});var ds=s(kt);no=r(ds,"forward"),ds.forEach(n),io=r(me,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),xt=o(me,"CODE",{});var cs=s(xt);oo=r(cs,"enable_sequential_cpu_offload"),cs.forEach(n),so=r(me,`, but performance is much better due to the
iterative execution of the `),Ct=o(me,"CODE",{});var fs=s(Ct);ao=r(fs,"unet"),fs.forEach(n),ro=r(me,"."),me.forEach(n),mn.forEach(n),x.forEach(n),qt=d(t),Z=o(t,"H2",{class:!0});var un=s(Z);le=o(un,"A",{id:!0,class:!0,href:!0});var ps=s(le);Et=o(ps,"SPAN",{});var ms=s(Et);y(Te.$$.fragment,ms),ms.forEach(n),ps.forEach(n),lo=d(un),Tt=o(un,"SPAN",{});var us=s(Tt);co=r(us,"AltDiffusionPipelineOutput"),us.forEach(n),un.forEach(n),Yt=d(t),L=o(t,"DIV",{class:!0});var ot=s(L);y(Ue.$$.fragment,ot),fo=d(ot),Ut=o(ot,"P",{});var gs=s(Ut);po=r(gs,"Output class for Alt Diffusion pipelines."),gs.forEach(n),mo=d(ot),de=o(ot,"DIV",{class:!0});var gn=s(de);y(Ve.$$.fragment,gn),uo=d(gn),Vt=o(gn,"P",{});var hs=s(Vt);go=r(hs,"Call self as a function."),hs.forEach(n),gn.forEach(n),ot.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/inpaint#diffusers.StableDiffusionInpaintPipeline.load_textual_inversion"),c(Ge,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.load_lora_weights"),c(Ze,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.save_lora_weights"),c(Qe,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.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(ie,"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(oe,"id","diffusers.AltDiffusionImg2ImgPipeline"),c(oe,"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(oe,"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/inpaint#diffusers.StableDiffusionInpaintPipeline.load_textual_inversion"),c(He,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.load_lora_weights"),c(et,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.save_lora_weights"),c(tt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.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,ei),e(h,K),w(ye,K,null),e(K,ti),e(K,we),e(we,ni),e(we,gt),e(gt,ii),e(we,oi),e(h,si),e(h,ee),w(Ie,ee,null),e(ee,ai),e(ee,De),e(De,ri),e(De,ht),e(ht,li),e(De,di),e(h,ci),e(h,te),w(Ae,te,null),e(te,fi),e(te,V),e(V,pi),e(V,_t),e(_t,mi),e(V,ui),e(V,bt),e(bt,gi),e(V,hi),e(V,vt),e(vt,_i),e(V,bi),e(h,vi),e(h,ne),w(Pe,ne,null),e(ne,yi),e(ne,yt),e(yt,wi),e(h,Ii),e(h,ie),w(Me,ie,null),e(ie,Di),e(ie,wt),e(wt,Ai),u(t,zt,p),u(t,O,p),e(O,oe),e(oe,It),w($e,It,null),e(O,Pi),e(O,Dt),e(Dt,Mi),u(t,Xt,p),u(t,$,p),w(ke,$,null),e($,$i),e($,At),e(At,ki),e($,xi),e($,xe),e(xe,Ci),e(xe,ze),e(ze,Ei),e(xe,Ti),e($,Ui),e($,Pt),e(Pt,Vi),e($,Ni),e($,N),e(N,Xe),e(Xe,qe),e(qe,Si),e(Xe,Li),e(N,Ji),e(N,Ye),e(Ye,He),e(He,ji),e(Ye,Fi),e(N,Ri),e(N,Ke),e(Ke,et),e(et,Bi),e(Ke,Wi),e(N,Gi),e(N,se),e(se,tt),e(tt,Oi),e(se,Zi),e(se,Mt),e(Mt,Qi),e(se,zi),e($,Xi),e($,j),w(Ce,j,null),e(j,qi),e(j,$t),e($t,Yi),e(j,Hi),w(ae,j,null),e($,Ki),e($,re),w(Ee,re,null),e(re,eo),e(re,S),e(S,to),e(S,kt),e(kt,no),e(S,io),e(S,xt),e(xt,oo),e(S,so),e(S,Ct),e(Ct,ao),e(S,ro),u(t,qt,p),u(t,Z,p),e(Z,le),e(le,Et),w(Te,Et,null),e(Z,lo),e(Z,Tt),e(Tt,co),u(t,Yt,p),u(t,L,p),w(Ue,L,null),e(L,fo),e(L,Ut),e(Ut,po),e(L,mo),e(L,de),w(Ve,de,null),e(de,uo),e(de,Vt),e(Vt,go),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};
