import{S as ji,i as Ui,s as Fi,e as o,k as l,w as $,t as s,M as Gi,c as i,d as t,m as f,a,x,h as r,b as d,G as e,g as _,y as D,q as E,o as P,B as S,v as zi,L as qi}from"../../../../chunks/vendor-hf-doc-builder.js";import{D as j}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as Vi}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as Oi}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ni}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Wi(Te){let g,A,b,u,k;return u=new Vi({props:{code:`import torch
from diffusers import StableDiffusionPipeline

pipe = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
pipe = pipe.to("cuda")

prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]`,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> StableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&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>prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){g=o("p"),A=s("Examples:"),b=l(),$(u.$$.fragment)},l(c){g=i(c,"P",{});var v=a(g);A=r(v,"Examples:"),v.forEach(t),b=f(c),x(u.$$.fragment,c)},m(c,v){_(c,g,v),e(g,A),_(c,b,v),D(u,c,v),k=!0},p:qi,i(c){k||(E(u.$$.fragment,c),k=!0)},o(c){P(u.$$.fragment,c),k=!1},d(c){c&&t(g),c&&t(b),S(u,c)}}}function Bi(Te){let g,A,b,u,k;return u=new Vi({props:{code:`import torch
from diffusers import DiffusionPipeline
from xformers.ops import MemoryEfficientAttentionFlashAttentionOp

pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1", torch_dtype=torch.float16)
pipe = pipe.to("cuda")
pipe.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)
# Workaround for not accepting attention shape using VAE for Flash Attention
pipe.vae.enable_xformers_memory_efficient_attention(attention_op=None)`,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> DiffusionPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> xformers.ops <span class="hljs-keyword">import</span> MemoryEfficientAttentionFlashAttentionOp

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&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>pipe.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Workaround for not accepting attention shape using VAE for Flash Attention</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.vae.enable_xformers_memory_efficient_attention(attention_op=<span class="hljs-literal">None</span>)`}}),{c(){g=o("p"),A=s("Examples:"),b=l(),$(u.$$.fragment)},l(c){g=i(c,"P",{});var v=a(g);A=r(v,"Examples:"),v.forEach(t),b=f(c),x(u.$$.fragment,c)},m(c,v){_(c,g,v),e(g,A),_(c,b,v),D(u,c,v),k=!0},p:qi,i(c){k||(E(u.$$.fragment,c),k=!0)},o(c){P(u.$$.fragment,c),k=!1},d(c){c&&t(g),c&&t(b),S(u,c)}}}function Ki(Te){let g,A,b,u,k,c,v,Fe,zt,_t,U,G,Ge,X,Wt,ze,Bt,bt,y,Kt,Y,Ht,Jt,Z,Rt,Qt,ee,Xt,Yt,te,Zt,en,Le,tn,nn,vt,Me,on,yt,z,ne,We,an,sn,oe,rn,ln,ie,Be,fn,dn,ae,cn,wt,Oe,pn,$t,w,se,Ke,un,mn,re,hn,gn,le,He,_n,bn,fe,vn,yn,de,Je,wn,$n,ce,xn,Dn,pe,Re,En,Pn,ue,Sn,kn,me,Qe,In,Cn,he,An,Tn,ge,Xe,Ln,Mn,_e,On,xt,p,be,Nn,Ye,qn,Vn,ve,jn,Ne,Un,Fn,Gn,M,ye,zn,Ze,Wn,Bn,W,Kn,O,we,Hn,et,Jn,Rn,tt,Qn,Xn,B,$e,Yn,xe,Zn,nt,eo,to,no,N,De,oo,ot,io,ao,it,so,ro,K,Ee,lo,Pe,fo,at,co,po,uo,I,Se,mo,st,ho,go,rt,_o,bo,lt,vo,yo,H,wo,J,ke,$o,ft,xo,Do,R,Ie,Eo,C,Po,dt,So,ko,ct,Io,Co,pt,Ao,To,ut,Lo,Mo,Oo,Q,Ce,No,F,qo,mt,Vo,jo,ht,Uo,Fo,Dt;return c=new Oi({}),X=new Oi({}),be=new j({props:{name:"class diffusers.StableDiffusionPipeline",anchor:"diffusers.StableDiffusionPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPFeatureExtractor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionPipeline.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.StableDiffusionPipeline.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 details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPFeatureExtractor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L55"}}),ye=new j({props:{name:"__call__",anchor:"diffusers.StableDiffusionPipeline.__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"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>.
instead.`,name:"prompt"},{anchor:"diffusers.StableDiffusionPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableDiffusionPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.StableDiffusionPipeline.__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.StableDiffusionPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.StableDiffusionPipeline.__call__.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. 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.StableDiffusionPipeline.__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.StableDiffusionPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.StableDiffusionPipeline.__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 will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableDiffusionPipeline.__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, <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.StableDiffusionPipeline.__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, <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.StableDiffusionPipeline.__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 generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.StableDiffusionPipeline.__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 <a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that will be called every <code>callback_steps</code> steps during inference. The function will be
called with the following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.StableDiffusionPipeline.__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 will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"},{anchor:"diffusers.StableDiffusionPipeline.__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>AttnProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py" rel="nofollow">diffusers.cross_attention</a>.`,name:"cross_attention_kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L489",returnDescription:`
<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),W=new Ni({props:{anchor:"diffusers.StableDiffusionPipeline.__call__.example",$$slots:{default:[Wi]},$$scope:{ctx:Te}}}),we=new j({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maxium amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1033"}}),$e=new j({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1049"}}),De=new j({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L173"}}),Ee=new j({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L182"}}),Se=new j({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L976"}}),H=new Ni({props:{anchor:"diffusers.StableDiffusionPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Bi]},$$scope:{ctx:Te}}}),ke=new j({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1008"}}),Ie=new j({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L210"}}),Ce=new j({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.StableDiffusionPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L189"}}),{c(){g=o("meta"),A=l(),b=o("h1"),u=o("a"),k=o("span"),$(c.$$.fragment),v=l(),Fe=o("span"),zt=s("Text-to-Image Generation"),_t=l(),U=o("h2"),G=o("a"),Ge=o("span"),$(X.$$.fragment),Wt=l(),ze=o("span"),Bt=s("StableDiffusionPipeline"),bt=l(),y=o("p"),Kt=s("The Stable Diffusion model was created by the researchers and engineers from "),Y=o("a"),Ht=s("CompVis"),Jt=s(", "),Z=o("a"),Rt=s("Stability AI"),Qt=s(", "),ee=o("a"),Xt=s("runway"),Yt=s(", and "),te=o("a"),Zt=s("LAION"),en=s(". The "),Le=o("a"),tn=s("StableDiffusionPipeline"),nn=s(" is capable of generating photo-realistic images given any text input using Stable Diffusion."),vt=l(),Me=o("p"),on=s("The original codebase can be found here:"),yt=l(),z=o("ul"),ne=o("li"),We=o("em"),an=s("Stable Diffusion V1"),sn=s(": "),oe=o("a"),rn=s("CompVis/stable-diffusion"),ln=l(),ie=o("li"),Be=o("em"),fn=s("Stable Diffusion v2"),dn=s(": "),ae=o("a"),cn=s("Stability-AI/stablediffusion"),wt=l(),Oe=o("p"),pn=s("Available Checkpoints are:"),$t=l(),w=o("ul"),se=o("li"),Ke=o("em"),un=s("stable-diffusion-v1-4 (512x512 resolution)"),mn=l(),re=o("a"),hn=s("CompVis/stable-diffusion-v1-4"),gn=l(),le=o("li"),He=o("em"),_n=s("stable-diffusion-v1-5 (512x512 resolution)"),bn=l(),fe=o("a"),vn=s("runwayml/stable-diffusion-v1-5"),yn=l(),de=o("li"),Je=o("em"),wn=s("stable-diffusion-2-base (512x512 resolution)"),$n=s(": "),ce=o("a"),xn=s("stabilityai/stable-diffusion-2-base"),Dn=l(),pe=o("li"),Re=o("em"),En=s("stable-diffusion-2 (768x768 resolution)"),Pn=s(": "),ue=o("a"),Sn=s("stabilityai/stable-diffusion-2"),kn=l(),me=o("li"),Qe=o("em"),In=s("stable-diffusion-2-1-base (512x512 resolution)"),Cn=l(),he=o("a"),An=s("stabilityai/stable-diffusion-2-1-base"),Tn=l(),ge=o("li"),Xe=o("em"),Ln=s("stable-diffusion-2-1 (768x768 resolution)"),Mn=s(": "),_e=o("a"),On=s("stabilityai/stable-diffusion-2-1"),xt=l(),p=o("div"),$(be.$$.fragment),Nn=l(),Ye=o("p"),qn=s("Pipeline for text-to-image generation using Stable Diffusion."),Vn=l(),ve=o("p"),jn=s("This model inherits from "),Ne=o("a"),Un=s("DiffusionPipeline"),Fn=s(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),Gn=l(),M=o("div"),$(ye.$$.fragment),zn=l(),Ze=o("p"),Wn=s("Function invoked when calling the pipeline for generation."),Bn=l(),$(W.$$.fragment),Kn=l(),O=o("div"),$(we.$$.fragment),Hn=l(),et=o("p"),Jn=s("Enable sliced attention computation."),Rn=l(),tt=o("p"),Qn=s(`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),Xn=l(),B=o("div"),$($e.$$.fragment),Yn=l(),xe=o("p"),Zn=s("Disable sliced attention computation. If "),nt=o("code"),eo=s("enable_attention_slicing"),to=s(` was previously invoked, this method will go
back to computing attention in one step.`),no=l(),N=o("div"),$(De.$$.fragment),oo=l(),ot=o("p"),io=s("Enable sliced VAE decoding."),ao=l(),it=o("p"),so=s(`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.`),ro=l(),K=o("div"),$(Ee.$$.fragment),lo=l(),Pe=o("p"),fo=s("Disable sliced VAE decoding. If "),at=o("code"),co=s("enable_vae_slicing"),po=s(` was previously invoked, this method will go back to
computing decoding in one step.`),uo=l(),I=o("div"),$(Se.$$.fragment),mo=l(),st=o("p"),ho=s("Enable memory efficient attention as implemented in xformers."),go=l(),rt=o("p"),_o=s(`When this option is enabled, you should observe lower GPU memory usage and a potential speed up at inference
time. Speed up at training time is not guaranteed.`),bo=l(),lt=o("p"),vo=s(`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),yo=l(),$(H.$$.fragment),wo=l(),J=o("div"),$(ke.$$.fragment),$o=l(),ft=o("p"),xo=s("Disable memory efficient attention as implemented in xformers."),Do=l(),R=o("div"),$(Ie.$$.fragment),Eo=l(),C=o("p"),Po=s(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),dt=o("code"),So=s("enable_sequential_cpu_offload"),ko=s(", this method moves one whole model at a time to the GPU when its "),ct=o("code"),Io=s("forward"),Co=s(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),pt=o("code"),Ao=s("enable_sequential_cpu_offload"),To=s(", but performance is much better due to the iterative execution of the "),ut=o("code"),Lo=s("unet"),Mo=s("."),Oo=l(),Q=o("div"),$(Ce.$$.fragment),No=l(),F=o("p"),qo=s(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),mt=o("code"),Vo=s("torch.device('meta') and loaded to GPU only when their specific submodule has its "),jo=s("forward"),ht=o("code"),Uo=s("method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),Fo=s("enable_model_cpu_offload`, but performance is lower."),this.h()},l(n){const m=Gi('[data-svelte="svelte-1phssyn"]',document.head);g=i(m,"META",{name:!0,content:!0}),m.forEach(t),A=f(n),b=i(n,"H1",{class:!0});var Ae=a(b);u=i(Ae,"A",{id:!0,class:!0,href:!0});var gt=a(u);k=i(gt,"SPAN",{});var Go=a(k);x(c.$$.fragment,Go),Go.forEach(t),gt.forEach(t),v=f(Ae),Fe=i(Ae,"SPAN",{});var zo=a(Fe);zt=r(zo,"Text-to-Image Generation"),zo.forEach(t),Ae.forEach(t),_t=f(n),U=i(n,"H2",{class:!0});var Et=a(U);G=i(Et,"A",{id:!0,class:!0,href:!0});var Wo=a(G);Ge=i(Wo,"SPAN",{});var Bo=a(Ge);x(X.$$.fragment,Bo),Bo.forEach(t),Wo.forEach(t),Wt=f(Et),ze=i(Et,"SPAN",{});var Ko=a(ze);Bt=r(Ko,"StableDiffusionPipeline"),Ko.forEach(t),Et.forEach(t),bt=f(n),y=i(n,"P",{});var T=a(y);Kt=r(T,"The Stable Diffusion model was created by the researchers and engineers from "),Y=i(T,"A",{href:!0,rel:!0});var Ho=a(Y);Ht=r(Ho,"CompVis"),Ho.forEach(t),Jt=r(T,", "),Z=i(T,"A",{href:!0,rel:!0});var Jo=a(Z);Rt=r(Jo,"Stability AI"),Jo.forEach(t),Qt=r(T,", "),ee=i(T,"A",{href:!0,rel:!0});var Ro=a(ee);Xt=r(Ro,"runway"),Ro.forEach(t),Yt=r(T,", and "),te=i(T,"A",{href:!0,rel:!0});var Qo=a(te);Zt=r(Qo,"LAION"),Qo.forEach(t),en=r(T,". The "),Le=i(T,"A",{href:!0});var Xo=a(Le);tn=r(Xo,"StableDiffusionPipeline"),Xo.forEach(t),nn=r(T," is capable of generating photo-realistic images given any text input using Stable Diffusion."),T.forEach(t),vt=f(n),Me=i(n,"P",{});var Yo=a(Me);on=r(Yo,"The original codebase can be found here:"),Yo.forEach(t),yt=f(n),z=i(n,"UL",{});var Pt=a(z);ne=i(Pt,"LI",{});var St=a(ne);We=i(St,"EM",{});var Zo=a(We);an=r(Zo,"Stable Diffusion V1"),Zo.forEach(t),sn=r(St,": "),oe=i(St,"A",{href:!0,rel:!0});var ei=a(oe);rn=r(ei,"CompVis/stable-diffusion"),ei.forEach(t),St.forEach(t),ln=f(Pt),ie=i(Pt,"LI",{});var kt=a(ie);Be=i(kt,"EM",{});var ti=a(Be);fn=r(ti,"Stable Diffusion v2"),ti.forEach(t),dn=r(kt,": "),ae=i(kt,"A",{href:!0,rel:!0});var ni=a(ae);cn=r(ni,"Stability-AI/stablediffusion"),ni.forEach(t),kt.forEach(t),Pt.forEach(t),wt=f(n),Oe=i(n,"P",{});var oi=a(Oe);pn=r(oi,"Available Checkpoints are:"),oi.forEach(t),$t=f(n),w=i(n,"UL",{});var L=a(w);se=i(L,"LI",{});var It=a(se);Ke=i(It,"EM",{});var ii=a(Ke);un=r(ii,"stable-diffusion-v1-4 (512x512 resolution)"),ii.forEach(t),mn=f(It),re=i(It,"A",{href:!0,rel:!0});var ai=a(re);hn=r(ai,"CompVis/stable-diffusion-v1-4"),ai.forEach(t),It.forEach(t),gn=f(L),le=i(L,"LI",{});var Ct=a(le);He=i(Ct,"EM",{});var si=a(He);_n=r(si,"stable-diffusion-v1-5 (512x512 resolution)"),si.forEach(t),bn=f(Ct),fe=i(Ct,"A",{href:!0,rel:!0});var ri=a(fe);vn=r(ri,"runwayml/stable-diffusion-v1-5"),ri.forEach(t),Ct.forEach(t),yn=f(L),de=i(L,"LI",{});var At=a(de);Je=i(At,"EM",{});var li=a(Je);wn=r(li,"stable-diffusion-2-base (512x512 resolution)"),li.forEach(t),$n=r(At,": "),ce=i(At,"A",{href:!0,rel:!0});var fi=a(ce);xn=r(fi,"stabilityai/stable-diffusion-2-base"),fi.forEach(t),At.forEach(t),Dn=f(L),pe=i(L,"LI",{});var Tt=a(pe);Re=i(Tt,"EM",{});var di=a(Re);En=r(di,"stable-diffusion-2 (768x768 resolution)"),di.forEach(t),Pn=r(Tt,": "),ue=i(Tt,"A",{href:!0,rel:!0});var ci=a(ue);Sn=r(ci,"stabilityai/stable-diffusion-2"),ci.forEach(t),Tt.forEach(t),kn=f(L),me=i(L,"LI",{});var Lt=a(me);Qe=i(Lt,"EM",{});var pi=a(Qe);In=r(pi,"stable-diffusion-2-1-base (512x512 resolution)"),pi.forEach(t),Cn=f(Lt),he=i(Lt,"A",{href:!0,rel:!0});var ui=a(he);An=r(ui,"stabilityai/stable-diffusion-2-1-base"),ui.forEach(t),Lt.forEach(t),Tn=f(L),ge=i(L,"LI",{});var Mt=a(ge);Xe=i(Mt,"EM",{});var mi=a(Xe);Ln=r(mi,"stable-diffusion-2-1 (768x768 resolution)"),mi.forEach(t),Mn=r(Mt,": "),_e=i(Mt,"A",{href:!0,rel:!0});var hi=a(_e);On=r(hi,"stabilityai/stable-diffusion-2-1"),hi.forEach(t),Mt.forEach(t),L.forEach(t),xt=f(n),p=i(n,"DIV",{class:!0});var h=a(p);x(be.$$.fragment,h),Nn=f(h),Ye=i(h,"P",{});var gi=a(Ye);qn=r(gi,"Pipeline for text-to-image generation using Stable Diffusion."),gi.forEach(t),Vn=f(h),ve=i(h,"P",{});var Ot=a(ve);jn=r(Ot,"This model inherits from "),Ne=i(Ot,"A",{href:!0});var _i=a(Ne);Un=r(_i,"DiffusionPipeline"),_i.forEach(t),Fn=r(Ot,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),Ot.forEach(t),Gn=f(h),M=i(h,"DIV",{class:!0});var qe=a(M);x(ye.$$.fragment,qe),zn=f(qe),Ze=i(qe,"P",{});var bi=a(Ze);Wn=r(bi,"Function invoked when calling the pipeline for generation."),bi.forEach(t),Bn=f(qe),x(W.$$.fragment,qe),qe.forEach(t),Kn=f(h),O=i(h,"DIV",{class:!0});var Ve=a(O);x(we.$$.fragment,Ve),Hn=f(Ve),et=i(Ve,"P",{});var vi=a(et);Jn=r(vi,"Enable sliced attention computation."),vi.forEach(t),Rn=f(Ve),tt=i(Ve,"P",{});var yi=a(tt);Qn=r(yi,`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),yi.forEach(t),Ve.forEach(t),Xn=f(h),B=i(h,"DIV",{class:!0});var Nt=a(B);x($e.$$.fragment,Nt),Yn=f(Nt),xe=i(Nt,"P",{});var qt=a(xe);Zn=r(qt,"Disable sliced attention computation. If "),nt=i(qt,"CODE",{});var wi=a(nt);eo=r(wi,"enable_attention_slicing"),wi.forEach(t),to=r(qt,` was previously invoked, this method will go
back to computing attention in one step.`),qt.forEach(t),Nt.forEach(t),no=f(h),N=i(h,"DIV",{class:!0});var je=a(N);x(De.$$.fragment,je),oo=f(je),ot=i(je,"P",{});var $i=a(ot);io=r($i,"Enable sliced VAE decoding."),$i.forEach(t),ao=f(je),it=i(je,"P",{});var xi=a(it);so=r(xi,`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(t),je.forEach(t),ro=f(h),K=i(h,"DIV",{class:!0});var Vt=a(K);x(Ee.$$.fragment,Vt),lo=f(Vt),Pe=i(Vt,"P",{});var jt=a(Pe);fo=r(jt,"Disable sliced VAE decoding. If "),at=i(jt,"CODE",{});var Di=a(at);co=r(Di,"enable_vae_slicing"),Di.forEach(t),po=r(jt,` was previously invoked, this method will go back to
computing decoding in one step.`),jt.forEach(t),Vt.forEach(t),uo=f(h),I=i(h,"DIV",{class:!0});var q=a(I);x(Se.$$.fragment,q),mo=f(q),st=i(q,"P",{});var Ei=a(st);ho=r(Ei,"Enable memory efficient attention as implemented in xformers."),Ei.forEach(t),go=f(q),rt=i(q,"P",{});var Pi=a(rt);_o=r(Pi,`When this option is enabled, you should observe lower GPU memory usage and a potential speed up at inference
time. Speed up at training time is not guaranteed.`),Pi.forEach(t),bo=f(q),lt=i(q,"P",{});var Si=a(lt);vo=r(Si,`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),Si.forEach(t),yo=f(q),x(H.$$.fragment,q),q.forEach(t),wo=f(h),J=i(h,"DIV",{class:!0});var Ut=a(J);x(ke.$$.fragment,Ut),$o=f(Ut),ft=i(Ut,"P",{});var ki=a(ft);xo=r(ki,"Disable memory efficient attention as implemented in xformers."),ki.forEach(t),Ut.forEach(t),Do=f(h),R=i(h,"DIV",{class:!0});var Ft=a(R);x(Ie.$$.fragment,Ft),Eo=f(Ft),C=i(Ft,"P",{});var V=a(C);Po=r(V,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),dt=i(V,"CODE",{});var Ii=a(dt);So=r(Ii,"enable_sequential_cpu_offload"),Ii.forEach(t),ko=r(V,", this method moves one whole model at a time to the GPU when its "),ct=i(V,"CODE",{});var Ci=a(ct);Io=r(Ci,"forward"),Ci.forEach(t),Co=r(V,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),pt=i(V,"CODE",{});var Ai=a(pt);Ao=r(Ai,"enable_sequential_cpu_offload"),Ai.forEach(t),To=r(V,", but performance is much better due to the iterative execution of the "),ut=i(V,"CODE",{});var Ti=a(ut);Lo=r(Ti,"unet"),Ti.forEach(t),Mo=r(V,"."),V.forEach(t),Ft.forEach(t),Oo=f(h),Q=i(h,"DIV",{class:!0});var Gt=a(Q);x(Ce.$$.fragment,Gt),No=f(Gt),F=i(Gt,"P",{});var Ue=a(F);qo=r(Ue,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),mt=i(Ue,"CODE",{});var Li=a(mt);Vo=r(Li,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),Li.forEach(t),jo=r(Ue,"forward"),ht=i(Ue,"CODE",{});var Mi=a(ht);Uo=r(Mi,"method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),Mi.forEach(t),Fo=r(Ue,"enable_model_cpu_offload`, but performance is lower."),Ue.forEach(t),Gt.forEach(t),h.forEach(t),this.h()},h(){d(g,"name","hf:doc:metadata"),d(g,"content",JSON.stringify(Hi)),d(u,"id","texttoimage-generation"),d(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"),d(u,"href","#texttoimage-generation"),d(b,"class","relative group"),d(G,"id","diffusers.StableDiffusionPipeline"),d(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"),d(G,"href","#diffusers.StableDiffusionPipeline"),d(U,"class","relative group"),d(Y,"href","https://github.com/CompVis"),d(Y,"rel","nofollow"),d(Z,"href","https://stability.ai/"),d(Z,"rel","nofollow"),d(ee,"href","https://github.com/runwayml"),d(ee,"rel","nofollow"),d(te,"href","https://laion.ai/"),d(te,"rel","nofollow"),d(Le,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),d(oe,"href","https://github.com/CompVis/stable-diffusion"),d(oe,"rel","nofollow"),d(ae,"href","https://github.com/Stability-AI/stablediffusion"),d(ae,"rel","nofollow"),d(re,"href","https://huggingface.co/CompVis/stable-diffusion-v1-4"),d(re,"rel","nofollow"),d(fe,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),d(fe,"rel","nofollow"),d(ce,"href","https://huggingface.co/stabilityai/stable-diffusion-2-base"),d(ce,"rel","nofollow"),d(ue,"href","https://huggingface.co/stabilityai/stable-diffusion-2"),d(ue,"rel","nofollow"),d(he,"href","https://huggingface.co/stabilityai/stable-diffusion-2-1-base"),d(he,"rel","nofollow"),d(_e,"href","https://huggingface.co/stabilityai/stable-diffusion-2-1"),d(_e,"rel","nofollow"),d(Ne,"href","/docs/diffusers/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),d(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(n,m){e(document.head,g),_(n,A,m),_(n,b,m),e(b,u),e(u,k),D(c,k,null),e(b,v),e(b,Fe),e(Fe,zt),_(n,_t,m),_(n,U,m),e(U,G),e(G,Ge),D(X,Ge,null),e(U,Wt),e(U,ze),e(ze,Bt),_(n,bt,m),_(n,y,m),e(y,Kt),e(y,Y),e(Y,Ht),e(y,Jt),e(y,Z),e(Z,Rt),e(y,Qt),e(y,ee),e(ee,Xt),e(y,Yt),e(y,te),e(te,Zt),e(y,en),e(y,Le),e(Le,tn),e(y,nn),_(n,vt,m),_(n,Me,m),e(Me,on),_(n,yt,m),_(n,z,m),e(z,ne),e(ne,We),e(We,an),e(ne,sn),e(ne,oe),e(oe,rn),e(z,ln),e(z,ie),e(ie,Be),e(Be,fn),e(ie,dn),e(ie,ae),e(ae,cn),_(n,wt,m),_(n,Oe,m),e(Oe,pn),_(n,$t,m),_(n,w,m),e(w,se),e(se,Ke),e(Ke,un),e(se,mn),e(se,re),e(re,hn),e(w,gn),e(w,le),e(le,He),e(He,_n),e(le,bn),e(le,fe),e(fe,vn),e(w,yn),e(w,de),e(de,Je),e(Je,wn),e(de,$n),e(de,ce),e(ce,xn),e(w,Dn),e(w,pe),e(pe,Re),e(Re,En),e(pe,Pn),e(pe,ue),e(ue,Sn),e(w,kn),e(w,me),e(me,Qe),e(Qe,In),e(me,Cn),e(me,he),e(he,An),e(w,Tn),e(w,ge),e(ge,Xe),e(Xe,Ln),e(ge,Mn),e(ge,_e),e(_e,On),_(n,xt,m),_(n,p,m),D(be,p,null),e(p,Nn),e(p,Ye),e(Ye,qn),e(p,Vn),e(p,ve),e(ve,jn),e(ve,Ne),e(Ne,Un),e(ve,Fn),e(p,Gn),e(p,M),D(ye,M,null),e(M,zn),e(M,Ze),e(Ze,Wn),e(M,Bn),D(W,M,null),e(p,Kn),e(p,O),D(we,O,null),e(O,Hn),e(O,et),e(et,Jn),e(O,Rn),e(O,tt),e(tt,Qn),e(p,Xn),e(p,B),D($e,B,null),e(B,Yn),e(B,xe),e(xe,Zn),e(xe,nt),e(nt,eo),e(xe,to),e(p,no),e(p,N),D(De,N,null),e(N,oo),e(N,ot),e(ot,io),e(N,ao),e(N,it),e(it,so),e(p,ro),e(p,K),D(Ee,K,null),e(K,lo),e(K,Pe),e(Pe,fo),e(Pe,at),e(at,co),e(Pe,po),e(p,uo),e(p,I),D(Se,I,null),e(I,mo),e(I,st),e(st,ho),e(I,go),e(I,rt),e(rt,_o),e(I,bo),e(I,lt),e(lt,vo),e(I,yo),D(H,I,null),e(p,wo),e(p,J),D(ke,J,null),e(J,$o),e(J,ft),e(ft,xo),e(p,Do),e(p,R),D(Ie,R,null),e(R,Eo),e(R,C),e(C,Po),e(C,dt),e(dt,So),e(C,ko),e(C,ct),e(ct,Io),e(C,Co),e(C,pt),e(pt,Ao),e(C,To),e(C,ut),e(ut,Lo),e(C,Mo),e(p,Oo),e(p,Q),D(Ce,Q,null),e(Q,No),e(Q,F),e(F,qo),e(F,mt),e(mt,Vo),e(F,jo),e(F,ht),e(ht,Uo),e(F,Fo),Dt=!0},p(n,[m]){const Ae={};m&2&&(Ae.$$scope={dirty:m,ctx:n}),W.$set(Ae);const gt={};m&2&&(gt.$$scope={dirty:m,ctx:n}),H.$set(gt)},i(n){Dt||(E(c.$$.fragment,n),E(X.$$.fragment,n),E(be.$$.fragment,n),E(ye.$$.fragment,n),E(W.$$.fragment,n),E(we.$$.fragment,n),E($e.$$.fragment,n),E(De.$$.fragment,n),E(Ee.$$.fragment,n),E(Se.$$.fragment,n),E(H.$$.fragment,n),E(ke.$$.fragment,n),E(Ie.$$.fragment,n),E(Ce.$$.fragment,n),Dt=!0)},o(n){P(c.$$.fragment,n),P(X.$$.fragment,n),P(be.$$.fragment,n),P(ye.$$.fragment,n),P(W.$$.fragment,n),P(we.$$.fragment,n),P($e.$$.fragment,n),P(De.$$.fragment,n),P(Ee.$$.fragment,n),P(Se.$$.fragment,n),P(H.$$.fragment,n),P(ke.$$.fragment,n),P(Ie.$$.fragment,n),P(Ce.$$.fragment,n),Dt=!1},d(n){t(g),n&&t(A),n&&t(b),S(c),n&&t(_t),n&&t(U),S(X),n&&t(bt),n&&t(y),n&&t(vt),n&&t(Me),n&&t(yt),n&&t(z),n&&t(wt),n&&t(Oe),n&&t($t),n&&t(w),n&&t(xt),n&&t(p),S(be),S(ye),S(W),S(we),S($e),S(De),S(Ee),S(Se),S(H),S(ke),S(Ie),S(Ce)}}}const Hi={local:"texttoimage-generation",sections:[{local:"diffusers.StableDiffusionPipeline",title:"StableDiffusionPipeline"}],title:"Text-to-Image Generation"};function Ji(Te){return zi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ea extends ji{constructor(g){super();Ui(this,g,Ji,Ki,Fi,{})}}export{ea as default,Hi as metadata};
