import{S as Hs,i as Rs,s as Bs,e as n,k as f,w as u,t as r,M as Ks,c as o,d as t,m as d,a,x as h,h as l,b as s,N as Ki,G as e,g as p,y as m,L as Ys,q as g,o as _,B as b,v as js}from"../../../chunks/vendor-hf-doc-builder.js";import{D as I}from"../../../chunks/Docstring-hf-doc-builder.js";import{I as li}from"../../../chunks/IconCopyLink-hf-doc-builder.js";function Js(ba){let z,fi,U,R,yt,re,Yi,wt,ji,di,w,Ji,It,Qi,Xi,le,Zi,en,fe,tn,nn,de,on,an,ce,sn,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,va,mi,_e,St,yn,wn,gi,B,xt,E,kt,In,Pn,Et,Sn,xn,tt,kn,En,it,$n,Tn,G,$,$t,be,Ln,Cn,Tt,Lt,Mn,An,nt,ve,ot,Da,On,at,De,Nn,zn,T,Ct,ye,Un,Gn,Mt,At,qn,Fn,st,we,rt,ya,Vn,lt,Ie,Wn,Hn,L,Ot,Pe,Rn,Bn,Se,Nt,Kn,Yn,zt,jn,Jn,ft,xe,dt,wa,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,ao,Wt,so,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,wo,Kt,Io,Po,yi,W,Q,Yt,Ne,So,jt,xo,wi,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,Ii,H,ee,ti,We,Bo,ii,Ko,Pi,y,He,Yo,Re,jo,ni,Jo,Qo,Xo,Be,Zo,ht,ea,ta,ia,te,Ke,na,oi,oa,aa,N,Ye,sa,ai,ra,la,si,fa,da,ie,je,ca,Je,pa,ri,ua,ha,Si;return re=new li({}),ke=new li({}),Ee=new I({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_9/src/diffusers/pipelines/stable_diffusion/__init__.py#L13"}}),$e=new li({}),Te=new I({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_9/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_9/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_9/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_9/en/api/schedulers#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/pr_9/en/api/schedulers#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/pr_9/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_9/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L20"}}),Ce=new I({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_9/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_9/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_9/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L121",returnDescription:`
<p><a
  href="/docs/diffusers/pr_9/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_9/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),Me=new I({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_9/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L94"}}),Ae=new I({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_9/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L113"}}),Ne=new li({}),ze=new I({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_9/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_9/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_9/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_9/en/api/schedulers#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/pr_9/en/api/schedulers#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/pr_9/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_9/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py#L32"}}),Ge=new I({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_9/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_9/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_9/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py#L133",returnDescription:`
<p><a
  href="/docs/diffusers/pr_9/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_9/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),qe=new I({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_9/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py#L106"}}),Fe=new I({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionImg2ImgPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_9/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py#L125"}}),We=new li({}),He=new I({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_9/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_9/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_9/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_9/en/api/schedulers#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/pr_9/en/api/schedulers#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/pr_9/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_9/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L39"}}),Ke=new I({props:{name:"__call__",anchor:"diffusers.StableDiffusionInpaintPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"image",val:": typing.Union[torch.FloatTensor, PIL.Image.Image]"},{name:"mask_image",val:": typing.Union[torch.FloatTensor, PIL.Image.Image]"},{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.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__.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code>) &#x2014;
<code>Image</code>, or tensor representing an image batch which will be inpainted, <em>i.e.</em> parts of the image will
be masked out with <code>mask_image</code> and repainted according to <code>prompt</code>.`,name:"image"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.mask_image",description:`<strong>mask_image</strong> (<code>PIL.Image.Image</code>) &#x2014;
<code>Image</code>, or tensor representing an image batch, to mask <code>image</code>. White pixels in the mask will be
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__.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.StableDiffusionInpaintPipeline.__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.StableDiffusionInpaintPipeline.__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.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_9/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__.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.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_9/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_9/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L140",returnDescription:`
<p><a
  href="/docs/diffusers/pr_9/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_9/en/api/pipelines/stable_diffusion#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),Ye=new I({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_9/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L113"}}),je=new I({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionInpaintPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_9/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L132"}}),{c(){z=n("meta"),fi=f(),U=n("h1"),R=n("a"),yt=n("span"),u(re.$$.fragment),Yi=f(),wt=n("span"),ji=r("Stable diffusion pipelines"),di=f(),w=n("p"),Ji=r("Stable Diffusion is a text-to-image "),It=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"),an=r(". It\u2019s trained on 512x512 images from a subset of the "),ce=n("a"),sn=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"),wn=r(":"),gi=f(),B=n("table"),xt=n("thead"),E=n("tr"),kt=n("th"),In=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(),at=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(),st=n("td"),we=n("a"),rt=n("img"),Vn=f(),lt=n("td"),Ie=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),ao=f(),Wt=n("p"),so=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"),wo=r("Disable sliced attention computation. If "),Kt=n("code"),Io=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"),wi=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.`),Ii=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"),ea=r("DiffusionPipeline"),ta=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.)`),ia=f(),te=n("div"),u(Ke.$$.fragment),na=f(),oi=n("p"),oa=r("Function invoked when calling the pipeline for generation."),aa=f(),N=n("div"),u(Ye.$$.fragment),sa=f(),ai=n("p"),ra=r("Enable sliced attention computation."),la=f(),si=n("p"),fa=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.`),da=f(),ie=n("div"),u(je.$$.fragment),ca=f(),Je=n("p"),pa=r("Disable sliced attention computation. If "),ri=n("code"),ua=r("enable_attention_slicing"),ha=r(` was previously invoked, this method will go
back to computing attention in one step.`),this.h()},l(i){const c=Ks('[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=a(U);R=o(xi,"A",{id:!0,class:!0,href:!0});var Ia=a(R);yt=o(Ia,"SPAN",{});var Pa=a(yt);h(re.$$.fragment,Pa),Pa.forEach(t),Ia.forEach(t),Yi=d(xi),wt=o(xi,"SPAN",{});var Sa=a(wt);ji=l(Sa,"Stable diffusion pipelines"),Sa.forEach(t),xi.forEach(t),di=d(i),w=o(i,"P",{});var P=a(w);Ji=l(P,"Stable Diffusion is a text-to-image "),It=o(P,"EM",{});var xa=a(It);Qi=l(xa,"latent diffusion"),xa.forEach(t),Xi=l(P," model created by the researchers and engineers from "),le=o(P,"A",{href:!0,rel:!0});var ka=a(le);Zi=l(ka,"CompVis"),ka.forEach(t),en=l(P,", "),fe=o(P,"A",{href:!0,rel:!0});var Ea=a(fe);tn=l(Ea,"Stability AI"),Ea.forEach(t),nn=l(P," and "),de=o(P,"A",{href:!0,rel:!0});var $a=a(de);on=l($a,"LAION"),$a.forEach(t),an=l(P,". It\u2019s trained on 512x512 images from a subset of the "),ce=o(P,"A",{href:!0,rel:!0});var Ta=a(ce);sn=l(Ta,"LAION-5B"),Ta.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=a(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 La=a(pe);fn=l(La,"High-Resolution Image Synthesis with Latent Diffusion Models"),La.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 Ca=a(Qe);cn=l(Ca,"specific pipeline for latent diffusion"),Ca.forEach(t),pn=l(mt," that is part of \u{1F917} Diffusers."),mt.forEach(t),pi=d(i),M=o(i,"P",{});var gt=a(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 Ma=a(ue);hn=l(Ma,"launch announcement post"),Ma.forEach(t),mn=l(gt," and "),he=o(gt,"A",{href:!0,rel:!0});var Aa=a(he);gn=l(Aa,"this section of our own blog post"),Aa.forEach(t),_n=l(gt,"."),gt.forEach(t),ui=d(i),me=o(i,"P",{});var ma=a(me);Pt=o(ma,"EM",{});var Oa=a(Pt);bn=l(Oa,"Tips"),Oa.forEach(t),vn=l(ma,":"),ma.forEach(t),hi=d(i),Xe=o(i,"UL",{});var Na=a(Xe);Ze=o(Na,"LI",{});var ga=a(Ze);Dn=l(ga,"To tweak your prompts on a specific result you liked, you can generate your own latents, as demonstrated in the following notebook: "),ge=o(ga,"A",{href:!0,rel:!0});var za=a(ge);et=o(za,"IMG",{src:!0,alt:!0}),za.forEach(t),ga.forEach(t),Na.forEach(t),mi=d(i),_e=o(i,"P",{});var _a=a(_e);St=o(_a,"EM",{});var Ua=a(St);yn=l(Ua,"Overview"),Ua.forEach(t),wn=l(_a,":"),_a.forEach(t),gi=d(i),B=o(i,"TABLE",{});var ki=a(B);xt=o(ki,"THEAD",{});var Ga=a(xt);E=o(Ga,"TR",{});var ne=a(E);kt=o(ne,"TH",{});var qa=a(kt);In=l(qa,"Pipeline"),qa.forEach(t),Pn=d(ne),Et=o(ne,"TH",{});var Fa=a(Et);Sn=l(Fa,"Tasks"),Fa.forEach(t),xn=d(ne),tt=o(ne,"TH",{align:!0});var Va=a(tt);kn=l(Va,"Colab"),Va.forEach(t),En=d(ne),it=o(ne,"TH",{align:!0});var Wa=a(it);$n=l(Wa,"Demo"),Wa.forEach(t),ne.forEach(t),Ga.forEach(t),Tn=d(ki),G=o(ki,"TBODY",{});var _t=a(G);$=o(_t,"TR",{});var oe=a($);$t=o(oe,"TD",{});var Ha=a($t);be=o(Ha,"A",{href:!0,rel:!0});var Ra=a(be);Ln=l(Ra,"pipeline_stable_diffusion.py"),Ra.forEach(t),Ha.forEach(t),Cn=d(oe),Tt=o(oe,"TD",{});var Ba=a(Tt);Lt=o(Ba,"EM",{});var Ka=a(Lt);Mn=l(Ka,"Text-to-Image Generation"),Ka.forEach(t),Ba.forEach(t),An=d(oe),nt=o(oe,"TD",{align:!0});var Ya=a(nt);ve=o(Ya,"A",{href:!0,rel:!0});var ja=a(ve);ot=o(ja,"IMG",{src:!0,alt:!0}),ja.forEach(t),Ya.forEach(t),On=d(oe),at=o(oe,"TD",{align:!0});var Ja=a(at);De=o(Ja,"A",{href:!0,rel:!0});var Qa=a(De);Nn=l(Qa,"\u{1F917} Stable Diffusion"),Qa.forEach(t),Ja.forEach(t),oe.forEach(t),zn=d(_t),T=o(_t,"TR",{});var ae=a(T);Ct=o(ae,"TD",{});var Xa=a(Ct);ye=o(Xa,"A",{href:!0,rel:!0});var Za=a(ye);Un=l(Za,"pipeline_stable_diffusion_img2img.py"),Za.forEach(t),Xa.forEach(t),Gn=d(ae),Mt=o(ae,"TD",{});var es=a(Mt);At=o(es,"EM",{});var ts=a(At);qn=l(ts,"Image-to-Image Text-Guided Generation"),ts.forEach(t),es.forEach(t),Fn=d(ae),st=o(ae,"TD",{align:!0});var is=a(st);we=o(is,"A",{href:!0,rel:!0});var ns=a(we);rt=o(ns,"IMG",{src:!0,alt:!0}),ns.forEach(t),is.forEach(t),Vn=d(ae),lt=o(ae,"TD",{align:!0});var os=a(lt);Ie=o(os,"A",{href:!0,rel:!0});var as=a(Ie);Wn=l(as,"\u{1F917} Diffuse the Rest"),as.forEach(t),os.forEach(t),ae.forEach(t),Hn=d(_t),L=o(_t,"TR",{});var se=a(L);Ot=o(se,"TD",{});var ss=a(Ot);Pe=o(ss,"A",{href:!0,rel:!0});var rs=a(Pe);Rn=l(rs,"pipeline_stable_diffusion_inpaint.py"),rs.forEach(t),ss.forEach(t),Bn=d(se),Se=o(se,"TD",{});var Ei=a(Se);Nt=o(Ei,"STRONG",{});var ls=a(Nt);Kn=l(ls,"Experimental"),ls.forEach(t),Yn=l(Ei," \u2013 "),zt=o(Ei,"EM",{});var fs=a(zt);jn=l(fs,"Text-Guided Image Inpainting"),fs.forEach(t),Ei.forEach(t),Jn=d(se),ft=o(se,"TD",{align:!0});var ds=a(ft);xe=o(ds,"A",{href:!0,rel:!0});var cs=a(xe);dt=o(cs,"IMG",{src:!0,alt:!0}),cs.forEach(t),ds.forEach(t),Qn=d(se),ct=o(se,"TD",{align:!0});var ps=a(ct);Xn=l(ps,"Coming soon"),ps.forEach(t),se.forEach(t),_t.forEach(t),ki.forEach(t),_i=d(i),q=o(i,"H2",{class:!0});var $i=a(q);K=o($i,"A",{id:!0,class:!0,href:!0});var us=a(K);Ut=o(us,"SPAN",{});var hs=a(Ut);h(ke.$$.fragment,hs),hs.forEach(t),us.forEach(t),Zn=d($i),Gt=o($i,"SPAN",{});var ms=a(Gt);eo=l(ms,"StableDiffusionPipelineOutput"),ms.forEach(t),$i.forEach(t),bi=d(i),F=o(i,"DIV",{class:!0});var Ti=a(F);h(Ee.$$.fragment,Ti),to=d(Ti),qt=o(Ti,"P",{});var gs=a(qt);io=l(gs,"Output class for Stable Diffusion pipelines."),gs.forEach(t),Ti.forEach(t),vi=d(i),V=o(i,"H2",{class:!0});var Li=a(V);Y=o(Li,"A",{id:!0,class:!0,href:!0});var _s=a(Y);Ft=o(_s,"SPAN",{});var bs=a(Ft);h($e.$$.fragment,bs),bs.forEach(t),_s.forEach(t),no=d(Li),Vt=o(Li,"SPAN",{});var vs=a(Vt);oo=l(vs,"StableDiffusionPipeline"),vs.forEach(t),Li.forEach(t),Di=d(i),v=o(i,"DIV",{class:!0});var S=a(v);h(Te.$$.fragment,S),ao=d(S),Wt=o(S,"P",{});var Ds=a(Wt);so=l(Ds,"Pipeline for text-to-image generation using Stable Diffusion."),Ds.forEach(t),ro=d(S),Le=o(S,"P",{});var Ci=a(Le);lo=l(Ci,"This model inherits from "),pt=o(Ci,"A",{href:!0});var ys=a(pt);fo=l(ys,"DiffusionPipeline"),ys.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=a(j);h(Ce.$$.fragment,Mi),uo=d(Mi),Ht=o(Mi,"P",{});var ws=a(Ht);ho=l(ws,"Function invoked when calling the pipeline for generation."),ws.forEach(t),Mi.forEach(t),mo=d(S),A=o(S,"DIV",{class:!0});var bt=a(A);h(Me.$$.fragment,bt),go=d(bt),Rt=o(bt,"P",{});var Is=a(Rt);_o=l(Is,"Enable sliced attention computation."),Is.forEach(t),bo=d(bt),Bt=o(bt,"P",{});var Ps=a(Bt);vo=l(Ps,`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.`),Ps.forEach(t),bt.forEach(t),Do=d(S),J=o(S,"DIV",{class:!0});var Ai=a(J);h(Ae.$$.fragment,Ai),yo=d(Ai),Oe=o(Ai,"P",{});var Oi=a(Oe);wo=l(Oi,"Disable sliced attention computation. If "),Kt=o(Oi,"CODE",{});var Ss=a(Kt);Io=l(Ss,"enable_attention_slicing"),Ss.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=a(W);Q=o(Ni,"A",{id:!0,class:!0,href:!0});var xs=a(Q);Yt=o(xs,"SPAN",{});var ks=a(Yt);h(Ne.$$.fragment,ks),ks.forEach(t),xs.forEach(t),So=d(Ni),jt=o(Ni,"SPAN",{});var Es=a(jt);xo=l(Es,"StableDiffusionImg2ImgPipeline"),Es.forEach(t),Ni.forEach(t),wi=d(i),D=o(i,"DIV",{class:!0});var x=a(D);h(ze.$$.fragment,x),ko=d(x),Jt=o(x,"P",{});var $s=a(Jt);Eo=l($s,"Pipeline for text-guided image to image generation using Stable Diffusion."),$s.forEach(t),$o=d(x),Ue=o(x,"P",{});var zi=a(Ue);To=l(zi,"This model inherits from "),ut=o(zi,"A",{href:!0});var Ts=a(ut);Lo=l(Ts,"DiffusionPipeline"),Ts.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=a(X);h(Ge.$$.fragment,Ui),Ao=d(Ui),Qt=o(Ui,"P",{});var Ls=a(Qt);Oo=l(Ls,"Function invoked when calling the pipeline for generation."),Ls.forEach(t),Ui.forEach(t),No=d(x),O=o(x,"DIV",{class:!0});var vt=a(O);h(qe.$$.fragment,vt),zo=d(vt),Xt=o(vt,"P",{});var Cs=a(Xt);Uo=l(Cs,"Enable sliced attention computation."),Cs.forEach(t),Go=d(vt),Zt=o(vt,"P",{});var Ms=a(Zt);qo=l(Ms,`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.`),Ms.forEach(t),vt.forEach(t),Fo=d(x),Z=o(x,"DIV",{class:!0});var Gi=a(Z);h(Fe.$$.fragment,Gi),Vo=d(Gi),Ve=o(Gi,"P",{});var qi=a(Ve);Wo=l(qi,"Disable sliced attention computation. If "),ei=o(qi,"CODE",{});var As=a(ei);Ho=l(As,"enable_attention_slicing"),As.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),Ii=d(i),H=o(i,"H2",{class:!0});var Fi=a(H);ee=o(Fi,"A",{id:!0,class:!0,href:!0});var Os=a(ee);ti=o(Os,"SPAN",{});var Ns=a(ti);h(We.$$.fragment,Ns),Ns.forEach(t),Os.forEach(t),Bo=d(Fi),ii=o(Fi,"SPAN",{});var zs=a(ii);Ko=l(zs,"StableDiffusionInpaintPipeline"),zs.forEach(t),Fi.forEach(t),Pi=d(i),y=o(i,"DIV",{class:!0});var k=a(y);h(He.$$.fragment,k),Yo=d(k),Re=o(k,"P",{});var Vi=a(Re);jo=l(Vi,"Pipeline for text-guided image inpainting using Stable Diffusion. "),ni=o(Vi,"EM",{});var Us=a(ni);Jo=l(Us,"This is an experimental feature"),Us.forEach(t),Qo=l(Vi,"."),Vi.forEach(t),Xo=d(k),Be=o(k,"P",{});var Wi=a(Be);Zo=l(Wi,"This model inherits from "),ht=o(Wi,"A",{href:!0});var Gs=a(ht);ea=l(Gs,"DiffusionPipeline"),Gs.forEach(t),ta=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),ia=d(k),te=o(k,"DIV",{class:!0});var Hi=a(te);h(Ke.$$.fragment,Hi),na=d(Hi),oi=o(Hi,"P",{});var qs=a(oi);oa=l(qs,"Function invoked when calling the pipeline for generation."),qs.forEach(t),Hi.forEach(t),aa=d(k),N=o(k,"DIV",{class:!0});var Dt=a(N);h(Ye.$$.fragment,Dt),sa=d(Dt),ai=o(Dt,"P",{});var Fs=a(ai);ra=l(Fs,"Enable sliced attention computation."),Fs.forEach(t),la=d(Dt),si=o(Dt,"P",{});var Vs=a(si);fa=l(Vs,`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.`),Vs.forEach(t),Dt.forEach(t),da=d(k),ie=o(k,"DIV",{class:!0});var Ri=a(ie);h(je.$$.fragment,Ri),ca=d(Ri),Je=o(Ri,"P",{});var Bi=a(Je);pa=l(Bi,"Disable sliced attention computation. If "),ri=o(Bi,"CODE",{});var Ws=a(ri);ua=l(Ws,"enable_attention_slicing"),Ws.forEach(t),ha=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(){s(z,"name","hf:doc:metadata"),s(z,"content",JSON.stringify(Qs)),s(R,"id","stable-diffusion-pipelines"),s(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"),s(R,"href","#stable-diffusion-pipelines"),s(U,"class","relative group"),s(le,"href","https://github.com/CompVis"),s(le,"rel","nofollow"),s(fe,"href","https://stability.ai/"),s(fe,"rel","nofollow"),s(de,"href","https://laion.ai/"),s(de,"rel","nofollow"),s(ce,"href","https://laion.ai/blog/laion-5b/"),s(ce,"rel","nofollow"),s(pe,"href","https://arxiv.org/abs/2112.10752"),s(pe,"rel","nofollow"),s(Qe,"href","pipelines/latent_diffusion"),s(ue,"href","https://stability.ai/blog/stable-diffusion-announcement"),s(ue,"rel","nofollow"),s(he,"href","https://huggingface.co/blog/stable_diffusion#how-does-stable-diffusion-work"),s(he,"rel","nofollow"),Ki(et.src,va="https://colab.research.google.com/assets/colab-badge.svg")||s(et,"src",va),s(et,"alt","Open In Colab"),s(ge,"href","https://colab.research.google.com/github/pcuenca/diffusers-examples/blob/main/notebooks/stable-diffusion-seeds.ipynb"),s(ge,"rel","nofollow"),s(tt,"align","center"),s(it,"align","center"),s(be,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py"),s(be,"rel","nofollow"),Ki(ot.src,Da="https://colab.research.google.com/assets/colab-badge.svg")||s(ot,"src",Da),s(ot,"alt","Open In Colab"),s(ve,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/stable_diffusion.ipynb"),s(ve,"rel","nofollow"),s(nt,"align","center"),s(De,"href","https://huggingface.co/spaces/stabilityai/stable-diffusion"),s(De,"rel","nofollow"),s(at,"align","center"),s(ye,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py"),s(ye,"rel","nofollow"),Ki(rt.src,ya="https://colab.research.google.com/assets/colab-badge.svg")||s(rt,"src",ya),s(rt,"alt","Open In Colab"),s(we,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/image_2_image_using_diffusers.ipynb"),s(we,"rel","nofollow"),s(st,"align","center"),s(Ie,"href","https://huggingface.co/spaces/huggingface/diffuse-the-rest"),s(Ie,"rel","nofollow"),s(lt,"align","center"),s(Pe,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py"),s(Pe,"rel","nofollow"),Ki(dt.src,wa="https://colab.research.google.com/assets/colab-badge.svg")||s(dt,"src",wa),s(dt,"alt","Open In Colab"),s(xe,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb"),s(xe,"rel","nofollow"),s(ft,"align","center"),s(ct,"align","center"),s(K,"id","diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),s(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"),s(K,"href","#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),s(q,"class","relative group"),s(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(Y,"id","diffusers.StableDiffusionPipeline"),s(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"),s(Y,"href","#diffusers.StableDiffusionPipeline"),s(V,"class","relative group"),s(pt,"href","/docs/diffusers/pr_9/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),s(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(Q,"id","diffusers.StableDiffusionImg2ImgPipeline"),s(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"),s(Q,"href","#diffusers.StableDiffusionImg2ImgPipeline"),s(W,"class","relative group"),s(ut,"href","/docs/diffusers/pr_9/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),s(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(ee,"id","diffusers.StableDiffusionInpaintPipeline"),s(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"),s(ee,"href","#diffusers.StableDiffusionInpaintPipeline"),s(H,"class","relative group"),s(ht,"href","/docs/diffusers/pr_9/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),s(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(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,wt),e(wt,ji),p(i,di,c),p(i,w,c),e(w,Ji),e(w,It),e(It,Qi),e(w,Xi),e(w,le),e(le,Zi),e(w,en),e(w,fe),e(fe,tn),e(w,nn),e(w,de),e(de,on),e(w,an),e(w,ce),e(ce,sn),e(w,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,wn),p(i,gi,c),p(i,B,c),e(B,xt),e(xt,E),e(E,kt),e(kt,In),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($,at),e(at,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,st),e(st,we),e(we,rt),e(T,Vn),e(T,lt),e(lt,Ie),e(Ie,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,ao),e(v,Wt),e(Wt,so),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,wo),e(Oe,Kt),e(Kt,Io),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,wi,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,Ii,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,ea),e(Be,ta),e(y,ia),e(y,te),m(Ke,te,null),e(te,na),e(te,oi),e(oi,oa),e(y,aa),e(y,N),m(Ye,N,null),e(N,sa),e(N,ai),e(ai,ra),e(N,la),e(N,si),e(si,fa),e(y,da),e(y,ie),m(je,ie,null),e(ie,ca),e(ie,Je),e(Je,pa),e(Je,ri),e(ri,ua),e(Je,ha),Si=!0},p:Ys,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(w),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(wi),i&&t(D),b(ze),b(Ge),b(qe),b(Fe),i&&t(Ii),i&&t(H),b(We),i&&t(Pi),i&&t(y),b(He),b(Ke),b(Ye),b(je)}}}const Qs={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 Xs(ba){return js(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ir extends Hs{constructor(z){super();Rs(this,z,Xs,Js,Bs,{})}}export{ir as default,Qs as metadata};
