import{S as Yi,i as qi,s as Hi,e as o,k as l,w as b,t as a,M as Ki,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,y as w,q as I,o as A,B as D,v as es,L as zi}from"../../../chunks/vendor-hf-doc-builder.js";import{T as ts}from"../../../chunks/Tip-hf-doc-builder.js";import{D as T}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as Xi}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as Et}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Qi}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ns(O){let m,$,_,u,P,c,x,J;return{c(){m=o("p"),$=a("Make sure to check out the Schedulers "),_=o("a"),u=a("guide"),P=a(" to learn how to explore the tradeoff between scheduler speed and quality, and see the "),c=o("a"),x=a("reuse components across pipelines"),J=a(" section to learn how to efficiently load the same components into multiple pipelines."),this.h()},l(j){m=i(j,"P",{});var C=s(m);$=r(C,"Make sure to check out the Schedulers "),_=i(C,"A",{href:!0});var E=s(_);u=r(E,"guide"),E.forEach(n),P=r(C," to learn how to explore the tradeoff between scheduler speed and quality, and see the "),c=i(C,"A",{href:!0});var Ee=s(c);x=r(Ee,"reuse components across pipelines"),Ee.forEach(n),J=r(C," section to learn how to efficiently load the same components into multiple pipelines."),C.forEach(n),this.h()},h(){p(_,"href","/using-diffusers/schedulers"),p(c,"href","/using-diffusers/loading#reuse-components-across-pipelines")},m(j,C){g(j,m,C),e(m,$),e(m,_),e(_,u),e(m,P),e(m,c),e(c,x),e(m,J)},d(j){j&&n(m)}}}function os(O){let m,$,_,u,P;return u=new Xi({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"),$=a("Examples:"),_=l(),b(u.$$.fragment)},l(c){m=i(c,"P",{});var x=s(m);$=r(x,"Examples:"),x.forEach(n),_=d(c),y(u.$$.fragment,c)},m(c,x){g(c,m,x),e(m,$),g(c,_,x),w(u,c,x),P=!0},p:zi,i(c){P||(I(u.$$.fragment,c),P=!0)},o(c){A(u.$$.fragment,c),P=!1},d(c){c&&n(m),c&&n(_),D(u,c)}}}function is(O){let m,$,_,u,P;return u=new Xi({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"),$=a("Examples:"),_=l(),b(u.$$.fragment)},l(c){m=i(c,"P",{});var x=s(m);$=r(x,"Examples:"),x.forEach(n),_=d(c),y(u.$$.fragment,c)},m(c,x){g(c,m,x),e(m,$),g(c,_,x),w(u,c,x),P=!0},p:zi,i(c){P||(I(u.$$.fragment,c),P=!0)},o(c){A(u.$$.fragment,c),P=!1},d(c){c&&n(m),c&&n(_),D(u,c)}}}function ss(O){let m,$,_,u,P,c,x,J,j,C,E,Ee,pe,ln,dn,Nt,Ne,pn,Vt,Ve,tt,cn,Ut,F,G,nt,ce,fn,ot,mn,St,R,it,gn,un,Ue,hn,_n,Lt,Q,Jt,B,z,st,fe,vn,at,bn,jt,h,me,yn,rt,wn,In,ge,An,Se,Dn,xn,Pn,lt,kn,$n,N,Le,Je,Mn,Cn,Tn,je,Fe,En,Nn,Vn,Re,Be,Un,Sn,Ln,X,We,Jn,jn,dt,Fn,Rn,Bn,S,ue,Wn,pt,Zn,On,Y,Gn,q,he,Qn,_e,zn,ct,Xn,Yn,qn,H,ve,Hn,be,Kn,ft,eo,to,no,K,ye,oo,mt,io,so,ee,we,ao,gt,ro,lo,te,Ie,po,ut,co,Ft,W,ne,ht,Ae,fo,_t,mo,Rt,k,De,go,vt,uo,ho,xe,_o,Ze,vo,bo,yo,bt,wo,Io,V,Oe,Ge,Ao,Do,xo,Qe,ze,Po,ko,$o,Xe,Ye,Mo,Co,To,oe,qe,Eo,No,yt,Vo,Uo,So,L,Pe,Lo,wt,Jo,jo,ie,Fo,se,ke,Ro,It,Bo,Bt,Z,ae,At,$e,Wo,Dt,Zo,Wt,U,Me,Oo,xt,Go,Qo,re,Ce,zo,Pt,Xo,Zt;return c=new Et({}),ce=new Et({}),Q=new ts({props:{$$slots:{default:[ns]},$$scope:{ctx:O}}}),fe=new Et({}),me=new T({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/v0.21.0/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> (<code>XLMRobertaTokenizer</code>) &#x2014;
A <code>XLMRobertaTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.AltDiffusionPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.21.0/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/v0.21.0/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/v0.21.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.21.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.21.0/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> (<code>CLIPImageProcessor</code>) &#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/v0.21.0/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L69"}}),ue=new T({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/v0.21.0/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/v0.21.0/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L525",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>
`}}),Y=new Qi({props:{anchor:"diffusers.AltDiffusionPipeline.__call__.example",$$slots:{default:[os]},$$scope:{ctx:O}}}),he=new T({props:{name:"disable_vae_slicing",anchor:"diffusers.AltDiffusionPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L202"}}),ve=new T({props:{name:"disable_vae_tiling",anchor:"diffusers.AltDiffusionPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L217"}}),ye=new T({props:{name:"enable_vae_slicing",anchor:"diffusers.AltDiffusionPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L195"}}),we=new T({props:{name:"enable_vae_tiling",anchor:"diffusers.AltDiffusionPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L209"}}),Ie=new T({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/v0.21.0/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L257"}}),Ae=new Et({}),De=new T({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/v0.21.0/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> (<code>XLMRobertaTokenizer</code>) &#x2014;
A <code>XLMRobertaTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.21.0/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/v0.21.0/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/v0.21.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.21.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.21.0/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> (<code>CLIPImageProcessor</code>) &#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/v0.21.0/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py#L94"}}),Pe=new T({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/v0.21.0/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/v0.21.0/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py#L565",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <code>~pipelines.stable_diffusion.AltDiffusionPipelineOutput</code> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images and the
second element is a list of <code>bool</code>s indicating whether the corresponding generated image contains
\u201Cnot-safe-for-work\u201D (nsfw) content.</p>
`,returnType:`
<p><code>~pipelines.stable_diffusion.AltDiffusionPipelineOutput</code> or <code>tuple</code></p>
`}}),ie=new Qi({props:{anchor:"diffusers.AltDiffusionImg2ImgPipeline.__call__.example",$$slots:{default:[is]},$$scope:{ctx:O}}}),ke=new T({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/v0.21.0/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py#L255"}}),$e=new Et({}),Me=new T({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/v0.21.0/src/diffusers/pipelines/alt_diffusion/pipeline_output.py#L14"}}),Ce=new T({props:{name:"__call__",anchor:"diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),{c(){m=o("meta"),$=l(),_=o("h1"),u=o("a"),P=o("span"),b(c.$$.fragment),x=l(),J=o("span"),j=a("AltDiffusion"),C=l(),E=o("p"),Ee=a("AltDiffusion was proposed in "),pe=o("a"),ln=a("AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities"),dn=a(" by Zhongzhi Chen, Guang Liu, Bo-Wen Zhang, Fulong Ye, Qinghong Yang, Ledell Wu."),Nt=l(),Ne=o("p"),pn=a("The abstract from the paper is:"),Vt=l(),Ve=o("p"),tt=o("em"),cn=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."),Ut=l(),F=o("h2"),G=o("a"),nt=o("span"),b(ce.$$.fragment),fn=l(),ot=o("span"),mn=a("Tips"),St=l(),R=o("p"),it=o("code"),gn=a("AltDiffusion"),un=a(" is conceptually the same as "),Ue=o("a"),hn=a("Stable Diffusion"),_n=a("."),Lt=l(),b(Q.$$.fragment),Jt=l(),B=o("h2"),z=o("a"),st=o("span"),b(fe.$$.fragment),vn=l(),at=o("span"),bn=a("AltDiffusionPipeline"),jt=l(),h=o("div"),b(me.$$.fragment),yn=l(),rt=o("p"),wn=a("Pipeline for text-to-image generation using Alt Diffusion."),In=l(),ge=o("p"),An=a("This model inherits from "),Se=o("a"),Dn=a("DiffusionPipeline"),xn=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Pn=l(),lt=o("p"),kn=a("The pipeline also inherits the following loading methods:"),$n=l(),N=o("ul"),Le=o("li"),Je=o("a"),Mn=a("load_textual_inversion()"),Cn=a(" for loading textual inversion embeddings"),Tn=l(),je=o("li"),Fe=o("a"),En=a("load_lora_weights()"),Nn=a(" for loading LoRA weights"),Vn=l(),Re=o("li"),Be=o("a"),Un=a("save_lora_weights()"),Sn=a(" for saving LoRA weights"),Ln=l(),X=o("li"),We=o("a"),Jn=a("from_single_file()"),jn=a(" for loading "),dt=o("code"),Fn=a(".ckpt"),Rn=a(" files"),Bn=l(),S=o("div"),b(ue.$$.fragment),Wn=l(),pt=o("p"),Zn=a("The call function to the pipeline for generation."),On=l(),b(Y.$$.fragment),Gn=l(),q=o("div"),b(he.$$.fragment),Qn=l(),_e=o("p"),zn=a("Disable sliced VAE decoding. If "),ct=o("code"),Xn=a("enable_vae_slicing"),Yn=a(` was previously enabled, this method will go back to
computing decoding in one step.`),qn=l(),H=o("div"),b(ve.$$.fragment),Hn=l(),be=o("p"),Kn=a("Disable tiled VAE decoding. If "),ft=o("code"),eo=a("enable_vae_tiling"),to=a(` was previously enabled, this method will go back to
computing decoding in one step.`),no=l(),K=o("div"),b(ye.$$.fragment),oo=l(),mt=o("p"),io=a(`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`),so=l(),ee=o("div"),b(we.$$.fragment),ao=l(),gt=o("p"),ro=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.`),lo=l(),te=o("div"),b(Ie.$$.fragment),po=l(),ut=o("p"),co=a("Encodes the prompt into text encoder hidden states."),Ft=l(),W=o("h2"),ne=o("a"),ht=o("span"),b(Ae.$$.fragment),fo=l(),_t=o("span"),mo=a("AltDiffusionImg2ImgPipeline"),Rt=l(),k=o("div"),b(De.$$.fragment),go=l(),vt=o("p"),uo=a("Pipeline for text-guided image-to-image generation using Alt Diffusion."),ho=l(),xe=o("p"),_o=a("This model inherits from "),Ze=o("a"),vo=a("DiffusionPipeline"),bo=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),yo=l(),bt=o("p"),wo=a("The pipeline also inherits the following loading methods:"),Io=l(),V=o("ul"),Oe=o("li"),Ge=o("a"),Ao=a("load_textual_inversion()"),Do=a(" for loading textual inversion embeddings"),xo=l(),Qe=o("li"),ze=o("a"),Po=a("load_lora_weights()"),ko=a(" for loading LoRA weights"),$o=l(),Xe=o("li"),Ye=o("a"),Mo=a("save_lora_weights()"),Co=a(" for saving LoRA weights"),To=l(),oe=o("li"),qe=o("a"),Eo=a("from_single_file()"),No=a(" for loading "),yt=o("code"),Vo=a(".ckpt"),Uo=a(" files"),So=l(),L=o("div"),b(Pe.$$.fragment),Lo=l(),wt=o("p"),Jo=a("The call function to the pipeline for generation."),jo=l(),b(ie.$$.fragment),Fo=l(),se=o("div"),b(ke.$$.fragment),Ro=l(),It=o("p"),Bo=a("Encodes the prompt into text encoder hidden states."),Bt=l(),Z=o("h2"),ae=o("a"),At=o("span"),b($e.$$.fragment),Wo=l(),Dt=o("span"),Zo=a("AltDiffusionPipelineOutput"),Wt=l(),U=o("div"),b(Me.$$.fragment),Oo=l(),xt=o("p"),Go=a("Output class for Alt Diffusion pipelines."),Qo=l(),re=o("div"),b(Ce.$$.fragment),zo=l(),Pt=o("p"),Xo=a("Call self as a function."),this.h()},l(t){const f=Ki('[data-svelte="svelte-1phssyn"]',document.head);m=i(f,"META",{name:!0,content:!0}),f.forEach(n),$=d(t),_=i(t,"H1",{class:!0});var Te=s(_);u=i(Te,"A",{id:!0,class:!0,href:!0});var kt=s(u);P=i(kt,"SPAN",{});var $t=s(P);y(c.$$.fragment,$t),$t.forEach(n),kt.forEach(n),x=d(Te),J=i(Te,"SPAN",{});var ni=s(J);j=r(ni,"AltDiffusion"),ni.forEach(n),Te.forEach(n),C=d(t),E=i(t,"P",{});var Ot=s(E);Ee=r(Ot,"AltDiffusion was proposed in "),pe=i(Ot,"A",{href:!0,rel:!0});var oi=s(pe);ln=r(oi,"AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities"),oi.forEach(n),dn=r(Ot," by Zhongzhi Chen, Guang Liu, Bo-Wen Zhang, Fulong Ye, Qinghong Yang, Ledell Wu."),Ot.forEach(n),Nt=d(t),Ne=i(t,"P",{});var ii=s(Ne);pn=r(ii,"The abstract from the paper is:"),ii.forEach(n),Vt=d(t),Ve=i(t,"P",{});var si=s(Ve);tt=i(si,"EM",{});var ai=s(tt);cn=r(ai,"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."),ai.forEach(n),si.forEach(n),Ut=d(t),F=i(t,"H2",{class:!0});var Gt=s(F);G=i(Gt,"A",{id:!0,class:!0,href:!0});var ri=s(G);nt=i(ri,"SPAN",{});var li=s(nt);y(ce.$$.fragment,li),li.forEach(n),ri.forEach(n),fn=d(Gt),ot=i(Gt,"SPAN",{});var di=s(ot);mn=r(di,"Tips"),di.forEach(n),Gt.forEach(n),St=d(t),R=i(t,"P",{});var Mt=s(R);it=i(Mt,"CODE",{});var pi=s(it);gn=r(pi,"AltDiffusion"),pi.forEach(n),un=r(Mt," is conceptually the same as "),Ue=i(Mt,"A",{href:!0});var ci=s(Ue);hn=r(ci,"Stable Diffusion"),ci.forEach(n),_n=r(Mt,"."),Mt.forEach(n),Lt=d(t),y(Q.$$.fragment,t),Jt=d(t),B=i(t,"H2",{class:!0});var Qt=s(B);z=i(Qt,"A",{id:!0,class:!0,href:!0});var fi=s(z);st=i(fi,"SPAN",{});var mi=s(st);y(fe.$$.fragment,mi),mi.forEach(n),fi.forEach(n),vn=d(Qt),at=i(Qt,"SPAN",{});var gi=s(at);bn=r(gi,"AltDiffusionPipeline"),gi.forEach(n),Qt.forEach(n),jt=d(t),h=i(t,"DIV",{class:!0});var v=s(h);y(me.$$.fragment,v),yn=d(v),rt=i(v,"P",{});var ui=s(rt);wn=r(ui,"Pipeline for text-to-image generation using Alt Diffusion."),ui.forEach(n),In=d(v),ge=i(v,"P",{});var zt=s(ge);An=r(zt,"This model inherits from "),Se=i(zt,"A",{href:!0});var hi=s(Se);Dn=r(hi,"DiffusionPipeline"),hi.forEach(n),xn=r(zt,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),zt.forEach(n),Pn=d(v),lt=i(v,"P",{});var _i=s(lt);kn=r(_i,"The pipeline also inherits the following loading methods:"),_i.forEach(n),$n=d(v),N=i(v,"UL",{});var le=s(N);Le=i(le,"LI",{});var Yo=s(Le);Je=i(Yo,"A",{href:!0});var vi=s(Je);Mn=r(vi,"load_textual_inversion()"),vi.forEach(n),Cn=r(Yo," for loading textual inversion embeddings"),Yo.forEach(n),Tn=d(le),je=i(le,"LI",{});var qo=s(je);Fe=i(qo,"A",{href:!0});var bi=s(Fe);En=r(bi,"load_lora_weights()"),bi.forEach(n),Nn=r(qo," for loading LoRA weights"),qo.forEach(n),Vn=d(le),Re=i(le,"LI",{});var Ho=s(Re);Be=i(Ho,"A",{href:!0});var yi=s(Be);Un=r(yi,"save_lora_weights()"),yi.forEach(n),Sn=r(Ho," for saving LoRA weights"),Ho.forEach(n),Ln=d(le),X=i(le,"LI",{});var Ct=s(X);We=i(Ct,"A",{href:!0});var wi=s(We);Jn=r(wi,"from_single_file()"),wi.forEach(n),jn=r(Ct," for loading "),dt=i(Ct,"CODE",{});var Ii=s(dt);Fn=r(Ii,".ckpt"),Ii.forEach(n),Rn=r(Ct," files"),Ct.forEach(n),le.forEach(n),Bn=d(v),S=i(v,"DIV",{class:!0});var He=s(S);y(ue.$$.fragment,He),Wn=d(He),pt=i(He,"P",{});var Ai=s(pt);Zn=r(Ai,"The call function to the pipeline for generation."),Ai.forEach(n),On=d(He),y(Y.$$.fragment,He),He.forEach(n),Gn=d(v),q=i(v,"DIV",{class:!0});var Xt=s(q);y(he.$$.fragment,Xt),Qn=d(Xt),_e=i(Xt,"P",{});var Yt=s(_e);zn=r(Yt,"Disable sliced VAE decoding. If "),ct=i(Yt,"CODE",{});var Di=s(ct);Xn=r(Di,"enable_vae_slicing"),Di.forEach(n),Yn=r(Yt,` was previously enabled, this method will go back to
computing decoding in one step.`),Yt.forEach(n),Xt.forEach(n),qn=d(v),H=i(v,"DIV",{class:!0});var qt=s(H);y(ve.$$.fragment,qt),Hn=d(qt),be=i(qt,"P",{});var Ht=s(be);Kn=r(Ht,"Disable tiled VAE decoding. If "),ft=i(Ht,"CODE",{});var xi=s(ft);eo=r(xi,"enable_vae_tiling"),xi.forEach(n),to=r(Ht,` was previously enabled, this method will go back to
computing decoding in one step.`),Ht.forEach(n),qt.forEach(n),no=d(v),K=i(v,"DIV",{class:!0});var Kt=s(K);y(ye.$$.fragment,Kt),oo=d(Kt),mt=i(Kt,"P",{});var Pi=s(mt);io=r(Pi,`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.`),Pi.forEach(n),Kt.forEach(n),so=d(v),ee=i(v,"DIV",{class:!0});var en=s(ee);y(we.$$.fragment,en),ao=d(en),gt=i(en,"P",{});var ki=s(gt);ro=r(ki,`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.`),ki.forEach(n),en.forEach(n),lo=d(v),te=i(v,"DIV",{class:!0});var tn=s(te);y(Ie.$$.fragment,tn),po=d(tn),ut=i(tn,"P",{});var $i=s(ut);co=r($i,"Encodes the prompt into text encoder hidden states."),$i.forEach(n),tn.forEach(n),v.forEach(n),Ft=d(t),W=i(t,"H2",{class:!0});var nn=s(W);ne=i(nn,"A",{id:!0,class:!0,href:!0});var Mi=s(ne);ht=i(Mi,"SPAN",{});var Ci=s(ht);y(Ae.$$.fragment,Ci),Ci.forEach(n),Mi.forEach(n),fo=d(nn),_t=i(nn,"SPAN",{});var Ti=s(_t);mo=r(Ti,"AltDiffusionImg2ImgPipeline"),Ti.forEach(n),nn.forEach(n),Rt=d(t),k=i(t,"DIV",{class:!0});var M=s(k);y(De.$$.fragment,M),go=d(M),vt=i(M,"P",{});var Ei=s(vt);uo=r(Ei,"Pipeline for text-guided image-to-image generation using Alt Diffusion."),Ei.forEach(n),ho=d(M),xe=i(M,"P",{});var on=s(xe);_o=r(on,"This model inherits from "),Ze=i(on,"A",{href:!0});var Ni=s(Ze);vo=r(Ni,"DiffusionPipeline"),Ni.forEach(n),bo=r(on,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),on.forEach(n),yo=d(M),bt=i(M,"P",{});var Vi=s(bt);wo=r(Vi,"The pipeline also inherits the following loading methods:"),Vi.forEach(n),Io=d(M),V=i(M,"UL",{});var de=s(V);Oe=i(de,"LI",{});var Ko=s(Oe);Ge=i(Ko,"A",{href:!0});var Ui=s(Ge);Ao=r(Ui,"load_textual_inversion()"),Ui.forEach(n),Do=r(Ko," for loading textual inversion embeddings"),Ko.forEach(n),xo=d(de),Qe=i(de,"LI",{});var ei=s(Qe);ze=i(ei,"A",{href:!0});var Si=s(ze);Po=r(Si,"load_lora_weights()"),Si.forEach(n),ko=r(ei," for loading LoRA weights"),ei.forEach(n),$o=d(de),Xe=i(de,"LI",{});var ti=s(Xe);Ye=i(ti,"A",{href:!0});var Li=s(Ye);Mo=r(Li,"save_lora_weights()"),Li.forEach(n),Co=r(ti," for saving LoRA weights"),ti.forEach(n),To=d(de),oe=i(de,"LI",{});var Tt=s(oe);qe=i(Tt,"A",{href:!0});var Ji=s(qe);Eo=r(Ji,"from_single_file()"),Ji.forEach(n),No=r(Tt," for loading "),yt=i(Tt,"CODE",{});var ji=s(yt);Vo=r(ji,".ckpt"),ji.forEach(n),Uo=r(Tt," files"),Tt.forEach(n),de.forEach(n),So=d(M),L=i(M,"DIV",{class:!0});var Ke=s(L);y(Pe.$$.fragment,Ke),Lo=d(Ke),wt=i(Ke,"P",{});var Fi=s(wt);Jo=r(Fi,"The call function to the pipeline for generation."),Fi.forEach(n),jo=d(Ke),y(ie.$$.fragment,Ke),Ke.forEach(n),Fo=d(M),se=i(M,"DIV",{class:!0});var sn=s(se);y(ke.$$.fragment,sn),Ro=d(sn),It=i(sn,"P",{});var Ri=s(It);Bo=r(Ri,"Encodes the prompt into text encoder hidden states."),Ri.forEach(n),sn.forEach(n),M.forEach(n),Bt=d(t),Z=i(t,"H2",{class:!0});var an=s(Z);ae=i(an,"A",{id:!0,class:!0,href:!0});var Bi=s(ae);At=i(Bi,"SPAN",{});var Wi=s(At);y($e.$$.fragment,Wi),Wi.forEach(n),Bi.forEach(n),Wo=d(an),Dt=i(an,"SPAN",{});var Zi=s(Dt);Zo=r(Zi,"AltDiffusionPipelineOutput"),Zi.forEach(n),an.forEach(n),Wt=d(t),U=i(t,"DIV",{class:!0});var et=s(U);y(Me.$$.fragment,et),Oo=d(et),xt=i(et,"P",{});var Oi=s(xt);Go=r(Oi,"Output class for Alt Diffusion pipelines."),Oi.forEach(n),Qo=d(et),re=i(et,"DIV",{class:!0});var rn=s(re);y(Ce.$$.fragment,rn),zo=d(rn),Pt=i(rn,"P",{});var Gi=s(Pt);Xo=r(Gi,"Call self as a function."),Gi.forEach(n),rn.forEach(n),et.forEach(n),this.h()},h(){p(m,"name","hf:doc:metadata"),p(m,"content",JSON.stringify(as)),p(u,"id","altdiffusion"),p(u,"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(u,"href","#altdiffusion"),p(_,"class","relative group"),p(pe,"href","https://huggingface.co/papers/2211.06679"),p(pe,"rel","nofollow"),p(G,"id","tips"),p(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"),p(G,"href","#tips"),p(F,"class","relative group"),p(Ue,"href","./stable_diffusion/overview"),p(z,"id","diffusers.AltDiffusionPipeline"),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","#diffusers.AltDiffusionPipeline"),p(B,"class","relative group"),p(Se,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),p(Je,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_textual_inversion"),p(Fe,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_lora_weights"),p(Be,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.save_lora_weights"),p(We,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.from_single_file"),p(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(H,"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(h,"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,"id","diffusers.AltDiffusionImg2ImgPipeline"),p(ne,"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(ne,"href","#diffusers.AltDiffusionImg2ImgPipeline"),p(W,"class","relative group"),p(Ze,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),p(Ge,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_textual_inversion"),p(ze,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_lora_weights"),p(Ye,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.save_lora_weights"),p(qe,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.from_single_file"),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"),p(se,"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(ae,"id","diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput"),p(ae,"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(ae,"href","#diffusers.pipelines.alt_diffusion.AltDiffusionPipelineOutput"),p(Z,"class","relative group"),p(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,f){e(document.head,m),g(t,$,f),g(t,_,f),e(_,u),e(u,P),w(c,P,null),e(_,x),e(_,J),e(J,j),g(t,C,f),g(t,E,f),e(E,Ee),e(E,pe),e(pe,ln),e(E,dn),g(t,Nt,f),g(t,Ne,f),e(Ne,pn),g(t,Vt,f),g(t,Ve,f),e(Ve,tt),e(tt,cn),g(t,Ut,f),g(t,F,f),e(F,G),e(G,nt),w(ce,nt,null),e(F,fn),e(F,ot),e(ot,mn),g(t,St,f),g(t,R,f),e(R,it),e(it,gn),e(R,un),e(R,Ue),e(Ue,hn),e(R,_n),g(t,Lt,f),w(Q,t,f),g(t,Jt,f),g(t,B,f),e(B,z),e(z,st),w(fe,st,null),e(B,vn),e(B,at),e(at,bn),g(t,jt,f),g(t,h,f),w(me,h,null),e(h,yn),e(h,rt),e(rt,wn),e(h,In),e(h,ge),e(ge,An),e(ge,Se),e(Se,Dn),e(ge,xn),e(h,Pn),e(h,lt),e(lt,kn),e(h,$n),e(h,N),e(N,Le),e(Le,Je),e(Je,Mn),e(Le,Cn),e(N,Tn),e(N,je),e(je,Fe),e(Fe,En),e(je,Nn),e(N,Vn),e(N,Re),e(Re,Be),e(Be,Un),e(Re,Sn),e(N,Ln),e(N,X),e(X,We),e(We,Jn),e(X,jn),e(X,dt),e(dt,Fn),e(X,Rn),e(h,Bn),e(h,S),w(ue,S,null),e(S,Wn),e(S,pt),e(pt,Zn),e(S,On),w(Y,S,null),e(h,Gn),e(h,q),w(he,q,null),e(q,Qn),e(q,_e),e(_e,zn),e(_e,ct),e(ct,Xn),e(_e,Yn),e(h,qn),e(h,H),w(ve,H,null),e(H,Hn),e(H,be),e(be,Kn),e(be,ft),e(ft,eo),e(be,to),e(h,no),e(h,K),w(ye,K,null),e(K,oo),e(K,mt),e(mt,io),e(h,so),e(h,ee),w(we,ee,null),e(ee,ao),e(ee,gt),e(gt,ro),e(h,lo),e(h,te),w(Ie,te,null),e(te,po),e(te,ut),e(ut,co),g(t,Ft,f),g(t,W,f),e(W,ne),e(ne,ht),w(Ae,ht,null),e(W,fo),e(W,_t),e(_t,mo),g(t,Rt,f),g(t,k,f),w(De,k,null),e(k,go),e(k,vt),e(vt,uo),e(k,ho),e(k,xe),e(xe,_o),e(xe,Ze),e(Ze,vo),e(xe,bo),e(k,yo),e(k,bt),e(bt,wo),e(k,Io),e(k,V),e(V,Oe),e(Oe,Ge),e(Ge,Ao),e(Oe,Do),e(V,xo),e(V,Qe),e(Qe,ze),e(ze,Po),e(Qe,ko),e(V,$o),e(V,Xe),e(Xe,Ye),e(Ye,Mo),e(Xe,Co),e(V,To),e(V,oe),e(oe,qe),e(qe,Eo),e(oe,No),e(oe,yt),e(yt,Vo),e(oe,Uo),e(k,So),e(k,L),w(Pe,L,null),e(L,Lo),e(L,wt),e(wt,Jo),e(L,jo),w(ie,L,null),e(k,Fo),e(k,se),w(ke,se,null),e(se,Ro),e(se,It),e(It,Bo),g(t,Bt,f),g(t,Z,f),e(Z,ae),e(ae,At),w($e,At,null),e(Z,Wo),e(Z,Dt),e(Dt,Zo),g(t,Wt,f),g(t,U,f),w(Me,U,null),e(U,Oo),e(U,xt),e(xt,Go),e(U,Qo),e(U,re),w(Ce,re,null),e(re,zo),e(re,Pt),e(Pt,Xo),Zt=!0},p(t,[f]){const Te={};f&2&&(Te.$$scope={dirty:f,ctx:t}),Q.$set(Te);const kt={};f&2&&(kt.$$scope={dirty:f,ctx:t}),Y.$set(kt);const $t={};f&2&&($t.$$scope={dirty:f,ctx:t}),ie.$set($t)},i(t){Zt||(I(c.$$.fragment,t),I(ce.$$.fragment,t),I(Q.$$.fragment,t),I(fe.$$.fragment,t),I(me.$$.fragment,t),I(ue.$$.fragment,t),I(Y.$$.fragment,t),I(he.$$.fragment,t),I(ve.$$.fragment,t),I(ye.$$.fragment,t),I(we.$$.fragment,t),I(Ie.$$.fragment,t),I(Ae.$$.fragment,t),I(De.$$.fragment,t),I(Pe.$$.fragment,t),I(ie.$$.fragment,t),I(ke.$$.fragment,t),I($e.$$.fragment,t),I(Me.$$.fragment,t),I(Ce.$$.fragment,t),Zt=!0)},o(t){A(c.$$.fragment,t),A(ce.$$.fragment,t),A(Q.$$.fragment,t),A(fe.$$.fragment,t),A(me.$$.fragment,t),A(ue.$$.fragment,t),A(Y.$$.fragment,t),A(he.$$.fragment,t),A(ve.$$.fragment,t),A(ye.$$.fragment,t),A(we.$$.fragment,t),A(Ie.$$.fragment,t),A(Ae.$$.fragment,t),A(De.$$.fragment,t),A(Pe.$$.fragment,t),A(ie.$$.fragment,t),A(ke.$$.fragment,t),A($e.$$.fragment,t),A(Me.$$.fragment,t),A(Ce.$$.fragment,t),Zt=!1},d(t){n(m),t&&n($),t&&n(_),D(c),t&&n(C),t&&n(E),t&&n(Nt),t&&n(Ne),t&&n(Vt),t&&n(Ve),t&&n(Ut),t&&n(F),D(ce),t&&n(St),t&&n(R),t&&n(Lt),D(Q,t),t&&n(Jt),t&&n(B),D(fe),t&&n(jt),t&&n(h),D(me),D(ue),D(Y),D(he),D(ve),D(ye),D(we),D(Ie),t&&n(Ft),t&&n(W),D(Ae),t&&n(Rt),t&&n(k),D(De),D(Pe),D(ie),D(ke),t&&n(Bt),t&&n(Z),D($e),t&&n(Wt),t&&n(U),D(Me),D(Ce)}}}const as={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 rs(O){return es(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gs extends Yi{constructor(m){super();qi(this,m,rs,ss,Hi,{})}}export{gs as default,as as metadata};
