import{S as Ss,i as Ls,s as Js,e as o,k as l,w as v,t as a,M as js,c as i,d as n,m as d,a as s,x as y,h as r,b as p,G as e,g as u,y as w,q as I,o as D,B as A,v as Fs,L as Ns}from"../../../chunks/vendor-hf-doc-builder.js";import{T as Rs}from"../../../chunks/Tip-hf-doc-builder.js";import{D as C}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as Vs}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as Zt}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Us}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Bs(Q){let m,M,_,h,$,c,P,F;return{c(){m=o("p"),M=a("Make sure to check out the Schedulers "),_=o("a"),h=a("guide"),$=a(" to learn how to explore the tradeoff between scheduler speed and quality, and see the "),c=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 T=s(m);M=r(T,"Make sure to check out the Schedulers "),_=i(T,"A",{href:!0});var E=s(_);h=r(E,"guide"),E.forEach(n),$=r(T," to learn how to explore the tradeoff between scheduler speed and quality, and see the "),c=i(T,"A",{href:!0});var Fe=s(c);P=r(Fe,"reuse components across pipelines"),Fe.forEach(n),F=r(T," section to learn how to efficiently load the same components into multiple pipelines."),T.forEach(n),this.h()},h(){p(_,"href","/using-diffusers/schedulers"),p(c,"href","/using-diffusers/loading#reuse-components-across-pipelines")},m(R,T){u(R,m,T),e(m,M),e(m,_),e(_,h),e(m,$),e(m,c),e(c,P),e(m,F)},d(R){R&&n(m)}}}function Ws(Q){let m,M,_,h,$;return h=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"),M=a("Examples:"),_=l(),v(h.$$.fragment)},l(c){m=i(c,"P",{});var P=s(m);M=r(P,"Examples:"),P.forEach(n),_=d(c),y(h.$$.fragment,c)},m(c,P){u(c,m,P),e(m,M),u(c,_,P),w(h,c,P),$=!0},p:Ns,i(c){$||(I(h.$$.fragment,c),$=!0)},o(c){D(h.$$.fragment,c),$=!1},d(c){c&&n(m),c&&n(_),A(h,c)}}}function Os(Q){let m,M,_,h,$;return h=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"),M=a("Examples:"),_=l(),v(h.$$.fragment)},l(c){m=i(c,"P",{});var P=s(m);M=r(P,"Examples:"),P.forEach(n),_=d(c),y(h.$$.fragment,c)},m(c,P){u(c,m,P),e(m,M),u(c,_,P),w(h,c,P),$=!0},p:Ns,i(c){$||(I(h.$$.fragment,c),$=!0)},o(c){D(h.$$.fragment,c),$=!1},d(c){c&&n(m),c&&n(_),A(h,c)}}}function Gs(Q){let m,M,_,h,$,c,P,F,R,T,E,Fe,he,An,Pn,Qt,Re,xn,zt,Be,dt,$n,Xt,B,z,pt,_e,Mn,ct,kn,qt,W,ft,Cn,Tn,We,En,Un,Yt,X,Ht,O,q,mt,be,Nn,ut,Vn,Kt,g,ve,Sn,gt,Ln,Jn,ye,jn,Oe,Fn,Rn,Bn,ht,Wn,On,U,Ge,Ze,Gn,Zn,Qn,Qe,ze,zn,Xn,qn,Xe,qe,Yn,Hn,Kn,Y,Ye,eo,to,_t,no,oo,io,J,we,so,bt,ao,ro,H,lo,K,Ie,po,De,co,vt,fo,mo,uo,ee,Ae,go,Pe,ho,yt,_o,bo,vo,te,xe,yo,N,wo,wt,Io,Do,It,Ao,Po,Dt,xo,$o,Mo,ne,$e,ko,At,Co,To,oe,Me,Eo,Pt,Uo,No,ie,ke,Vo,xt,So,en,G,se,$t,Ce,Lo,Mt,Jo,tn,x,Te,jo,kt,Fo,Ro,Ee,Bo,He,Wo,Oo,Go,Ct,Zo,Qo,V,Ke,et,zo,Xo,qo,tt,nt,Yo,Ho,Ko,ot,it,ei,ti,ni,ae,st,oi,ii,Tt,si,ai,ri,j,Ue,li,Et,di,pi,re,ci,le,Ne,fi,S,mi,Ut,ui,gi,Nt,hi,_i,Vt,bi,vi,yi,de,Ve,wi,St,Ii,nn,Z,pe,Lt,Se,Di,Jt,Ai,on,L,Le,Pi,jt,xi,$i,ce,Je,Mi,Ft,ki,sn;return c=new Zt({}),_e=new Zt({}),X=new Rs({props:{$$slots:{default:[Bs]},$$scope:{ctx:Q}}}),be=new Zt({}),ve=new C({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"}}),we=new C({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#L550",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 Us({props:{anchor:"diffusers.AltDiffusionPipeline.__call__.example",$$slots:{default:[Ws]},$$scope:{ctx:Q}}}),Ie=new C({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"}}),Ae=new C({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"}}),xe=new C({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"}}),$e=new C({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 C({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"}}),ke=new C({props:{name:"encode_prompt",anchor:"diffusers.AltDiffusionPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:""},{name:"num_images_per_prompt",val:""},{name:"do_classifier_free_guidance",val:""},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.AltDiffusionPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded
device &#x2014; (<code>torch.device</code>):
torch device`,name:"prompt"},{anchor:"diffusers.AltDiffusionPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.AltDiffusionPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.AltDiffusionPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.AltDiffusionPipeline.encode_prompt.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, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.AltDiffusionPipeline.encode_prompt.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, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.AltDiffusionPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L284"}}),Ce=new Zt({}),Te=new C({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"}}),Ue=new C({props:{name:"__call__",anchor:"diffusers.AltDiffusionImg2ImgPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.FloatTensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.FloatTensor]] = 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>, numpy array or tensor representing an image batch to be used as the starting point. For both
numpy array and pytorch tensor, the expected value range is between <code>[0, 1]</code> If it&#x2019;s a tensor or a list
or tensors, the expected shape should be <code>(B, C, H, W)</code> or <code>(C, H, W)</code>. If it is a numpy array or a
list of arrays, the expected shape should be <code>(B, H, W, C)</code> or <code>(H, W, C)</code> It 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#L593",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>
`}}),re=new Us({props:{anchor:"diffusers.AltDiffusionImg2ImgPipeline.__call__.example",$$slots:{default:[Os]},$$scope:{ctx:Q}}}),Ne=new C({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"}}),Ve=new C({props:{name:"encode_prompt",anchor:"diffusers.AltDiffusionImg2ImgPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:""},{name:"num_images_per_prompt",val:""},{name:"do_classifier_free_guidance",val:""},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.AltDiffusionImg2ImgPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded
device &#x2014; (<code>torch.device</code>):
torch device`,name:"prompt"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.encode_prompt.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, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.encode_prompt.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, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py#L285"}}),Se=new Zt({}),Le=new C({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"}}),Je=new C({props:{name:"__call__",anchor:"diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),{c(){m=o("meta"),M=l(),_=o("h1"),h=o("a"),$=o("span"),v(c.$$.fragment),P=l(),F=o("span"),R=a("AltDiffusion"),T=l(),E=o("p"),Fe=a("AltDiffusion was proposed in "),he=o("a"),An=a("AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities"),Pn=a(" by Zhongzhi Chen, Guang Liu, Bo-Wen Zhang, Fulong Ye, Qinghong Yang, Ledell Wu."),Qt=l(),Re=o("p"),xn=a("The abstract from the paper is:"),zt=l(),Be=o("p"),dt=o("em"),$n=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."),Xt=l(),B=o("h2"),z=o("a"),pt=o("span"),v(_e.$$.fragment),Mn=l(),ct=o("span"),kn=a("Tips"),qt=l(),W=o("p"),ft=o("code"),Cn=a("AltDiffusion"),Tn=a(" is conceptually the same as "),We=o("a"),En=a("Stable Diffusion"),Un=a("."),Yt=l(),v(X.$$.fragment),Ht=l(),O=o("h2"),q=o("a"),mt=o("span"),v(be.$$.fragment),Nn=l(),ut=o("span"),Vn=a("AltDiffusionPipeline"),Kt=l(),g=o("div"),v(ve.$$.fragment),Sn=l(),gt=o("p"),Ln=a("Pipeline for text-to-image generation using Alt Diffusion."),Jn=l(),ye=o("p"),jn=a("This model inherits from "),Oe=o("a"),Fn=a("DiffusionPipeline"),Rn=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Bn=l(),ht=o("p"),Wn=a("The pipeline also inherits the following loading methods:"),On=l(),U=o("ul"),Ge=o("li"),Ze=o("a"),Gn=a("load_textual_inversion()"),Zn=a(" for loading textual inversion embeddings"),Qn=l(),Qe=o("li"),ze=o("a"),zn=a("load_lora_weights()"),Xn=a(" for loading LoRA weights"),qn=l(),Xe=o("li"),qe=o("a"),Yn=a("save_lora_weights()"),Hn=a(" for saving LoRA weights"),Kn=l(),Y=o("li"),Ye=o("a"),eo=a("from_single_file()"),to=a(" for loading "),_t=o("code"),no=a(".ckpt"),oo=a(" files"),io=l(),J=o("div"),v(we.$$.fragment),so=l(),bt=o("p"),ao=a("The call function to the pipeline for generation."),ro=l(),v(H.$$.fragment),lo=l(),K=o("div"),v(Ie.$$.fragment),po=l(),De=o("p"),co=a("Disable sliced VAE decoding. If "),vt=o("code"),fo=a("enable_vae_slicing"),mo=a(` was previously enabled, this method will go back to
computing decoding in one step.`),uo=l(),ee=o("div"),v(Ae.$$.fragment),go=l(),Pe=o("p"),ho=a("Disable tiled VAE decoding. If "),yt=o("code"),_o=a("enable_vae_tiling"),bo=a(` was previously enabled, this method will go back to
computing decoding in one step.`),vo=l(),te=o("div"),v(xe.$$.fragment),yo=l(),N=o("p"),wo=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 `),wt=o("code"),Io=a("forward"),Do=a(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),It=o("code"),Ao=a("enable_sequential_cpu_offload"),Po=a(`, but performance is much better due to the
iterative execution of the `),Dt=o("code"),xo=a("unet"),$o=a("."),Mo=l(),ne=o("div"),v($e.$$.fragment),ko=l(),At=o("p"),Co=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.`),To=l(),oe=o("div"),v(Me.$$.fragment),Eo=l(),Pt=o("p"),Uo=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.`),No=l(),ie=o("div"),v(ke.$$.fragment),Vo=l(),xt=o("p"),So=a("Encodes the prompt into text encoder hidden states."),en=l(),G=o("h2"),se=o("a"),$t=o("span"),v(Ce.$$.fragment),Lo=l(),Mt=o("span"),Jo=a("AltDiffusionImg2ImgPipeline"),tn=l(),x=o("div"),v(Te.$$.fragment),jo=l(),kt=o("p"),Fo=a("Pipeline for text-guided image-to-image generation using Alt Diffusion."),Ro=l(),Ee=o("p"),Bo=a("This model inherits from "),He=o("a"),Wo=a("DiffusionPipeline"),Oo=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Go=l(),Ct=o("p"),Zo=a("The pipeline also inherits the following loading methods:"),Qo=l(),V=o("ul"),Ke=o("li"),et=o("a"),zo=a("load_textual_inversion()"),Xo=a(" for loading textual inversion embeddings"),qo=l(),tt=o("li"),nt=o("a"),Yo=a("load_lora_weights()"),Ho=a(" for loading LoRA weights"),Ko=l(),ot=o("li"),it=o("a"),ei=a("save_lora_weights()"),ti=a(" for saving LoRA weights"),ni=l(),ae=o("li"),st=o("a"),oi=a("from_single_file()"),ii=a(" for loading "),Tt=o("code"),si=a(".ckpt"),ai=a(" files"),ri=l(),j=o("div"),v(Ue.$$.fragment),li=l(),Et=o("p"),di=a("The call function to the pipeline for generation."),pi=l(),v(re.$$.fragment),ci=l(),le=o("div"),v(Ne.$$.fragment),fi=l(),S=o("p"),mi=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 `),Ut=o("code"),ui=a("forward"),gi=a(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),Nt=o("code"),hi=a("enable_sequential_cpu_offload"),_i=a(`, but performance is much better due to the
iterative execution of the `),Vt=o("code"),bi=a("unet"),vi=a("."),yi=l(),de=o("div"),v(Ve.$$.fragment),wi=l(),St=o("p"),Ii=a("Encodes the prompt into text encoder hidden states."),nn=l(),Z=o("h2"),pe=o("a"),Lt=o("span"),v(Se.$$.fragment),Di=l(),Jt=o("span"),Ai=a("AltDiffusionPipelineOutput"),on=l(),L=o("div"),v(Le.$$.fragment),Pi=l(),jt=o("p"),xi=a("Output class for Alt Diffusion pipelines."),$i=l(),ce=o("div"),v(Je.$$.fragment),Mi=l(),Ft=o("p"),ki=a("Call self as a function."),this.h()},l(t){const f=js('[data-svelte="svelte-1phssyn"]',document.head);m=i(f,"META",{name:!0,content:!0}),f.forEach(n),M=d(t),_=i(t,"H1",{class:!0});var je=s(_);h=i(je,"A",{id:!0,class:!0,href:!0});var Rt=s(h);$=i(Rt,"SPAN",{});var Bt=s($);y(c.$$.fragment,Bt),Bt.forEach(n),Rt.forEach(n),P=d(je),F=i(je,"SPAN",{});var Si=s(F);R=r(Si,"AltDiffusion"),Si.forEach(n),je.forEach(n),T=d(t),E=i(t,"P",{});var an=s(E);Fe=r(an,"AltDiffusion was proposed in "),he=i(an,"A",{href:!0,rel:!0});var Li=s(he);An=r(Li,"AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities"),Li.forEach(n),Pn=r(an," by Zhongzhi Chen, Guang Liu, Bo-Wen Zhang, Fulong Ye, Qinghong Yang, Ledell Wu."),an.forEach(n),Qt=d(t),Re=i(t,"P",{});var Ji=s(Re);xn=r(Ji,"The abstract from the paper is:"),Ji.forEach(n),zt=d(t),Be=i(t,"P",{});var ji=s(Be);dt=i(ji,"EM",{});var Fi=s(dt);$n=r(Fi,"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."),Fi.forEach(n),ji.forEach(n),Xt=d(t),B=i(t,"H2",{class:!0});var rn=s(B);z=i(rn,"A",{id:!0,class:!0,href:!0});var Ri=s(z);pt=i(Ri,"SPAN",{});var Bi=s(pt);y(_e.$$.fragment,Bi),Bi.forEach(n),Ri.forEach(n),Mn=d(rn),ct=i(rn,"SPAN",{});var Wi=s(ct);kn=r(Wi,"Tips"),Wi.forEach(n),rn.forEach(n),qt=d(t),W=i(t,"P",{});var Wt=s(W);ft=i(Wt,"CODE",{});var Oi=s(ft);Cn=r(Oi,"AltDiffusion"),Oi.forEach(n),Tn=r(Wt," is conceptually the same as "),We=i(Wt,"A",{href:!0});var Gi=s(We);En=r(Gi,"Stable Diffusion"),Gi.forEach(n),Un=r(Wt,"."),Wt.forEach(n),Yt=d(t),y(X.$$.fragment,t),Ht=d(t),O=i(t,"H2",{class:!0});var ln=s(O);q=i(ln,"A",{id:!0,class:!0,href:!0});var Zi=s(q);mt=i(Zi,"SPAN",{});var Qi=s(mt);y(be.$$.fragment,Qi),Qi.forEach(n),Zi.forEach(n),Nn=d(ln),ut=i(ln,"SPAN",{});var zi=s(ut);Vn=r(zi,"AltDiffusionPipeline"),zi.forEach(n),ln.forEach(n),Kt=d(t),g=i(t,"DIV",{class:!0});var b=s(g);y(ve.$$.fragment,b),Sn=d(b),gt=i(b,"P",{});var Xi=s(gt);Ln=r(Xi,"Pipeline for text-to-image generation using Alt Diffusion."),Xi.forEach(n),Jn=d(b),ye=i(b,"P",{});var dn=s(ye);jn=r(dn,"This model inherits from "),Oe=i(dn,"A",{href:!0});var qi=s(Oe);Fn=r(qi,"DiffusionPipeline"),qi.forEach(n),Rn=r(dn,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),dn.forEach(n),Bn=d(b),ht=i(b,"P",{});var Yi=s(ht);Wn=r(Yi,"The pipeline also inherits the following loading methods:"),Yi.forEach(n),On=d(b),U=i(b,"UL",{});var fe=s(U);Ge=i(fe,"LI",{});var Ci=s(Ge);Ze=i(Ci,"A",{href:!0});var Hi=s(Ze);Gn=r(Hi,"load_textual_inversion()"),Hi.forEach(n),Zn=r(Ci," for loading textual inversion embeddings"),Ci.forEach(n),Qn=d(fe),Qe=i(fe,"LI",{});var Ti=s(Qe);ze=i(Ti,"A",{href:!0});var Ki=s(ze);zn=r(Ki,"load_lora_weights()"),Ki.forEach(n),Xn=r(Ti," for loading LoRA weights"),Ti.forEach(n),qn=d(fe),Xe=i(fe,"LI",{});var Ei=s(Xe);qe=i(Ei,"A",{href:!0});var es=s(qe);Yn=r(es,"save_lora_weights()"),es.forEach(n),Hn=r(Ei," for saving LoRA weights"),Ei.forEach(n),Kn=d(fe),Y=i(fe,"LI",{});var Ot=s(Y);Ye=i(Ot,"A",{href:!0});var ts=s(Ye);eo=r(ts,"from_single_file()"),ts.forEach(n),to=r(Ot," for loading "),_t=i(Ot,"CODE",{});var ns=s(_t);no=r(ns,".ckpt"),ns.forEach(n),oo=r(Ot," files"),Ot.forEach(n),fe.forEach(n),io=d(b),J=i(b,"DIV",{class:!0});var at=s(J);y(we.$$.fragment,at),so=d(at),bt=i(at,"P",{});var os=s(bt);ao=r(os,"The call function to the pipeline for generation."),os.forEach(n),ro=d(at),y(H.$$.fragment,at),at.forEach(n),lo=d(b),K=i(b,"DIV",{class:!0});var pn=s(K);y(Ie.$$.fragment,pn),po=d(pn),De=i(pn,"P",{});var cn=s(De);co=r(cn,"Disable sliced VAE decoding. If "),vt=i(cn,"CODE",{});var is=s(vt);fo=r(is,"enable_vae_slicing"),is.forEach(n),mo=r(cn,` was previously enabled, this method will go back to
computing decoding in one step.`),cn.forEach(n),pn.forEach(n),uo=d(b),ee=i(b,"DIV",{class:!0});var fn=s(ee);y(Ae.$$.fragment,fn),go=d(fn),Pe=i(fn,"P",{});var mn=s(Pe);ho=r(mn,"Disable tiled VAE decoding. If "),yt=i(mn,"CODE",{});var ss=s(yt);_o=r(ss,"enable_vae_tiling"),ss.forEach(n),bo=r(mn,` was previously enabled, this method will go back to
computing decoding in one step.`),mn.forEach(n),fn.forEach(n),vo=d(b),te=i(b,"DIV",{class:!0});var un=s(te);y(xe.$$.fragment,un),yo=d(un),N=i(un,"P",{});var me=s(N);wo=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 `),wt=i(me,"CODE",{});var as=s(wt);Io=r(as,"forward"),as.forEach(n),Do=r(me,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),It=i(me,"CODE",{});var rs=s(It);Ao=r(rs,"enable_sequential_cpu_offload"),rs.forEach(n),Po=r(me,`, but performance is much better due to the
iterative execution of the `),Dt=i(me,"CODE",{});var ls=s(Dt);xo=r(ls,"unet"),ls.forEach(n),$o=r(me,"."),me.forEach(n),un.forEach(n),Mo=d(b),ne=i(b,"DIV",{class:!0});var gn=s(ne);y($e.$$.fragment,gn),ko=d(gn),At=i(gn,"P",{});var ds=s(At);Co=r(ds,`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.`),ds.forEach(n),gn.forEach(n),To=d(b),oe=i(b,"DIV",{class:!0});var hn=s(oe);y(Me.$$.fragment,hn),Eo=d(hn),Pt=i(hn,"P",{});var ps=s(Pt);Uo=r(ps,`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.`),ps.forEach(n),hn.forEach(n),No=d(b),ie=i(b,"DIV",{class:!0});var _n=s(ie);y(ke.$$.fragment,_n),Vo=d(_n),xt=i(_n,"P",{});var cs=s(xt);So=r(cs,"Encodes the prompt into text encoder hidden states."),cs.forEach(n),_n.forEach(n),b.forEach(n),en=d(t),G=i(t,"H2",{class:!0});var bn=s(G);se=i(bn,"A",{id:!0,class:!0,href:!0});var fs=s(se);$t=i(fs,"SPAN",{});var ms=s($t);y(Ce.$$.fragment,ms),ms.forEach(n),fs.forEach(n),Lo=d(bn),Mt=i(bn,"SPAN",{});var us=s(Mt);Jo=r(us,"AltDiffusionImg2ImgPipeline"),us.forEach(n),bn.forEach(n),tn=d(t),x=i(t,"DIV",{class:!0});var k=s(x);y(Te.$$.fragment,k),jo=d(k),kt=i(k,"P",{});var gs=s(kt);Fo=r(gs,"Pipeline for text-guided image-to-image generation using Alt Diffusion."),gs.forEach(n),Ro=d(k),Ee=i(k,"P",{});var vn=s(Ee);Bo=r(vn,"This model inherits from "),He=i(vn,"A",{href:!0});var hs=s(He);Wo=r(hs,"DiffusionPipeline"),hs.forEach(n),Oo=r(vn,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),vn.forEach(n),Go=d(k),Ct=i(k,"P",{});var _s=s(Ct);Zo=r(_s,"The pipeline also inherits the following loading methods:"),_s.forEach(n),Qo=d(k),V=i(k,"UL",{});var ue=s(V);Ke=i(ue,"LI",{});var Ui=s(Ke);et=i(Ui,"A",{href:!0});var bs=s(et);zo=r(bs,"load_textual_inversion()"),bs.forEach(n),Xo=r(Ui," for loading textual inversion embeddings"),Ui.forEach(n),qo=d(ue),tt=i(ue,"LI",{});var Ni=s(tt);nt=i(Ni,"A",{href:!0});var vs=s(nt);Yo=r(vs,"load_lora_weights()"),vs.forEach(n),Ho=r(Ni," for loading LoRA weights"),Ni.forEach(n),Ko=d(ue),ot=i(ue,"LI",{});var Vi=s(ot);it=i(Vi,"A",{href:!0});var ys=s(it);ei=r(ys,"save_lora_weights()"),ys.forEach(n),ti=r(Vi," for saving LoRA weights"),Vi.forEach(n),ni=d(ue),ae=i(ue,"LI",{});var Gt=s(ae);st=i(Gt,"A",{href:!0});var ws=s(st);oi=r(ws,"from_single_file()"),ws.forEach(n),ii=r(Gt," for loading "),Tt=i(Gt,"CODE",{});var Is=s(Tt);si=r(Is,".ckpt"),Is.forEach(n),ai=r(Gt," files"),Gt.forEach(n),ue.forEach(n),ri=d(k),j=i(k,"DIV",{class:!0});var rt=s(j);y(Ue.$$.fragment,rt),li=d(rt),Et=i(rt,"P",{});var Ds=s(Et);di=r(Ds,"The call function to the pipeline for generation."),Ds.forEach(n),pi=d(rt),y(re.$$.fragment,rt),rt.forEach(n),ci=d(k),le=i(k,"DIV",{class:!0});var yn=s(le);y(Ne.$$.fragment,yn),fi=d(yn),S=i(yn,"P",{});var ge=s(S);mi=r(ge,`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 `),Ut=i(ge,"CODE",{});var As=s(Ut);ui=r(As,"forward"),As.forEach(n),gi=r(ge,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),Nt=i(ge,"CODE",{});var Ps=s(Nt);hi=r(Ps,"enable_sequential_cpu_offload"),Ps.forEach(n),_i=r(ge,`, but performance is much better due to the
iterative execution of the `),Vt=i(ge,"CODE",{});var xs=s(Vt);bi=r(xs,"unet"),xs.forEach(n),vi=r(ge,"."),ge.forEach(n),yn.forEach(n),yi=d(k),de=i(k,"DIV",{class:!0});var wn=s(de);y(Ve.$$.fragment,wn),wi=d(wn),St=i(wn,"P",{});var $s=s(St);Ii=r($s,"Encodes the prompt into text encoder hidden states."),$s.forEach(n),wn.forEach(n),k.forEach(n),nn=d(t),Z=i(t,"H2",{class:!0});var In=s(Z);pe=i(In,"A",{id:!0,class:!0,href:!0});var Ms=s(pe);Lt=i(Ms,"SPAN",{});var ks=s(Lt);y(Se.$$.fragment,ks),ks.forEach(n),Ms.forEach(n),Di=d(In),Jt=i(In,"SPAN",{});var Cs=s(Jt);Ai=r(Cs,"AltDiffusionPipelineOutput"),Cs.forEach(n),In.forEach(n),on=d(t),L=i(t,"DIV",{class:!0});var lt=s(L);y(Le.$$.fragment,lt),Pi=d(lt),jt=i(lt,"P",{});var Ts=s(jt);xi=r(Ts,"Output class for Alt Diffusion pipelines."),Ts.forEach(n),$i=d(lt),ce=i(lt,"DIV",{class:!0});var Dn=s(ce);y(Je.$$.fragment,Dn),Mi=d(Dn),Ft=i(Dn,"P",{});var Es=s(Ft);ki=r(Es,"Call self as a function."),Es.forEach(n),Dn.forEach(n),lt.forEach(n),this.h()},h(){p(m,"name","hf:doc:metadata"),p(m,"content",JSON.stringify(Zs)),p(h,"id","altdiffusion"),p(h,"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"),p(h,"href","#altdiffusion"),p(_,"class","relative group"),p(he,"href","https://huggingface.co/papers/2211.06679"),p(he,"rel","nofollow"),p(z,"id","tips"),p(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"),p(z,"href","#tips"),p(B,"class","relative group"),p(We,"href","./stable_diffusion/overview"),p(q,"id","diffusers.AltDiffusionPipeline"),p(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"),p(q,"href","#diffusers.AltDiffusionPipeline"),p(O,"class","relative group"),p(Oe,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),p(Ze,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_textual_inversion"),p(ze,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_lora_weights"),p(qe,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.save_lora_weights"),p(Ye,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.from_single_file"),p(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(g,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(se,"id","diffusers.AltDiffusionImg2ImgPipeline"),p(se,"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"),p(se,"href","#diffusers.AltDiffusionImg2ImgPipeline"),p(G,"class","relative group"),p(He,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),p(et,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_textual_inversion"),p(nt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_lora_weights"),p(it,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.save_lora_weights"),p(st,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.from_single_file"),p(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(pe,"id","diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput"),p(pe,"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"),p(pe,"href","#diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput"),p(Z,"class","relative group"),p(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(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,f){e(document.head,m),u(t,M,f),u(t,_,f),e(_,h),e(h,$),w(c,$,null),e(_,P),e(_,F),e(F,R),u(t,T,f),u(t,E,f),e(E,Fe),e(E,he),e(he,An),e(E,Pn),u(t,Qt,f),u(t,Re,f),e(Re,xn),u(t,zt,f),u(t,Be,f),e(Be,dt),e(dt,$n),u(t,Xt,f),u(t,B,f),e(B,z),e(z,pt),w(_e,pt,null),e(B,Mn),e(B,ct),e(ct,kn),u(t,qt,f),u(t,W,f),e(W,ft),e(ft,Cn),e(W,Tn),e(W,We),e(We,En),e(W,Un),u(t,Yt,f),w(X,t,f),u(t,Ht,f),u(t,O,f),e(O,q),e(q,mt),w(be,mt,null),e(O,Nn),e(O,ut),e(ut,Vn),u(t,Kt,f),u(t,g,f),w(ve,g,null),e(g,Sn),e(g,gt),e(gt,Ln),e(g,Jn),e(g,ye),e(ye,jn),e(ye,Oe),e(Oe,Fn),e(ye,Rn),e(g,Bn),e(g,ht),e(ht,Wn),e(g,On),e(g,U),e(U,Ge),e(Ge,Ze),e(Ze,Gn),e(Ge,Zn),e(U,Qn),e(U,Qe),e(Qe,ze),e(ze,zn),e(Qe,Xn),e(U,qn),e(U,Xe),e(Xe,qe),e(qe,Yn),e(Xe,Hn),e(U,Kn),e(U,Y),e(Y,Ye),e(Ye,eo),e(Y,to),e(Y,_t),e(_t,no),e(Y,oo),e(g,io),e(g,J),w(we,J,null),e(J,so),e(J,bt),e(bt,ao),e(J,ro),w(H,J,null),e(g,lo),e(g,K),w(Ie,K,null),e(K,po),e(K,De),e(De,co),e(De,vt),e(vt,fo),e(De,mo),e(g,uo),e(g,ee),w(Ae,ee,null),e(ee,go),e(ee,Pe),e(Pe,ho),e(Pe,yt),e(yt,_o),e(Pe,bo),e(g,vo),e(g,te),w(xe,te,null),e(te,yo),e(te,N),e(N,wo),e(N,wt),e(wt,Io),e(N,Do),e(N,It),e(It,Ao),e(N,Po),e(N,Dt),e(Dt,xo),e(N,$o),e(g,Mo),e(g,ne),w($e,ne,null),e(ne,ko),e(ne,At),e(At,Co),e(g,To),e(g,oe),w(Me,oe,null),e(oe,Eo),e(oe,Pt),e(Pt,Uo),e(g,No),e(g,ie),w(ke,ie,null),e(ie,Vo),e(ie,xt),e(xt,So),u(t,en,f),u(t,G,f),e(G,se),e(se,$t),w(Ce,$t,null),e(G,Lo),e(G,Mt),e(Mt,Jo),u(t,tn,f),u(t,x,f),w(Te,x,null),e(x,jo),e(x,kt),e(kt,Fo),e(x,Ro),e(x,Ee),e(Ee,Bo),e(Ee,He),e(He,Wo),e(Ee,Oo),e(x,Go),e(x,Ct),e(Ct,Zo),e(x,Qo),e(x,V),e(V,Ke),e(Ke,et),e(et,zo),e(Ke,Xo),e(V,qo),e(V,tt),e(tt,nt),e(nt,Yo),e(tt,Ho),e(V,Ko),e(V,ot),e(ot,it),e(it,ei),e(ot,ti),e(V,ni),e(V,ae),e(ae,st),e(st,oi),e(ae,ii),e(ae,Tt),e(Tt,si),e(ae,ai),e(x,ri),e(x,j),w(Ue,j,null),e(j,li),e(j,Et),e(Et,di),e(j,pi),w(re,j,null),e(x,ci),e(x,le),w(Ne,le,null),e(le,fi),e(le,S),e(S,mi),e(S,Ut),e(Ut,ui),e(S,gi),e(S,Nt),e(Nt,hi),e(S,_i),e(S,Vt),e(Vt,bi),e(S,vi),e(x,yi),e(x,de),w(Ve,de,null),e(de,wi),e(de,St),e(St,Ii),u(t,nn,f),u(t,Z,f),e(Z,pe),e(pe,Lt),w(Se,Lt,null),e(Z,Di),e(Z,Jt),e(Jt,Ai),u(t,on,f),u(t,L,f),w(Le,L,null),e(L,Pi),e(L,jt),e(jt,xi),e(L,$i),e(L,ce),w(Je,ce,null),e(ce,Mi),e(ce,Ft),e(Ft,ki),sn=!0},p(t,[f]){const je={};f&2&&(je.$$scope={dirty:f,ctx:t}),X.$set(je);const Rt={};f&2&&(Rt.$$scope={dirty:f,ctx:t}),H.$set(Rt);const Bt={};f&2&&(Bt.$$scope={dirty:f,ctx:t}),re.$set(Bt)},i(t){sn||(I(c.$$.fragment,t),I(_e.$$.fragment,t),I(X.$$.fragment,t),I(be.$$.fragment,t),I(ve.$$.fragment,t),I(we.$$.fragment,t),I(H.$$.fragment,t),I(Ie.$$.fragment,t),I(Ae.$$.fragment,t),I(xe.$$.fragment,t),I($e.$$.fragment,t),I(Me.$$.fragment,t),I(ke.$$.fragment,t),I(Ce.$$.fragment,t),I(Te.$$.fragment,t),I(Ue.$$.fragment,t),I(re.$$.fragment,t),I(Ne.$$.fragment,t),I(Ve.$$.fragment,t),I(Se.$$.fragment,t),I(Le.$$.fragment,t),I(Je.$$.fragment,t),sn=!0)},o(t){D(c.$$.fragment,t),D(_e.$$.fragment,t),D(X.$$.fragment,t),D(be.$$.fragment,t),D(ve.$$.fragment,t),D(we.$$.fragment,t),D(H.$$.fragment,t),D(Ie.$$.fragment,t),D(Ae.$$.fragment,t),D(xe.$$.fragment,t),D($e.$$.fragment,t),D(Me.$$.fragment,t),D(ke.$$.fragment,t),D(Ce.$$.fragment,t),D(Te.$$.fragment,t),D(Ue.$$.fragment,t),D(re.$$.fragment,t),D(Ne.$$.fragment,t),D(Ve.$$.fragment,t),D(Se.$$.fragment,t),D(Le.$$.fragment,t),D(Je.$$.fragment,t),sn=!1},d(t){n(m),t&&n(M),t&&n(_),A(c),t&&n(T),t&&n(E),t&&n(Qt),t&&n(Re),t&&n(zt),t&&n(Be),t&&n(Xt),t&&n(B),A(_e),t&&n(qt),t&&n(W),t&&n(Yt),A(X,t),t&&n(Ht),t&&n(O),A(be),t&&n(Kt),t&&n(g),A(ve),A(we),A(H),A(Ie),A(Ae),A(xe),A($e),A(Me),A(ke),t&&n(en),t&&n(G),A(Ce),t&&n(tn),t&&n(x),A(Te),A(Ue),A(re),A(Ne),A(Ve),t&&n(nn),t&&n(Z),A(Se),t&&n(on),t&&n(L),A(Le),A(Je)}}}const Zs={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 Qs(Q){return Fs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ea extends Ss{constructor(m){super();Ls(this,m,Qs,Gs,Js,{})}}export{ea as default,Zs as metadata};
