Buckets:

hf-doc-build/doc / diffusers /main /en /_app /pages /api /pipelines /alt_diffusion.mdx-hf-doc-builder.js
rtrm's picture
download
raw
66.1 kB
import{S as Yi,i as qi,s as Hi,e as o,k as l,w as v,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 as u,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(Z){let m,$,_,g,x,c,P,J;return{c(){m=o("p"),$=a("Make sure to check out the Schedulers "),_=o("a"),g=a("guide"),x=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"),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(_);g=r(E,"guide"),E.forEach(n),x=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);P=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){u(j,m,C),e(m,$),e(m,_),e(_,g),e(m,x),e(m,c),e(c,P),e(m,J)},d(j){j&&n(m)}}}function os(Z){let m,$,_,g,x;return g=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(),v(g.$$.fragment)},l(c){m=i(c,"P",{});var P=s(m);$=r(P,"Examples:"),P.forEach(n),_=d(c),y(g.$$.fragment,c)},m(c,P){u(c,m,P),e(m,$),u(c,_,P),w(g,c,P),x=!0},p:zi,i(c){x||(I(g.$$.fragment,c),x=!0)},o(c){A(g.$$.fragment,c),x=!1},d(c){c&&n(m),c&&n(_),D(g,c)}}}function is(Z){let m,$,_,g,x;return g=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(),v(g.$$.fragment)},l(c){m=i(c,"P",{});var P=s(m);$=r(P,"Examples:"),P.forEach(n),_=d(c),y(g.$$.fragment,c)},m(c,P){u(c,m,P),e(m,$),u(c,_,P),w(g,c,P),x=!0},p:zi,i(c){x||(I(g.$$.fragment,c),x=!0)},o(c){A(g.$$.fragment,c),x=!1},d(c){c&&n(m),c&&n(_),D(g,c)}}}function ss(Z){let m,$,_,g,x,c,P,J,j,C,E,Ee,pe,ln,dn,Nt,Ne,pn,Vt,Ve,tt,cn,Ut,F,G,nt,ce,fn,ot,mn,Lt,R,it,un,gn,Ue,hn,_n,St,Q,Jt,B,z,st,fe,bn,at,vn,jt,h,me,yn,rt,wn,In,ue,An,Le,Dn,Pn,xn,lt,kn,$n,N,Se,Je,Mn,Cn,Tn,je,Fe,En,Nn,Vn,Re,Be,Un,Ln,Sn,X,We,Jn,jn,dt,Fn,Rn,Bn,L,ge,Wn,pt,On,Zn,Y,Gn,q,he,Qn,_e,zn,ct,Xn,Yn,qn,H,be,Hn,ve,Kn,ft,eo,to,no,K,ye,oo,mt,io,so,ee,we,ao,ut,ro,lo,te,Ie,po,gt,co,Ft,W,ne,ht,Ae,fo,_t,mo,Rt,k,De,uo,bt,go,ho,Pe,_o,Oe,bo,vo,yo,vt,wo,Io,V,Ze,Ge,Ao,Do,Po,Qe,ze,xo,ko,$o,Xe,Ye,Mo,Co,To,oe,qe,Eo,No,yt,Vo,Uo,Lo,S,xe,So,wt,Jo,jo,ie,Fo,se,ke,Ro,It,Bo,Bt,O,ae,At,$e,Wo,Dt,Oo,Wt,U,Me,Zo,Pt,Go,Qo,re,Ce,zo,xt,Xo,Ot;return c=new Et({}),ce=new Et({}),Q=new ts({props:{$$slots:{default:[ns]},$$scope:{ctx:Z}}}),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/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#L69"}}),ge=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"},{name:"clip_skip",val:": typing.Optional[int] = None"}],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.0) &#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"},{anchor:"diffusers.AltDiffusionPipeline.__call__.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L542",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:Z}}}),he=new T({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#L202"}}),be=new T({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#L217"}}),ye=new T({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#L195"}}),we=new T({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#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"},{name:"clip_skip",val:": typing.Optional[int] = 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"},{anchor:"diffusers.AltDiffusionPipeline.encode_prompt.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py#L259"}}),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/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#L94"}}),xe=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"},{name:"clip_skip",val:": int = 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"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.__call__.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py#L582",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:Z}}}),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"},{name:"clip_skip",val:": typing.Optional[int] = 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"},{anchor:"diffusers.AltDiffusionImg2ImgPipeline.encode_prompt.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py#L257"}}),$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/main/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"),g=o("a"),x=o("span"),v(c.$$.fragment),P=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"),v(ce.$$.fragment),fn=l(),ot=o("span"),mn=a("Tips"),Lt=l(),R=o("p"),it=o("code"),un=a("AltDiffusion"),gn=a(" is conceptually the same as "),Ue=o("a"),hn=a("Stable Diffusion"),_n=a("."),St=l(),v(Q.$$.fragment),Jt=l(),B=o("h2"),z=o("a"),st=o("span"),v(fe.$$.fragment),bn=l(),at=o("span"),vn=a("AltDiffusionPipeline"),jt=l(),h=o("div"),v(me.$$.fragment),yn=l(),rt=o("p"),wn=a("Pipeline for text-to-image generation using Alt Diffusion."),In=l(),ue=o("p"),An=a("This model inherits from "),Le=o("a"),Dn=a("DiffusionPipeline"),Pn=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),xn=l(),lt=o("p"),kn=a("The pipeline also inherits the following loading methods:"),$n=l(),N=o("ul"),Se=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()"),Ln=a(" for saving LoRA weights"),Sn=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(),L=o("div"),v(ge.$$.fragment),Wn=l(),pt=o("p"),On=a("The call function to the pipeline for generation."),Zn=l(),v(Y.$$.fragment),Gn=l(),q=o("div"),v(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"),v(be.$$.fragment),Hn=l(),ve=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"),v(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"),v(we.$$.fragment),ao=l(),ut=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"),v(Ie.$$.fragment),po=l(),gt=o("p"),co=a("Encodes the prompt into text encoder hidden states."),Ft=l(),W=o("h2"),ne=o("a"),ht=o("span"),v(Ae.$$.fragment),fo=l(),_t=o("span"),mo=a("AltDiffusionImg2ImgPipeline"),Rt=l(),k=o("div"),v(De.$$.fragment),uo=l(),bt=o("p"),go=a("Pipeline for text-guided image-to-image generation using Alt Diffusion."),ho=l(),Pe=o("p"),_o=a("This model inherits from "),Oe=o("a"),bo=a("DiffusionPipeline"),vo=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),yo=l(),vt=o("p"),wo=a("The pipeline also inherits the following loading methods:"),Io=l(),V=o("ul"),Ze=o("li"),Ge=o("a"),Ao=a("load_textual_inversion()"),Do=a(" for loading textual inversion embeddings"),Po=l(),Qe=o("li"),ze=o("a"),xo=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"),Lo=l(),S=o("div"),v(xe.$$.fragment),So=l(),wt=o("p"),Jo=a("The call function to the pipeline for generation."),jo=l(),v(ie.$$.fragment),Fo=l(),se=o("div"),v(ke.$$.fragment),Ro=l(),It=o("p"),Bo=a("Encodes the prompt into text encoder hidden states."),Bt=l(),O=o("h2"),ae=o("a"),At=o("span"),v($e.$$.fragment),Wo=l(),Dt=o("span"),Oo=a("AltDiffusionPipelineOutput"),Wt=l(),U=o("div"),v(Me.$$.fragment),Zo=l(),Pt=o("p"),Go=a("Output class for Alt Diffusion pipelines."),Qo=l(),re=o("div"),v(Ce.$$.fragment),zo=l(),xt=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(_);g=i(Te,"A",{id:!0,class:!0,href:!0});var kt=s(g);x=i(kt,"SPAN",{});var $t=s(x);y(c.$$.fragment,$t),$t.forEach(n),kt.forEach(n),P=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 Zt=s(E);Ee=r(Zt,"AltDiffusion was proposed in "),pe=i(Zt,"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(Zt," by Zhongzhi Chen, Guang Liu, Bo-Wen Zhang, Fulong Ye, Qinghong Yang, Ledell Wu."),Zt.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),Lt=d(t),R=i(t,"P",{});var Mt=s(R);it=i(Mt,"CODE",{});var pi=s(it);un=r(pi,"AltDiffusion"),pi.forEach(n),gn=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),St=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),bn=d(Qt),at=i(Qt,"SPAN",{});var ui=s(at);vn=r(ui,"AltDiffusionPipeline"),ui.forEach(n),Qt.forEach(n),jt=d(t),h=i(t,"DIV",{class:!0});var b=s(h);y(me.$$.fragment,b),yn=d(b),rt=i(b,"P",{});var gi=s(rt);wn=r(gi,"Pipeline for text-to-image generation using Alt Diffusion."),gi.forEach(n),In=d(b),ue=i(b,"P",{});var zt=s(ue);An=r(zt,"This model inherits from "),Le=i(zt,"A",{href:!0});var hi=s(Le);Dn=r(hi,"DiffusionPipeline"),hi.forEach(n),Pn=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),xn=d(b),lt=i(b,"P",{});var _i=s(lt);kn=r(_i,"The pipeline also inherits the following loading methods:"),_i.forEach(n),$n=d(b),N=i(b,"UL",{});var le=s(N);Se=i(le,"LI",{});var Yo=s(Se);Je=i(Yo,"A",{href:!0});var bi=s(Je);Mn=r(bi,"load_textual_inversion()"),bi.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 vi=s(Fe);En=r(vi,"load_lora_weights()"),vi.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),Ln=r(Ho," for saving LoRA weights"),Ho.forEach(n),Sn=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(b),L=i(b,"DIV",{class:!0});var He=s(L);y(ge.$$.fragment,He),Wn=d(He),pt=i(He,"P",{});var Ai=s(pt);On=r(Ai,"The call function to the pipeline for generation."),Ai.forEach(n),Zn=d(He),y(Y.$$.fragment,He),He.forEach(n),Gn=d(b),q=i(b,"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(b),H=i(b,"DIV",{class:!0});var qt=s(H);y(be.$$.fragment,qt),Hn=d(qt),ve=i(qt,"P",{});var Ht=s(ve);Kn=r(Ht,"Disable tiled VAE decoding. If "),ft=i(Ht,"CODE",{});var Pi=s(ft);eo=r(Pi,"enable_vae_tiling"),Pi.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(b),K=i(b,"DIV",{class:!0});var Kt=s(K);y(ye.$$.fragment,Kt),oo=d(Kt),mt=i(Kt,"P",{});var xi=s(mt);io=r(xi,`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`),xi.forEach(n),Kt.forEach(n),so=d(b),ee=i(b,"DIV",{class:!0});var en=s(ee);y(we.$$.fragment,en),ao=d(en),ut=i(en,"P",{});var ki=s(ut);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(b),te=i(b,"DIV",{class:!0});var tn=s(te);y(Ie.$$.fragment,tn),po=d(tn),gt=i(tn,"P",{});var $i=s(gt);co=r($i,"Encodes the prompt into text encoder hidden states."),$i.forEach(n),tn.forEach(n),b.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),uo=d(M),bt=i(M,"P",{});var Ei=s(bt);go=r(Ei,"Pipeline for text-guided image-to-image generation using Alt Diffusion."),Ei.forEach(n),ho=d(M),Pe=i(M,"P",{});var on=s(Pe);_o=r(on,"This model inherits from "),Oe=i(on,"A",{href:!0});var Ni=s(Oe);bo=r(Ni,"DiffusionPipeline"),Ni.forEach(n),vo=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),vt=i(M,"P",{});var Vi=s(vt);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);Ze=i(de,"LI",{});var Ko=s(Ze);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),Po=d(de),Qe=i(de,"LI",{});var ei=s(Qe);ze=i(ei,"A",{href:!0});var Li=s(ze);xo=r(Li,"load_lora_weights()"),Li.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 Si=s(Ye);Mo=r(Si,"save_lora_weights()"),Si.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),Lo=d(M),S=i(M,"DIV",{class:!0});var Ke=s(S);y(xe.$$.fragment,Ke),So=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),O=i(t,"H2",{class:!0});var an=s(O);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 Oi=s(Dt);Oo=r(Oi,"AltDiffusionPipelineOutput"),Oi.forEach(n),an.forEach(n),Wt=d(t),U=i(t,"DIV",{class:!0});var et=s(U);y(Me.$$.fragment,et),Zo=d(et),Pt=i(et,"P",{});var Zi=s(Pt);Go=r(Zi,"Output class for Alt Diffusion pipelines."),Zi.forEach(n),Qo=d(et),re=i(et,"DIV",{class:!0});var rn=s(re);y(Ce.$$.fragment,rn),zo=d(rn),xt=i(rn,"P",{});var Gi=s(xt);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(g,"id","altdiffusion"),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","#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(Le,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),p(Je,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion"),p(Fe,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights"),p(Be,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights"),p(We,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline.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(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(Oe,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),p(Ge,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion"),p(ze,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights"),p(Ye,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights"),p(qe,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline.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(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(O,"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),u(t,$,f),u(t,_,f),e(_,g),e(g,x),w(c,x,null),e(_,P),e(_,J),e(J,j),u(t,C,f),u(t,E,f),e(E,Ee),e(E,pe),e(pe,ln),e(E,dn),u(t,Nt,f),u(t,Ne,f),e(Ne,pn),u(t,Vt,f),u(t,Ve,f),e(Ve,tt),e(tt,cn),u(t,Ut,f),u(t,F,f),e(F,G),e(G,nt),w(ce,nt,null),e(F,fn),e(F,ot),e(ot,mn),u(t,Lt,f),u(t,R,f),e(R,it),e(it,un),e(R,gn),e(R,Ue),e(Ue,hn),e(R,_n),u(t,St,f),w(Q,t,f),u(t,Jt,f),u(t,B,f),e(B,z),e(z,st),w(fe,st,null),e(B,bn),e(B,at),e(at,vn),u(t,jt,f),u(t,h,f),w(me,h,null),e(h,yn),e(h,rt),e(rt,wn),e(h,In),e(h,ue),e(ue,An),e(ue,Le),e(Le,Dn),e(ue,Pn),e(h,xn),e(h,lt),e(lt,kn),e(h,$n),e(h,N),e(N,Se),e(Se,Je),e(Je,Mn),e(Se,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,Ln),e(N,Sn),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,L),w(ge,L,null),e(L,Wn),e(L,pt),e(pt,On),e(L,Zn),w(Y,L,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(be,H,null),e(H,Hn),e(H,ve),e(ve,Kn),e(ve,ft),e(ft,eo),e(ve,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,ut),e(ut,ro),e(h,lo),e(h,te),w(Ie,te,null),e(te,po),e(te,gt),e(gt,co),u(t,Ft,f),u(t,W,f),e(W,ne),e(ne,ht),w(Ae,ht,null),e(W,fo),e(W,_t),e(_t,mo),u(t,Rt,f),u(t,k,f),w(De,k,null),e(k,uo),e(k,bt),e(bt,go),e(k,ho),e(k,Pe),e(Pe,_o),e(Pe,Oe),e(Oe,bo),e(Pe,vo),e(k,yo),e(k,vt),e(vt,wo),e(k,Io),e(k,V),e(V,Ze),e(Ze,Ge),e(Ge,Ao),e(Ze,Do),e(V,Po),e(V,Qe),e(Qe,ze),e(ze,xo),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,Lo),e(k,S),w(xe,S,null),e(S,So),e(S,wt),e(wt,Jo),e(S,jo),w(ie,S,null),e(k,Fo),e(k,se),w(ke,se,null),e(se,Ro),e(se,It),e(It,Bo),u(t,Bt,f),u(t,O,f),e(O,ae),e(ae,At),w($e,At,null),e(O,Wo),e(O,Dt),e(Dt,Oo),u(t,Wt,f),u(t,U,f),w(Me,U,null),e(U,Zo),e(U,Pt),e(Pt,Go),e(U,Qo),e(U,re),w(Ce,re,null),e(re,zo),e(re,xt),e(xt,Xo),Ot=!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){Ot||(I(c.$$.fragment,t),I(ce.$$.fragment,t),I(Q.$$.fragment,t),I(fe.$$.fragment,t),I(me.$$.fragment,t),I(ge.$$.fragment,t),I(Y.$$.fragment,t),I(he.$$.fragment,t),I(be.$$.fragment,t),I(ye.$$.fragment,t),I(we.$$.fragment,t),I(Ie.$$.fragment,t),I(Ae.$$.fragment,t),I(De.$$.fragment,t),I(xe.$$.fragment,t),I(ie.$$.fragment,t),I(ke.$$.fragment,t),I($e.$$.fragment,t),I(Me.$$.fragment,t),I(Ce.$$.fragment,t),Ot=!0)},o(t){A(c.$$.fragment,t),A(ce.$$.fragment,t),A(Q.$$.fragment,t),A(fe.$$.fragment,t),A(me.$$.fragment,t),A(ge.$$.fragment,t),A(Y.$$.fragment,t),A(he.$$.fragment,t),A(be.$$.fragment,t),A(ye.$$.fragment,t),A(we.$$.fragment,t),A(Ie.$$.fragment,t),A(Ae.$$.fragment,t),A(De.$$.fragment,t),A(xe.$$.fragment,t),A(ie.$$.fragment,t),A(ke.$$.fragment,t),A($e.$$.fragment,t),A(Me.$$.fragment,t),A(Ce.$$.fragment,t),Ot=!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(Lt),t&&n(R),t&&n(St),D(Q,t),t&&n(Jt),t&&n(B),D(fe),t&&n(jt),t&&n(h),D(me),D(ge),D(Y),D(he),D(be),D(ye),D(we),D(Ie),t&&n(Ft),t&&n(W),D(Ae),t&&n(Rt),t&&n(k),D(De),D(xe),D(ie),D(ke),t&&n(Bt),t&&n(O),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(Z){return es(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class us extends Yi{constructor(m){super();qi(this,m,rs,ss,Hi,{})}}export{us as default,as as metadata};

Xet Storage Details

Size:
66.1 kB
·
Xet hash:
1c47ae4dc80f0ad94d52e81f4c6dae92b8fcc872ba36b7ac8fe340ecbef8c814

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.