import{S as Ha,i as Ra,s as Ba,e as n,k as f,w as u,t as r,M as Ka,c as o,d as t,m as d,a as s,x as h,h as l,b as a,N as Ki,G as e,g as p,y as m,L as Ya,q as g,o as _,B as b,v as ja}from"../../../chunks/vendor-hf-doc-builder.js";import{D as w}from"../../../chunks/Docstring-hf-doc-builder.js";import{I as li}from"../../../chunks/IconCopyLink-hf-doc-builder.js";function Ja(bs){let z,fi,U,R,yt,re,Yi,It,ji,di,I,Ji,wt,Qi,Xi,le,Zi,en,fe,tn,nn,de,on,sn,ce,an,rn,ci,C,ln,pe,fn,dn,Qe,cn,pn,pi,M,un,ue,hn,mn,he,gn,_n,ui,me,Pt,bn,vn,hi,Xe,Ze,Dn,ge,et,vs,mi,_e,St,yn,In,gi,B,xt,E,kt,wn,Pn,Et,Sn,xn,tt,kn,En,it,$n,Tn,G,$,$t,be,Ln,Cn,Tt,Lt,Mn,An,nt,ve,ot,Ds,On,st,De,Nn,zn,T,Ct,ye,Un,Gn,Mt,At,qn,Fn,at,Ie,rt,ys,Vn,lt,we,Wn,Hn,L,Ot,Pe,Rn,Bn,Se,Nt,Kn,Yn,zt,jn,Jn,ft,xe,dt,Is,Qn,ct,Xn,_i,q,K,Ut,ke,Zn,Gt,eo,bi,F,Ee,to,qt,io,vi,V,Y,Ft,$e,no,Vt,oo,Di,v,Te,so,Wt,ao,ro,Le,lo,pt,fo,co,po,j,Ce,uo,Ht,ho,mo,A,Me,go,Rt,_o,bo,Bt,vo,Do,J,Ae,yo,Oe,Io,Kt,wo,Po,yi,W,Q,Yt,Ne,So,jt,xo,Ii,D,ze,ko,Jt,Eo,$o,Ue,To,ut,Lo,Co,Mo,X,Ge,Ao,Qt,Oo,No,O,qe,zo,Xt,Uo,Go,Zt,qo,Fo,Z,Fe,Vo,Ve,Wo,ei,Ho,Ro,wi,H,ee,ti,We,Bo,ii,Ko,Pi,y,He,Yo,Re,jo,ni,Jo,Qo,Xo,Be,Zo,ht,es,ts,is,te,Ke,ns,oi,os,ss,N,Ye,as,si,rs,ls,ai,fs,ds,ie,je,cs,Je,ps,ri,us,hs,Si;return re=new li({}),ke=new li({}),Ee=new w({props:{name:"class diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",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.stable_diffusion.StableDiffusionPipelineOutput.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>. PIL images or numpy array present the denoised images of the diffusion pipeline.`,name:"images"},{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.nsfw_content_detected",description:`<strong>nsfw_content_detected</strong> (<code>List[bool]</code>) &#x2014;
List of flags denoting whether the corresponding generated image likely represents &#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/vr_636/src/diffusers/pipelines/stable_diffusion/__init__.py#L13"}}),$e=new li({}),Te=new w({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:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_pndm.PNDMScheduler, diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler]"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPFeatureExtractor"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_636/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/pr_636/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/pr_636/en/api/schedulers#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latens. Can be one of
<a href="/docs/diffusers/pr_636/en/api/schedulers#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/pr_636/en/api/schedulers#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/pr_636/en/api/schedulers#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/CompVis/stable-diffusion-v1-4" 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/vr_636/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L20"}}),Ce=new w({props:{name:"__call__",anchor:"diffusers.StableDiffusionPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"height",val:": int = 512"},{name:"width",val:": int = 512"},{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.Optional[torch._C.Generator] = None"},{name:"latents",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:": typing.Optional[int] = 1"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide the image generation.`,name:"prompt"},{anchor:"diffusers.StableDiffusionPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#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 512) &#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. 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/pr_636/en/api/schedulers#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>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator</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__.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/pr_636/en/api/pipelines/stable_diffusion#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"}],source:"https://github.com/huggingface/diffusers/blob/vr_636/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L121",returnDescription:`
<p><a
  href="/docs/diffusers/pr_636/en/api/pipelines/stable_diffusion#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/pr_636/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),Me=new w({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
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/vr_636/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L94"}}),Ae=new w({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_636/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L113"}}),Ne=new li({}),ze=new w({props:{name:"class diffusers.StableDiffusionImg2ImgPipeline",anchor:"diffusers.StableDiffusionImg2ImgPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_pndm.PNDMScheduler, diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler]"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPFeatureExtractor"}],parametersDescription:[{anchor:"diffusers.StableDiffusionImg2ImgPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_636/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.StableDiffusionImg2ImgPipeline.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.StableDiffusionImg2ImgPipeline.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.StableDiffusionImg2ImgPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/pr_636/en/api/models#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionImg2ImgPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_636/en/api/schedulers#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latens. Can be one of
<a href="/docs/diffusers/pr_636/en/api/schedulers#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/pr_636/en/api/schedulers#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/pr_636/en/api/schedulers#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionImg2ImgPipeline.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/CompVis/stable-diffusion-v1-4" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionImg2ImgPipeline.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/vr_636/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py#L32"}}),Ge=new w({props:{name:"__call__",anchor:"diffusers.StableDiffusionImg2ImgPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"init_image",val:": typing.Union[torch.FloatTensor, PIL.Image.Image]"},{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.Optional[torch._C.Generator] = 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:": typing.Optional[int] = 1"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionImg2ImgPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide the image generation.`,name:"prompt"},{anchor:"diffusers.StableDiffusionImg2ImgPipeline.__call__.init_image",description:`<strong>init_image</strong> (<code>torch.FloatTensor</code> or <code>PIL.Image.Image</code>) &#x2014;
<code>Image</code>, or tensor representing an image batch, that will be used as the starting point for the
process.`,name:"init_image"},{anchor:"diffusers.StableDiffusionImg2ImgPipeline.__call__.strength",description:`<strong>strength</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
Conceptually, indicates how much to transform the reference <code>init_image</code>. Must be between 0 and 1.
<code>init_image</code> will be used as a starting point, adding more noise to it the larger 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 will be maximum and the denoising process will run for the full number of iterations specified in
<code>num_inference_steps</code>. A value of 1, therefore, essentially ignores <code>init_image</code>.`,name:"strength"},{anchor:"diffusers.StableDiffusionImg2ImgPipeline.__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 will be modulated by <code>strength</code>.`,name:"num_inference_steps"},{anchor:"diffusers.StableDiffusionImg2ImgPipeline.__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.StableDiffusionImg2ImgPipeline.__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. Ignored when not using guidance (i.e., ignored
if <code>guidance_scale</code> is less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionImg2ImgPipeline.__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.StableDiffusionImg2ImgPipeline.__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/pr_636/en/api/schedulers#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionImg2ImgPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator</a> to make generation
deterministic.`,name:"generator"},{anchor:"diffusers.StableDiffusionImg2ImgPipeline.__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.StableDiffusionImg2ImgPipeline.__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/pr_636/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionImg2ImgPipeline.__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.StableDiffusionImg2ImgPipeline.__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"}],source:"https://github.com/huggingface/diffusers/blob/vr_636/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py#L133",returnDescription:`
<p><a
  href="/docs/diffusers/pr_636/en/api/pipelines/stable_diffusion#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/pr_636/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),qe=new w({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionImg2ImgPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionImg2ImgPipeline.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
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/vr_636/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py#L106"}}),Fe=new w({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionImg2ImgPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_636/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py#L125"}}),We=new li({}),He=new w({props:{name:"class diffusers.StableDiffusionInpaintPipeline",anchor:"diffusers.StableDiffusionInpaintPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_pndm.PNDMScheduler, diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler]"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPFeatureExtractor"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_636/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.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/pr_636/en/api/models#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionInpaintPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_636/en/api/schedulers#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latens. Can be one of
<a href="/docs/diffusers/pr_636/en/api/schedulers#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/pr_636/en/api/schedulers#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/pr_636/en/api/schedulers#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionInpaintPipeline.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/CompVis/stable-diffusion-v1-4" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionInpaintPipeline.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/vr_636/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L46"}}),Ke=new w({props:{name:"__call__",anchor:"diffusers.StableDiffusionInpaintPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"init_image",val:": typing.Union[torch.FloatTensor, PIL.Image.Image]"},{name:"mask_image",val:": typing.Union[torch.FloatTensor, PIL.Image.Image]"},{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.Optional[torch._C.Generator] = 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:": typing.Optional[int] = 1"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide the image generation.`,name:"prompt"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.init_image",description:`<strong>init_image</strong> (<code>torch.FloatTensor</code> or <code>PIL.Image.Image</code>) &#x2014;
<code>Image</code>, or tensor representing an image batch, that will be used as the starting point for the
process. This is the image whose masked region will be inpainted.`,name:"init_image"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.mask_image",description:`<strong>mask_image</strong> (<code>torch.FloatTensor</code> or <code>PIL.Image.Image</code>) &#x2014;
<code>Image</code>, or tensor representing an image batch, to mask <code>init_image</code>. White pixels in the mask will be
replaced by noise and therefore repainted, while black pixels will be preserved. If <code>mask_image</code> is a
PIL image, it will be converted to a single channel (luminance) before use. If it&#x2019;s a tensor, it should
contain one color channel (L) instead of 3, so the expected shape would be <code>(B, H, W, 1)</code>.`,name:"mask_image"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.strength",description:`<strong>strength</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
Conceptually, indicates how much to inpaint the masked area. Must be between 0 and 1. When <code>strength</code>
is 1, the denoising process will be run on the masked area for the full number of iterations specified
in <code>num_inference_steps</code>. <code>init_image</code> will be used as a reference for the masked area, adding more
noise to that region the larger the <code>strength</code>. If <code>strength</code> is 0, no inpainting will occur.`,name:"strength"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
The reference number of denoising steps. More denoising steps usually lead to a higher quality image at
the expense of slower inference. This parameter will be modulated by <code>strength</code>, as explained above.`,name:"num_inference_steps"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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.StableDiffusionInpaintPipeline.__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. Ignored when not using guidance (i.e., ignored
if <code>guidance_scale</code> is less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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.StableDiffusionInpaintPipeline.__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/pr_636/en/api/schedulers#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator</a> to make generation
deterministic.`,name:"generator"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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.StableDiffusionInpaintPipeline.__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/pr_636/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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.StableDiffusionInpaintPipeline.__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"}],source:"https://github.com/huggingface/diffusers/blob/vr_636/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L148",returnDescription:`
<p><a
  href="/docs/diffusers/pr_636/en/api/pipelines/stable_diffusion#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/pr_636/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),Ye=new w({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionInpaintPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.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
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/vr_636/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L121"}}),je=new w({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionInpaintPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_636/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L140"}}),{c(){z=n("meta"),fi=f(),U=n("h1"),R=n("a"),yt=n("span"),u(re.$$.fragment),Yi=f(),It=n("span"),ji=r("Stable diffusion pipelines"),di=f(),I=n("p"),Ji=r("Stable Diffusion is a text-to-image "),wt=n("em"),Qi=r("latent diffusion"),Xi=r(" model created by the researchers and engineers from "),le=n("a"),Zi=r("CompVis"),en=r(", "),fe=n("a"),tn=r("Stability AI"),nn=r(" and "),de=n("a"),on=r("LAION"),sn=r(". It\u2019s trained on 512x512 images from a subset of the "),ce=n("a"),an=r("LAION-5B"),rn=r(" dataset. This model uses a frozen CLIP ViT-L/14 text encoder to condition the model on text prompts. With its 860M UNet and 123M text encoder, the model is relatively lightweight and can run on consumer GPUs."),ci=f(),C=n("p"),ln=r("Latent diffusion is the research on top of which Stable Diffusion was built. It was proposed in "),pe=n("a"),fn=r("High-Resolution Image Synthesis with Latent Diffusion Models"),dn=r(" by Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, Bj\xF6rn Ommer. You can learn more details about it in the "),Qe=n("a"),cn=r("specific pipeline for latent diffusion"),pn=r(" that is part of \u{1F917} Diffusers."),pi=f(),M=n("p"),un=r("For more details about how Stable Diffusion works and how it differs from the base latent diffusion model, please refer to the official "),ue=n("a"),hn=r("launch announcement post"),mn=r(" and "),he=n("a"),gn=r("this section of our own blog post"),_n=r("."),ui=f(),me=n("p"),Pt=n("em"),bn=r("Tips"),vn=r(":"),hi=f(),Xe=n("ul"),Ze=n("li"),Dn=r("To tweak your prompts on a specific result you liked, you can generate your own latents, as demonstrated in the following notebook: "),ge=n("a"),et=n("img"),mi=f(),_e=n("p"),St=n("em"),yn=r("Overview"),In=r(":"),gi=f(),B=n("table"),xt=n("thead"),E=n("tr"),kt=n("th"),wn=r("Pipeline"),Pn=f(),Et=n("th"),Sn=r("Tasks"),xn=f(),tt=n("th"),kn=r("Colab"),En=f(),it=n("th"),$n=r("Demo"),Tn=f(),G=n("tbody"),$=n("tr"),$t=n("td"),be=n("a"),Ln=r("pipeline_stable_diffusion.py"),Cn=f(),Tt=n("td"),Lt=n("em"),Mn=r("Text-to-Image Generation"),An=f(),nt=n("td"),ve=n("a"),ot=n("img"),On=f(),st=n("td"),De=n("a"),Nn=r("\u{1F917} Stable Diffusion"),zn=f(),T=n("tr"),Ct=n("td"),ye=n("a"),Un=r("pipeline_stable_diffusion_img2img.py"),Gn=f(),Mt=n("td"),At=n("em"),qn=r("Image-to-Image Text-Guided Generation"),Fn=f(),at=n("td"),Ie=n("a"),rt=n("img"),Vn=f(),lt=n("td"),we=n("a"),Wn=r("\u{1F917} Diffuse the Rest"),Hn=f(),L=n("tr"),Ot=n("td"),Pe=n("a"),Rn=r("pipeline_stable_diffusion_inpaint.py"),Bn=f(),Se=n("td"),Nt=n("strong"),Kn=r("Experimental"),Yn=r(" \u2013 "),zt=n("em"),jn=r("Text-Guided Image Inpainting"),Jn=f(),ft=n("td"),xe=n("a"),dt=n("img"),Qn=f(),ct=n("td"),Xn=r("Coming soon"),_i=f(),q=n("h2"),K=n("a"),Ut=n("span"),u(ke.$$.fragment),Zn=f(),Gt=n("span"),eo=r("StableDiffusionPipelineOutput"),bi=f(),F=n("div"),u(Ee.$$.fragment),to=f(),qt=n("p"),io=r("Output class for Stable Diffusion pipelines."),vi=f(),V=n("h2"),Y=n("a"),Ft=n("span"),u($e.$$.fragment),no=f(),Vt=n("span"),oo=r("StableDiffusionPipeline"),Di=f(),v=n("div"),u(Te.$$.fragment),so=f(),Wt=n("p"),ao=r("Pipeline for text-to-image generation using Stable Diffusion."),ro=f(),Le=n("p"),lo=r("This model inherits from "),pt=n("a"),fo=r("DiffusionPipeline"),co=r(`. 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.)`),po=f(),j=n("div"),u(Ce.$$.fragment),uo=f(),Ht=n("p"),ho=r("Function invoked when calling the pipeline for generation."),mo=f(),A=n("div"),u(Me.$$.fragment),go=f(),Rt=n("p"),_o=r("Enable sliced attention computation."),bo=f(),Bt=n("p"),vo=r(`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.`),Do=f(),J=n("div"),u(Ae.$$.fragment),yo=f(),Oe=n("p"),Io=r("Disable sliced attention computation. If "),Kt=n("code"),wo=r("enable_attention_slicing"),Po=r(` was previously invoked, this method will go
back to computing attention in one step.`),yi=f(),W=n("h2"),Q=n("a"),Yt=n("span"),u(Ne.$$.fragment),So=f(),jt=n("span"),xo=r("StableDiffusionImg2ImgPipeline"),Ii=f(),D=n("div"),u(ze.$$.fragment),ko=f(),Jt=n("p"),Eo=r("Pipeline for text-guided image to image generation using Stable Diffusion."),$o=f(),Ue=n("p"),To=r("This model inherits from "),ut=n("a"),Lo=r("DiffusionPipeline"),Co=r(`. 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.)`),Mo=f(),X=n("div"),u(Ge.$$.fragment),Ao=f(),Qt=n("p"),Oo=r("Function invoked when calling the pipeline for generation."),No=f(),O=n("div"),u(qe.$$.fragment),zo=f(),Xt=n("p"),Uo=r("Enable sliced attention computation."),Go=f(),Zt=n("p"),qo=r(`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.`),Fo=f(),Z=n("div"),u(Fe.$$.fragment),Vo=f(),Ve=n("p"),Wo=r("Disable sliced attention computation. If "),ei=n("code"),Ho=r("enable_attention_slicing"),Ro=r(` was previously invoked, this method will go
back to computing attention in one step.`),wi=f(),H=n("h2"),ee=n("a"),ti=n("span"),u(We.$$.fragment),Bo=f(),ii=n("span"),Ko=r("StableDiffusionInpaintPipeline"),Pi=f(),y=n("div"),u(He.$$.fragment),Yo=f(),Re=n("p"),jo=r("Pipeline for text-guided image inpainting using Stable Diffusion. "),ni=n("em"),Jo=r("This is an experimental feature"),Qo=r("."),Xo=f(),Be=n("p"),Zo=r("This model inherits from "),ht=n("a"),es=r("DiffusionPipeline"),ts=r(`. 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.)`),is=f(),te=n("div"),u(Ke.$$.fragment),ns=f(),oi=n("p"),os=r("Function invoked when calling the pipeline for generation."),ss=f(),N=n("div"),u(Ye.$$.fragment),as=f(),si=n("p"),rs=r("Enable sliced attention computation."),ls=f(),ai=n("p"),fs=r(`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.`),ds=f(),ie=n("div"),u(je.$$.fragment),cs=f(),Je=n("p"),ps=r("Disable sliced attention computation. If "),ri=n("code"),us=r("enable_attention_slicing"),hs=r(` was previously invoked, this method will go
back to computing attention in one step.`),this.h()},l(i){const c=Ka('[data-svelte="svelte-1phssyn"]',document.head);z=o(c,"META",{name:!0,content:!0}),c.forEach(t),fi=d(i),U=o(i,"H1",{class:!0});var xi=s(U);R=o(xi,"A",{id:!0,class:!0,href:!0});var ws=s(R);yt=o(ws,"SPAN",{});var Ps=s(yt);h(re.$$.fragment,Ps),Ps.forEach(t),ws.forEach(t),Yi=d(xi),It=o(xi,"SPAN",{});var Ss=s(It);ji=l(Ss,"Stable diffusion pipelines"),Ss.forEach(t),xi.forEach(t),di=d(i),I=o(i,"P",{});var P=s(I);Ji=l(P,"Stable Diffusion is a text-to-image "),wt=o(P,"EM",{});var xs=s(wt);Qi=l(xs,"latent diffusion"),xs.forEach(t),Xi=l(P," model created by the researchers and engineers from "),le=o(P,"A",{href:!0,rel:!0});var ks=s(le);Zi=l(ks,"CompVis"),ks.forEach(t),en=l(P,", "),fe=o(P,"A",{href:!0,rel:!0});var Es=s(fe);tn=l(Es,"Stability AI"),Es.forEach(t),nn=l(P," and "),de=o(P,"A",{href:!0,rel:!0});var $s=s(de);on=l($s,"LAION"),$s.forEach(t),sn=l(P,". It\u2019s trained on 512x512 images from a subset of the "),ce=o(P,"A",{href:!0,rel:!0});var Ts=s(ce);an=l(Ts,"LAION-5B"),Ts.forEach(t),rn=l(P," dataset. This model uses a frozen CLIP ViT-L/14 text encoder to condition the model on text prompts. With its 860M UNet and 123M text encoder, the model is relatively lightweight and can run on consumer GPUs."),P.forEach(t),ci=d(i),C=o(i,"P",{});var mt=s(C);ln=l(mt,"Latent diffusion is the research on top of which Stable Diffusion was built. It was proposed in "),pe=o(mt,"A",{href:!0,rel:!0});var Ls=s(pe);fn=l(Ls,"High-Resolution Image Synthesis with Latent Diffusion Models"),Ls.forEach(t),dn=l(mt," by Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, Bj\xF6rn Ommer. You can learn more details about it in the "),Qe=o(mt,"A",{href:!0});var Cs=s(Qe);cn=l(Cs,"specific pipeline for latent diffusion"),Cs.forEach(t),pn=l(mt," that is part of \u{1F917} Diffusers."),mt.forEach(t),pi=d(i),M=o(i,"P",{});var gt=s(M);un=l(gt,"For more details about how Stable Diffusion works and how it differs from the base latent diffusion model, please refer to the official "),ue=o(gt,"A",{href:!0,rel:!0});var Ms=s(ue);hn=l(Ms,"launch announcement post"),Ms.forEach(t),mn=l(gt," and "),he=o(gt,"A",{href:!0,rel:!0});var As=s(he);gn=l(As,"this section of our own blog post"),As.forEach(t),_n=l(gt,"."),gt.forEach(t),ui=d(i),me=o(i,"P",{});var ms=s(me);Pt=o(ms,"EM",{});var Os=s(Pt);bn=l(Os,"Tips"),Os.forEach(t),vn=l(ms,":"),ms.forEach(t),hi=d(i),Xe=o(i,"UL",{});var Ns=s(Xe);Ze=o(Ns,"LI",{});var gs=s(Ze);Dn=l(gs,"To tweak your prompts on a specific result you liked, you can generate your own latents, as demonstrated in the following notebook: "),ge=o(gs,"A",{href:!0,rel:!0});var zs=s(ge);et=o(zs,"IMG",{src:!0,alt:!0}),zs.forEach(t),gs.forEach(t),Ns.forEach(t),mi=d(i),_e=o(i,"P",{});var _s=s(_e);St=o(_s,"EM",{});var Us=s(St);yn=l(Us,"Overview"),Us.forEach(t),In=l(_s,":"),_s.forEach(t),gi=d(i),B=o(i,"TABLE",{});var ki=s(B);xt=o(ki,"THEAD",{});var Gs=s(xt);E=o(Gs,"TR",{});var ne=s(E);kt=o(ne,"TH",{});var qs=s(kt);wn=l(qs,"Pipeline"),qs.forEach(t),Pn=d(ne),Et=o(ne,"TH",{});var Fs=s(Et);Sn=l(Fs,"Tasks"),Fs.forEach(t),xn=d(ne),tt=o(ne,"TH",{align:!0});var Vs=s(tt);kn=l(Vs,"Colab"),Vs.forEach(t),En=d(ne),it=o(ne,"TH",{align:!0});var Ws=s(it);$n=l(Ws,"Demo"),Ws.forEach(t),ne.forEach(t),Gs.forEach(t),Tn=d(ki),G=o(ki,"TBODY",{});var _t=s(G);$=o(_t,"TR",{});var oe=s($);$t=o(oe,"TD",{});var Hs=s($t);be=o(Hs,"A",{href:!0,rel:!0});var Rs=s(be);Ln=l(Rs,"pipeline_stable_diffusion.py"),Rs.forEach(t),Hs.forEach(t),Cn=d(oe),Tt=o(oe,"TD",{});var Bs=s(Tt);Lt=o(Bs,"EM",{});var Ks=s(Lt);Mn=l(Ks,"Text-to-Image Generation"),Ks.forEach(t),Bs.forEach(t),An=d(oe),nt=o(oe,"TD",{align:!0});var Ys=s(nt);ve=o(Ys,"A",{href:!0,rel:!0});var js=s(ve);ot=o(js,"IMG",{src:!0,alt:!0}),js.forEach(t),Ys.forEach(t),On=d(oe),st=o(oe,"TD",{align:!0});var Js=s(st);De=o(Js,"A",{href:!0,rel:!0});var Qs=s(De);Nn=l(Qs,"\u{1F917} Stable Diffusion"),Qs.forEach(t),Js.forEach(t),oe.forEach(t),zn=d(_t),T=o(_t,"TR",{});var se=s(T);Ct=o(se,"TD",{});var Xs=s(Ct);ye=o(Xs,"A",{href:!0,rel:!0});var Zs=s(ye);Un=l(Zs,"pipeline_stable_diffusion_img2img.py"),Zs.forEach(t),Xs.forEach(t),Gn=d(se),Mt=o(se,"TD",{});var ea=s(Mt);At=o(ea,"EM",{});var ta=s(At);qn=l(ta,"Image-to-Image Text-Guided Generation"),ta.forEach(t),ea.forEach(t),Fn=d(se),at=o(se,"TD",{align:!0});var ia=s(at);Ie=o(ia,"A",{href:!0,rel:!0});var na=s(Ie);rt=o(na,"IMG",{src:!0,alt:!0}),na.forEach(t),ia.forEach(t),Vn=d(se),lt=o(se,"TD",{align:!0});var oa=s(lt);we=o(oa,"A",{href:!0,rel:!0});var sa=s(we);Wn=l(sa,"\u{1F917} Diffuse the Rest"),sa.forEach(t),oa.forEach(t),se.forEach(t),Hn=d(_t),L=o(_t,"TR",{});var ae=s(L);Ot=o(ae,"TD",{});var aa=s(Ot);Pe=o(aa,"A",{href:!0,rel:!0});var ra=s(Pe);Rn=l(ra,"pipeline_stable_diffusion_inpaint.py"),ra.forEach(t),aa.forEach(t),Bn=d(ae),Se=o(ae,"TD",{});var Ei=s(Se);Nt=o(Ei,"STRONG",{});var la=s(Nt);Kn=l(la,"Experimental"),la.forEach(t),Yn=l(Ei," \u2013 "),zt=o(Ei,"EM",{});var fa=s(zt);jn=l(fa,"Text-Guided Image Inpainting"),fa.forEach(t),Ei.forEach(t),Jn=d(ae),ft=o(ae,"TD",{align:!0});var da=s(ft);xe=o(da,"A",{href:!0,rel:!0});var ca=s(xe);dt=o(ca,"IMG",{src:!0,alt:!0}),ca.forEach(t),da.forEach(t),Qn=d(ae),ct=o(ae,"TD",{align:!0});var pa=s(ct);Xn=l(pa,"Coming soon"),pa.forEach(t),ae.forEach(t),_t.forEach(t),ki.forEach(t),_i=d(i),q=o(i,"H2",{class:!0});var $i=s(q);K=o($i,"A",{id:!0,class:!0,href:!0});var ua=s(K);Ut=o(ua,"SPAN",{});var ha=s(Ut);h(ke.$$.fragment,ha),ha.forEach(t),ua.forEach(t),Zn=d($i),Gt=o($i,"SPAN",{});var ma=s(Gt);eo=l(ma,"StableDiffusionPipelineOutput"),ma.forEach(t),$i.forEach(t),bi=d(i),F=o(i,"DIV",{class:!0});var Ti=s(F);h(Ee.$$.fragment,Ti),to=d(Ti),qt=o(Ti,"P",{});var ga=s(qt);io=l(ga,"Output class for Stable Diffusion pipelines."),ga.forEach(t),Ti.forEach(t),vi=d(i),V=o(i,"H2",{class:!0});var Li=s(V);Y=o(Li,"A",{id:!0,class:!0,href:!0});var _a=s(Y);Ft=o(_a,"SPAN",{});var ba=s(Ft);h($e.$$.fragment,ba),ba.forEach(t),_a.forEach(t),no=d(Li),Vt=o(Li,"SPAN",{});var va=s(Vt);oo=l(va,"StableDiffusionPipeline"),va.forEach(t),Li.forEach(t),Di=d(i),v=o(i,"DIV",{class:!0});var S=s(v);h(Te.$$.fragment,S),so=d(S),Wt=o(S,"P",{});var Da=s(Wt);ao=l(Da,"Pipeline for text-to-image generation using Stable Diffusion."),Da.forEach(t),ro=d(S),Le=o(S,"P",{});var Ci=s(Le);lo=l(Ci,"This model inherits from "),pt=o(Ci,"A",{href:!0});var ya=s(pt);fo=l(ya,"DiffusionPipeline"),ya.forEach(t),co=l(Ci,`. 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.)`),Ci.forEach(t),po=d(S),j=o(S,"DIV",{class:!0});var Mi=s(j);h(Ce.$$.fragment,Mi),uo=d(Mi),Ht=o(Mi,"P",{});var Ia=s(Ht);ho=l(Ia,"Function invoked when calling the pipeline for generation."),Ia.forEach(t),Mi.forEach(t),mo=d(S),A=o(S,"DIV",{class:!0});var bt=s(A);h(Me.$$.fragment,bt),go=d(bt),Rt=o(bt,"P",{});var wa=s(Rt);_o=l(wa,"Enable sliced attention computation."),wa.forEach(t),bo=d(bt),Bt=o(bt,"P",{});var Pa=s(Bt);vo=l(Pa,`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.`),Pa.forEach(t),bt.forEach(t),Do=d(S),J=o(S,"DIV",{class:!0});var Ai=s(J);h(Ae.$$.fragment,Ai),yo=d(Ai),Oe=o(Ai,"P",{});var Oi=s(Oe);Io=l(Oi,"Disable sliced attention computation. If "),Kt=o(Oi,"CODE",{});var Sa=s(Kt);wo=l(Sa,"enable_attention_slicing"),Sa.forEach(t),Po=l(Oi,` was previously invoked, this method will go
back to computing attention in one step.`),Oi.forEach(t),Ai.forEach(t),S.forEach(t),yi=d(i),W=o(i,"H2",{class:!0});var Ni=s(W);Q=o(Ni,"A",{id:!0,class:!0,href:!0});var xa=s(Q);Yt=o(xa,"SPAN",{});var ka=s(Yt);h(Ne.$$.fragment,ka),ka.forEach(t),xa.forEach(t),So=d(Ni),jt=o(Ni,"SPAN",{});var Ea=s(jt);xo=l(Ea,"StableDiffusionImg2ImgPipeline"),Ea.forEach(t),Ni.forEach(t),Ii=d(i),D=o(i,"DIV",{class:!0});var x=s(D);h(ze.$$.fragment,x),ko=d(x),Jt=o(x,"P",{});var $a=s(Jt);Eo=l($a,"Pipeline for text-guided image to image generation using Stable Diffusion."),$a.forEach(t),$o=d(x),Ue=o(x,"P",{});var zi=s(Ue);To=l(zi,"This model inherits from "),ut=o(zi,"A",{href:!0});var Ta=s(ut);Lo=l(Ta,"DiffusionPipeline"),Ta.forEach(t),Co=l(zi,`. 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.)`),zi.forEach(t),Mo=d(x),X=o(x,"DIV",{class:!0});var Ui=s(X);h(Ge.$$.fragment,Ui),Ao=d(Ui),Qt=o(Ui,"P",{});var La=s(Qt);Oo=l(La,"Function invoked when calling the pipeline for generation."),La.forEach(t),Ui.forEach(t),No=d(x),O=o(x,"DIV",{class:!0});var vt=s(O);h(qe.$$.fragment,vt),zo=d(vt),Xt=o(vt,"P",{});var Ca=s(Xt);Uo=l(Ca,"Enable sliced attention computation."),Ca.forEach(t),Go=d(vt),Zt=o(vt,"P",{});var Ma=s(Zt);qo=l(Ma,`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.`),Ma.forEach(t),vt.forEach(t),Fo=d(x),Z=o(x,"DIV",{class:!0});var Gi=s(Z);h(Fe.$$.fragment,Gi),Vo=d(Gi),Ve=o(Gi,"P",{});var qi=s(Ve);Wo=l(qi,"Disable sliced attention computation. If "),ei=o(qi,"CODE",{});var Aa=s(ei);Ho=l(Aa,"enable_attention_slicing"),Aa.forEach(t),Ro=l(qi,` was previously invoked, this method will go
back to computing attention in one step.`),qi.forEach(t),Gi.forEach(t),x.forEach(t),wi=d(i),H=o(i,"H2",{class:!0});var Fi=s(H);ee=o(Fi,"A",{id:!0,class:!0,href:!0});var Oa=s(ee);ti=o(Oa,"SPAN",{});var Na=s(ti);h(We.$$.fragment,Na),Na.forEach(t),Oa.forEach(t),Bo=d(Fi),ii=o(Fi,"SPAN",{});var za=s(ii);Ko=l(za,"StableDiffusionInpaintPipeline"),za.forEach(t),Fi.forEach(t),Pi=d(i),y=o(i,"DIV",{class:!0});var k=s(y);h(He.$$.fragment,k),Yo=d(k),Re=o(k,"P",{});var Vi=s(Re);jo=l(Vi,"Pipeline for text-guided image inpainting using Stable Diffusion. "),ni=o(Vi,"EM",{});var Ua=s(ni);Jo=l(Ua,"This is an experimental feature"),Ua.forEach(t),Qo=l(Vi,"."),Vi.forEach(t),Xo=d(k),Be=o(k,"P",{});var Wi=s(Be);Zo=l(Wi,"This model inherits from "),ht=o(Wi,"A",{href:!0});var Ga=s(ht);es=l(Ga,"DiffusionPipeline"),Ga.forEach(t),ts=l(Wi,`. 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.)`),Wi.forEach(t),is=d(k),te=o(k,"DIV",{class:!0});var Hi=s(te);h(Ke.$$.fragment,Hi),ns=d(Hi),oi=o(Hi,"P",{});var qa=s(oi);os=l(qa,"Function invoked when calling the pipeline for generation."),qa.forEach(t),Hi.forEach(t),ss=d(k),N=o(k,"DIV",{class:!0});var Dt=s(N);h(Ye.$$.fragment,Dt),as=d(Dt),si=o(Dt,"P",{});var Fa=s(si);rs=l(Fa,"Enable sliced attention computation."),Fa.forEach(t),ls=d(Dt),ai=o(Dt,"P",{});var Va=s(ai);fs=l(Va,`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.`),Va.forEach(t),Dt.forEach(t),ds=d(k),ie=o(k,"DIV",{class:!0});var Ri=s(ie);h(je.$$.fragment,Ri),cs=d(Ri),Je=o(Ri,"P",{});var Bi=s(Je);ps=l(Bi,"Disable sliced attention computation. If "),ri=o(Bi,"CODE",{});var Wa=s(ri);us=l(Wa,"enable_attention_slicing"),Wa.forEach(t),hs=l(Bi,` was previously invoked, this method will go
back to computing attention in one step.`),Bi.forEach(t),Ri.forEach(t),k.forEach(t),this.h()},h(){a(z,"name","hf:doc:metadata"),a(z,"content",JSON.stringify(Qa)),a(R,"id","stable-diffusion-pipelines"),a(R,"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"),a(R,"href","#stable-diffusion-pipelines"),a(U,"class","relative group"),a(le,"href","https://github.com/CompVis"),a(le,"rel","nofollow"),a(fe,"href","https://stability.ai/"),a(fe,"rel","nofollow"),a(de,"href","https://laion.ai/"),a(de,"rel","nofollow"),a(ce,"href","https://laion.ai/blog/laion-5b/"),a(ce,"rel","nofollow"),a(pe,"href","https://arxiv.org/abs/2112.10752"),a(pe,"rel","nofollow"),a(Qe,"href","pipelines/latent_diffusion"),a(ue,"href","https://stability.ai/blog/stable-diffusion-announcement"),a(ue,"rel","nofollow"),a(he,"href","https://huggingface.co/blog/stable_diffusion#how-does-stable-diffusion-work"),a(he,"rel","nofollow"),Ki(et.src,vs="https://colab.research.google.com/assets/colab-badge.svg")||a(et,"src",vs),a(et,"alt","Open In Colab"),a(ge,"href","https://colab.research.google.com/github/pcuenca/diffusers-examples/blob/main/notebooks/stable-diffusion-seeds.ipynb"),a(ge,"rel","nofollow"),a(tt,"align","center"),a(it,"align","center"),a(be,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py"),a(be,"rel","nofollow"),Ki(ot.src,Ds="https://colab.research.google.com/assets/colab-badge.svg")||a(ot,"src",Ds),a(ot,"alt","Open In Colab"),a(ve,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/stable_diffusion.ipynb"),a(ve,"rel","nofollow"),a(nt,"align","center"),a(De,"href","https://huggingface.co/spaces/stabilityai/stable-diffusion"),a(De,"rel","nofollow"),a(st,"align","center"),a(ye,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py"),a(ye,"rel","nofollow"),Ki(rt.src,ys="https://colab.research.google.com/assets/colab-badge.svg")||a(rt,"src",ys),a(rt,"alt","Open In Colab"),a(Ie,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/image_2_image_using_diffusers.ipynb"),a(Ie,"rel","nofollow"),a(at,"align","center"),a(we,"href","https://huggingface.co/spaces/huggingface/diffuse-the-rest"),a(we,"rel","nofollow"),a(lt,"align","center"),a(Pe,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py"),a(Pe,"rel","nofollow"),Ki(dt.src,Is="https://colab.research.google.com/assets/colab-badge.svg")||a(dt,"src",Is),a(dt,"alt","Open In Colab"),a(xe,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb"),a(xe,"rel","nofollow"),a(ft,"align","center"),a(ct,"align","center"),a(K,"id","diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),a(K,"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"),a(K,"href","#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),a(q,"class","relative group"),a(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Y,"id","diffusers.StableDiffusionPipeline"),a(Y,"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"),a(Y,"href","#diffusers.StableDiffusionPipeline"),a(V,"class","relative group"),a(pt,"href","/docs/diffusers/pr_636/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),a(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Q,"id","diffusers.StableDiffusionImg2ImgPipeline"),a(Q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),a(Q,"href","#diffusers.StableDiffusionImg2ImgPipeline"),a(W,"class","relative group"),a(ut,"href","/docs/diffusers/pr_636/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),a(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(ee,"id","diffusers.StableDiffusionInpaintPipeline"),a(ee,"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"),a(ee,"href","#diffusers.StableDiffusionInpaintPipeline"),a(H,"class","relative group"),a(ht,"href","/docs/diffusers/pr_636/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),a(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(i,c){e(document.head,z),p(i,fi,c),p(i,U,c),e(U,R),e(R,yt),m(re,yt,null),e(U,Yi),e(U,It),e(It,ji),p(i,di,c),p(i,I,c),e(I,Ji),e(I,wt),e(wt,Qi),e(I,Xi),e(I,le),e(le,Zi),e(I,en),e(I,fe),e(fe,tn),e(I,nn),e(I,de),e(de,on),e(I,sn),e(I,ce),e(ce,an),e(I,rn),p(i,ci,c),p(i,C,c),e(C,ln),e(C,pe),e(pe,fn),e(C,dn),e(C,Qe),e(Qe,cn),e(C,pn),p(i,pi,c),p(i,M,c),e(M,un),e(M,ue),e(ue,hn),e(M,mn),e(M,he),e(he,gn),e(M,_n),p(i,ui,c),p(i,me,c),e(me,Pt),e(Pt,bn),e(me,vn),p(i,hi,c),p(i,Xe,c),e(Xe,Ze),e(Ze,Dn),e(Ze,ge),e(ge,et),p(i,mi,c),p(i,_e,c),e(_e,St),e(St,yn),e(_e,In),p(i,gi,c),p(i,B,c),e(B,xt),e(xt,E),e(E,kt),e(kt,wn),e(E,Pn),e(E,Et),e(Et,Sn),e(E,xn),e(E,tt),e(tt,kn),e(E,En),e(E,it),e(it,$n),e(B,Tn),e(B,G),e(G,$),e($,$t),e($t,be),e(be,Ln),e($,Cn),e($,Tt),e(Tt,Lt),e(Lt,Mn),e($,An),e($,nt),e(nt,ve),e(ve,ot),e($,On),e($,st),e(st,De),e(De,Nn),e(G,zn),e(G,T),e(T,Ct),e(Ct,ye),e(ye,Un),e(T,Gn),e(T,Mt),e(Mt,At),e(At,qn),e(T,Fn),e(T,at),e(at,Ie),e(Ie,rt),e(T,Vn),e(T,lt),e(lt,we),e(we,Wn),e(G,Hn),e(G,L),e(L,Ot),e(Ot,Pe),e(Pe,Rn),e(L,Bn),e(L,Se),e(Se,Nt),e(Nt,Kn),e(Se,Yn),e(Se,zt),e(zt,jn),e(L,Jn),e(L,ft),e(ft,xe),e(xe,dt),e(L,Qn),e(L,ct),e(ct,Xn),p(i,_i,c),p(i,q,c),e(q,K),e(K,Ut),m(ke,Ut,null),e(q,Zn),e(q,Gt),e(Gt,eo),p(i,bi,c),p(i,F,c),m(Ee,F,null),e(F,to),e(F,qt),e(qt,io),p(i,vi,c),p(i,V,c),e(V,Y),e(Y,Ft),m($e,Ft,null),e(V,no),e(V,Vt),e(Vt,oo),p(i,Di,c),p(i,v,c),m(Te,v,null),e(v,so),e(v,Wt),e(Wt,ao),e(v,ro),e(v,Le),e(Le,lo),e(Le,pt),e(pt,fo),e(Le,co),e(v,po),e(v,j),m(Ce,j,null),e(j,uo),e(j,Ht),e(Ht,ho),e(v,mo),e(v,A),m(Me,A,null),e(A,go),e(A,Rt),e(Rt,_o),e(A,bo),e(A,Bt),e(Bt,vo),e(v,Do),e(v,J),m(Ae,J,null),e(J,yo),e(J,Oe),e(Oe,Io),e(Oe,Kt),e(Kt,wo),e(Oe,Po),p(i,yi,c),p(i,W,c),e(W,Q),e(Q,Yt),m(Ne,Yt,null),e(W,So),e(W,jt),e(jt,xo),p(i,Ii,c),p(i,D,c),m(ze,D,null),e(D,ko),e(D,Jt),e(Jt,Eo),e(D,$o),e(D,Ue),e(Ue,To),e(Ue,ut),e(ut,Lo),e(Ue,Co),e(D,Mo),e(D,X),m(Ge,X,null),e(X,Ao),e(X,Qt),e(Qt,Oo),e(D,No),e(D,O),m(qe,O,null),e(O,zo),e(O,Xt),e(Xt,Uo),e(O,Go),e(O,Zt),e(Zt,qo),e(D,Fo),e(D,Z),m(Fe,Z,null),e(Z,Vo),e(Z,Ve),e(Ve,Wo),e(Ve,ei),e(ei,Ho),e(Ve,Ro),p(i,wi,c),p(i,H,c),e(H,ee),e(ee,ti),m(We,ti,null),e(H,Bo),e(H,ii),e(ii,Ko),p(i,Pi,c),p(i,y,c),m(He,y,null),e(y,Yo),e(y,Re),e(Re,jo),e(Re,ni),e(ni,Jo),e(Re,Qo),e(y,Xo),e(y,Be),e(Be,Zo),e(Be,ht),e(ht,es),e(Be,ts),e(y,is),e(y,te),m(Ke,te,null),e(te,ns),e(te,oi),e(oi,os),e(y,ss),e(y,N),m(Ye,N,null),e(N,as),e(N,si),e(si,rs),e(N,ls),e(N,ai),e(ai,fs),e(y,ds),e(y,ie),m(je,ie,null),e(ie,cs),e(ie,Je),e(Je,ps),e(Je,ri),e(ri,us),e(Je,hs),Si=!0},p:Ya,i(i){Si||(g(re.$$.fragment,i),g(ke.$$.fragment,i),g(Ee.$$.fragment,i),g($e.$$.fragment,i),g(Te.$$.fragment,i),g(Ce.$$.fragment,i),g(Me.$$.fragment,i),g(Ae.$$.fragment,i),g(Ne.$$.fragment,i),g(ze.$$.fragment,i),g(Ge.$$.fragment,i),g(qe.$$.fragment,i),g(Fe.$$.fragment,i),g(We.$$.fragment,i),g(He.$$.fragment,i),g(Ke.$$.fragment,i),g(Ye.$$.fragment,i),g(je.$$.fragment,i),Si=!0)},o(i){_(re.$$.fragment,i),_(ke.$$.fragment,i),_(Ee.$$.fragment,i),_($e.$$.fragment,i),_(Te.$$.fragment,i),_(Ce.$$.fragment,i),_(Me.$$.fragment,i),_(Ae.$$.fragment,i),_(Ne.$$.fragment,i),_(ze.$$.fragment,i),_(Ge.$$.fragment,i),_(qe.$$.fragment,i),_(Fe.$$.fragment,i),_(We.$$.fragment,i),_(He.$$.fragment,i),_(Ke.$$.fragment,i),_(Ye.$$.fragment,i),_(je.$$.fragment,i),Si=!1},d(i){t(z),i&&t(fi),i&&t(U),b(re),i&&t(di),i&&t(I),i&&t(ci),i&&t(C),i&&t(pi),i&&t(M),i&&t(ui),i&&t(me),i&&t(hi),i&&t(Xe),i&&t(mi),i&&t(_e),i&&t(gi),i&&t(B),i&&t(_i),i&&t(q),b(ke),i&&t(bi),i&&t(F),b(Ee),i&&t(vi),i&&t(V),b($e),i&&t(Di),i&&t(v),b(Te),b(Ce),b(Me),b(Ae),i&&t(yi),i&&t(W),b(Ne),i&&t(Ii),i&&t(D),b(ze),b(Ge),b(qe),b(Fe),i&&t(wi),i&&t(H),b(We),i&&t(Pi),i&&t(y),b(He),b(Ke),b(Ye),b(je)}}}const Qa={local:"stable-diffusion-pipelines",sections:[{local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",title:"StableDiffusionPipelineOutput"},{local:"diffusers.StableDiffusionPipeline",title:"StableDiffusionPipeline"},{local:"diffusers.StableDiffusionImg2ImgPipeline",title:"StableDiffusionImg2ImgPipeline"},{local:"diffusers.StableDiffusionInpaintPipeline",title:"StableDiffusionInpaintPipeline"}],title:"Stable diffusion pipelines"};function Xa(bs){return ja(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ir extends Ha{constructor(z){super();Ra(this,z,Xa,Ja,Ba,{})}}export{ir as default,Qa as metadata};
