Buckets:

rtrm's picture
download
raw
26.3 kB
import{s as Te,o as Ae,n as ke}from"../chunks/scheduler.53228c21.js";import{S as Ce,i as Ie,e as l,s as o,c as u,h as Me,a as p,d as n,b as a,f as V,j as w,g,k as A,l as f,m as i,n as _,t as h,o as b,p as v}from"../chunks/index.100fac89.js";import{C as Le}from"../chunks/CopyLLMTxtMenu.88008e00.js";import{D as fe}from"../chunks/Docstring.98d3e518.js";import{C as Ue}from"../chunks/CodeBlock.d30a6509.js";import{E as Ne}from"../chunks/ExampleCodeBlock.6f4ee49e.js";import{H as ve,E as Oe}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.afa087fa.js";function je(F){let s,k="Examples:",y,c,d;return c=new Ue({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uU0FHUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uU0FHUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBwaG90byUyMG9mJTIwYW4lMjBhc3Ryb25hdXQlMjByaWRpbmclMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0JTJDJTIwc2FnX3NjYWxlJTNEMC43NSkuaW1hZ2VzJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionSAGPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionSAGPipeline.from_pretrained(
<span class="hljs-meta">... </span> <span class="hljs-string">&quot;stable-diffusion-v1-5/stable-diffusion-v1-5&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt, sag_scale=<span class="hljs-number">0.75</span>).images[<span class="hljs-number">0</span>]`,wrap:!1}}),{c(){s=l("p"),s.textContent=k,y=o(),u(c.$$.fragment)},l(r){s=p(r,"P",{"data-svelte-h":!0}),w(s)!=="svelte-kvfsh7"&&(s.textContent=k),y=a(r),g(c.$$.fragment,r)},m(r,P){i(r,s,P),i(r,y,P),_(c,r,P),d=!0},p:ke,i(r){d||(h(c.$$.fragment,r),d=!0)},o(r){b(c.$$.fragment,r),d=!1},d(r){r&&(n(s),n(y)),v(c,r)}}}function Ee(F){let s,k,y,c,d,r="<p>This pipeline is deprecated but it can still be used. However, we won’t test the pipeline anymore and won’t accept any changes to it. If you run into any issues, reinstall the last Diffusers version that supported this model.</p>",P,C,Q,I,Y,M,ye='<a href="https://huggingface.co/papers/2210.00939" rel="nofollow">Improving Sample Quality of Diffusion Models Using Self-Attention Guidance</a> is by Susung Hong et al.',K,L,Se="The abstract from the paper is:",ee,U,we="<em>Denoising diffusion models (DDMs) have attracted attention for their exceptional generation quality and diversity. This success is largely attributed to the use of class- or text-conditional diffusion guidance methods, such as classifier and classifier-free guidance. In this paper, we present a more comprehensive perspective that goes beyond the traditional guidance methods. From this generalized perspective, we introduce novel condition- and training-free strategies to enhance the quality of generated images. As a simple solution, blur guidance improves the suitability of intermediate samples for their fine-scale information and structures, enabling diffusion models to generate higher quality samples with a moderate guidance scale. Improving upon this, Self-Attention Guidance (SAG) uses the intermediate self-attention maps of diffusion models to enhance their stability and efficacy. Specifically, SAG adversarially blurs only the regions that diffusion models attend to at each iteration and guides them accordingly. Our experimental results show that our SAG improves the performance of various diffusion models, including ADM, IDDPM, Stable Diffusion, and DiT. Moreover, combining SAG with conventional guidance methods leads to further improvement.</em>",te,N,xe='You can find additional information about Self-Attention Guidance on the <a href="https://ku-cvlab.github.io/Self-Attention-Guidance" rel="nofollow">project page</a>, <a href="https://github.com/KU-CVLAB/Self-Attention-Guidance" rel="nofollow">original codebase</a>, and try it out in a <a href="https://huggingface.co/spaces/susunghong/Self-Attention-Guidance" rel="nofollow">demo</a> or <a href="https://colab.research.google.com/github/SusungHong/Self-Attention-Guidance/blob/main/SAG_Stable.ipynb" rel="nofollow">notebook</a>.',ne,D,$e='<p>Make sure to check out the Schedulers <a href="../../using-diffusers/schedulers">guide</a> to learn how to explore the tradeoff between scheduler speed and quality, and see the <a href="../../using-diffusers/loading#reuse-a-pipeline">reuse components across pipelines</a> section to learn how to efficiently load the same components into multiple pipelines.</p>',ie,O,oe,m,j,me,S,E,ue,z,Pe="The call function to the pipeline for generation.",ge,G,_e,T,J,he,B,De="Encodes the prompt into text encoder hidden states.",ae,q,se,x,H,be,R,Ge="Output class for Stable Diffusion pipelines.",re,W,le,X,pe;return C=new Le({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),I=new ve({props:{title:"Self-Attention Guidance",local:"self-attention-guidance",headingTag:"h1"}}),O=new ve({props:{title:"StableDiffusionSAGPipeline",local:"diffusers.StableDiffusionSAGPipeline",headingTag:"h2"}}),j=new fe({props:{name:"class diffusers.StableDiffusionSAGPipeline",anchor:"diffusers.StableDiffusionSAGPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"image_encoder",val:": typing.Optional[transformers.models.clip.modeling_clip.CLIPVisionModelWithProjection] = None"},{name:"requires_safety_checker",val:": bool = True"}],source:"https://github.com/huggingface/diffusers/blob/vr_12448/src/diffusers/pipelines/stable_diffusion_sag/pipeline_stable_diffusion_sag.py#L110"}}),E=new fe({props:{name:"__call__",anchor:"diffusers.StableDiffusionSAGPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"sag_scale",val:": float = 0.75"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"ip_adapter_image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor], NoneType] = None"},{name:"ip_adapter_image_embeds",val:": typing.Optional[typing.List[torch.Tensor]] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Optional[typing.Callable[[int, int, torch.Tensor], NoneType]] = None"},{name:"callback_steps",val:": typing.Optional[int] = 1"},{name:"cross_attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"clip_skip",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide image generation. If not defined, you need to pass <code>prompt_embeds</code>.`,name:"prompt"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.StableDiffusionSAGPipeline.__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.StableDiffusionSAGPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.sag_scale",description:`<strong>sag_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.75) &#x2014;
Chosen between [0, 1.0] for better quality.`,name:"sag_scale"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide what to not include in image generation. If not defined, you need to
pass <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (<code>guidance_scale &lt; 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionSAGPipeline.__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.StableDiffusionSAGPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) from the <a href="https://huggingface.co/papers/2010.02502" rel="nofollow">DDIM</a> paper. Only
applies to the <a href="/docs/diffusers/pr_12448/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs (prompt weighting). If
not provided, <code>negative_prompt_embeds</code> are generated from the <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.ip_adapter_image",description:`<strong>ip_adapter_image</strong> &#x2014; (<code>PipelineImageInput</code>, <em>optional</em>):
Optional image input to work with IP Adapters.`,name:"ip_adapter_image"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.ip_adapter_image_embeds",description:`<strong>ip_adapter_image_embeds</strong> (<code>List[torch.Tensor]</code>, <em>optional</em>) &#x2014;
Pre-generated image embeddings for IP-Adapter. If not provided, embeddings are computed from the
<code>ip_adapter_image</code> input argument.`,name:"ip_adapter_image_embeds"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.StableDiffusionSAGPipeline.__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_12448/en/api/pipelines/stable_diffusion/text2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls every <code>callback_steps</code> steps during inference. The function is called with the
following arguments: <code>callback(step: int, timestep: int, latents: torch.Tensor)</code>.`,name:"callback"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function is called. If not specified, the callback is called at
every step.`,name:"callback_steps"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow"><code>self.processor</code></a>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/vr_12448/src/diffusers/pipelines/stable_diffusion_sag/pipeline_stable_diffusion_sag.py#L573",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>If <code>return_dict</code> is <code>True</code>, <a
href="/docs/diffusers/pr_12448/en/api/pipelines/stable_diffusion/text2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images and the
second element is a list of <code>bool</code>s indicating whether the corresponding generated image contains
“not-safe-for-work” (nsfw) content.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>
<p><a
href="/docs/diffusers/pr_12448/en/api/pipelines/stable_diffusion/text2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),G=new Ne({props:{anchor:"diffusers.StableDiffusionSAGPipeline.__call__.example",$$slots:{default:[je]},$$scope:{ctx:F}}}),J=new fe({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionSAGPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:""},{name:"num_images_per_prompt",val:""},{name:"do_classifier_free_guidance",val:""},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"},{name:"clip_skip",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionSAGPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded`,name:"prompt"},{anchor:"diffusers.StableDiffusionSAGPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>):
torch device`,name:"device"},{anchor:"diffusers.StableDiffusionSAGPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionSAGPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.StableDiffusionSAGPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionSAGPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionSAGPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionSAGPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A LoRA scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"},{anchor:"diffusers.StableDiffusionSAGPipeline.encode_prompt.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/vr_12448/src/diffusers/pipelines/stable_diffusion_sag/pipeline_stable_diffusion_sag.py#L211"}}),q=new ve({props:{title:"StableDiffusionOutput",local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",headingTag:"h2"}}),H=new fe({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>.`,name:"images"},{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.nsfw_content_detected",description:`<strong>nsfw_content_detected</strong> (<code>List[bool]</code>) &#x2014;
List indicating whether the corresponding generated image contains &#x201C;not-safe-for-work&#x201D; (nsfw) content or
<code>None</code> if safety checking could not be performed.`,name:"nsfw_content_detected"}],source:"https://github.com/huggingface/diffusers/blob/vr_12448/src/diffusers/pipelines/stable_diffusion/pipeline_output.py#L11"}}),W=new Oe({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/self_attention_guidance.md"}}),{c(){s=l("meta"),k=o(),y=l("p"),c=o(),d=l("blockquote"),d.innerHTML=r,P=o(),u(C.$$.fragment),Q=o(),u(I.$$.fragment),Y=o(),M=l("p"),M.innerHTML=ye,K=o(),L=l("p"),L.textContent=Se,ee=o(),U=l("p"),U.innerHTML=we,te=o(),N=l("p"),N.innerHTML=xe,ne=o(),D=l("blockquote"),D.innerHTML=$e,ie=o(),u(O.$$.fragment),oe=o(),m=l("div"),u(j.$$.fragment),me=o(),S=l("div"),u(E.$$.fragment),ue=o(),z=l("p"),z.textContent=Pe,ge=o(),u(G.$$.fragment),_e=o(),T=l("div"),u(J.$$.fragment),he=o(),B=l("p"),B.textContent=De,ae=o(),u(q.$$.fragment),se=o(),x=l("div"),u(H.$$.fragment),be=o(),R=l("p"),R.textContent=Ge,re=o(),u(W.$$.fragment),le=o(),X=l("p"),this.h()},l(e){const t=Me("svelte-u9bgzb",document.head);s=p(t,"META",{name:!0,content:!0}),t.forEach(n),k=a(e),y=p(e,"P",{}),V(y).forEach(n),c=a(e),d=p(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),w(d)!=="svelte-124tjg"&&(d.innerHTML=r),P=a(e),g(C.$$.fragment,e),Q=a(e),g(I.$$.fragment,e),Y=a(e),M=p(e,"P",{"data-svelte-h":!0}),w(M)!=="svelte-uuuzms"&&(M.innerHTML=ye),K=a(e),L=p(e,"P",{"data-svelte-h":!0}),w(L)!=="svelte-1cwsb16"&&(L.textContent=Se),ee=a(e),U=p(e,"P",{"data-svelte-h":!0}),w(U)!=="svelte-1wv0j5a"&&(U.innerHTML=we),te=a(e),N=p(e,"P",{"data-svelte-h":!0}),w(N)!=="svelte-rke90q"&&(N.innerHTML=xe),ne=a(e),D=p(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),w(D)!=="svelte-r1jcqf"&&(D.innerHTML=$e),ie=a(e),g(O.$$.fragment,e),oe=a(e),m=p(e,"DIV",{class:!0});var $=V(m);g(j.$$.fragment,$),me=a($),S=p($,"DIV",{class:!0});var Z=V(S);g(E.$$.fragment,Z),ue=a(Z),z=p(Z,"P",{"data-svelte-h":!0}),w(z)!=="svelte-50j04k"&&(z.textContent=Pe),ge=a(Z),g(G.$$.fragment,Z),Z.forEach(n),_e=a($),T=p($,"DIV",{class:!0});var de=V(T);g(J.$$.fragment,de),he=a(de),B=p(de,"P",{"data-svelte-h":!0}),w(B)!=="svelte-16q0ax1"&&(B.textContent=De),de.forEach(n),$.forEach(n),ae=a(e),g(q.$$.fragment,e),se=a(e),x=p(e,"DIV",{class:!0});var ce=V(x);g(H.$$.fragment,ce),be=a(ce),R=p(ce,"P",{"data-svelte-h":!0}),w(R)!=="svelte-1qpjiuf"&&(R.textContent=Ge),ce.forEach(n),re=a(e),g(W.$$.fragment,e),le=a(e),X=p(e,"P",{}),V(X).forEach(n),this.h()},h(){A(s,"name","hf:doc:metadata"),A(s,"content",Je),A(d,"class","warning"),A(D,"class","tip"),A(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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")},m(e,t){f(document.head,s),i(e,k,t),i(e,y,t),i(e,c,t),i(e,d,t),i(e,P,t),_(C,e,t),i(e,Q,t),_(I,e,t),i(e,Y,t),i(e,M,t),i(e,K,t),i(e,L,t),i(e,ee,t),i(e,U,t),i(e,te,t),i(e,N,t),i(e,ne,t),i(e,D,t),i(e,ie,t),_(O,e,t),i(e,oe,t),i(e,m,t),_(j,m,null),f(m,me),f(m,S),_(E,S,null),f(S,ue),f(S,z),f(S,ge),_(G,S,null),f(m,_e),f(m,T),_(J,T,null),f(T,he),f(T,B),i(e,ae,t),_(q,e,t),i(e,se,t),i(e,x,t),_(H,x,null),f(x,be),f(x,R),i(e,re,t),_(W,e,t),i(e,le,t),i(e,X,t),pe=!0},p(e,[t]){const $={};t&2&&($.$$scope={dirty:t,ctx:e}),G.$set($)},i(e){pe||(h(C.$$.fragment,e),h(I.$$.fragment,e),h(O.$$.fragment,e),h(j.$$.fragment,e),h(E.$$.fragment,e),h(G.$$.fragment,e),h(J.$$.fragment,e),h(q.$$.fragment,e),h(H.$$.fragment,e),h(W.$$.fragment,e),pe=!0)},o(e){b(C.$$.fragment,e),b(I.$$.fragment,e),b(O.$$.fragment,e),b(j.$$.fragment,e),b(E.$$.fragment,e),b(G.$$.fragment,e),b(J.$$.fragment,e),b(q.$$.fragment,e),b(H.$$.fragment,e),b(W.$$.fragment,e),pe=!1},d(e){e&&(n(k),n(y),n(c),n(d),n(P),n(Q),n(Y),n(M),n(K),n(L),n(ee),n(U),n(te),n(N),n(ne),n(D),n(ie),n(oe),n(m),n(ae),n(se),n(x),n(re),n(le),n(X)),n(s),v(C,e),v(I,e),v(O,e),v(j),v(E),v(G),v(J),v(q,e),v(H),v(W,e)}}}const Je='{"title":"Self-Attention Guidance","local":"self-attention-guidance","sections":[{"title":"StableDiffusionSAGPipeline","local":"diffusers.StableDiffusionSAGPipeline","sections":[],"depth":2},{"title":"StableDiffusionOutput","local":"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput","sections":[],"depth":2}],"depth":1}';function qe(F){return Ae(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Xe extends Ce{constructor(s){super(),Ie(this,s,qe,Ee,Te,{})}}export{Xe as component};

Xet Storage Details

Size:
26.3 kB
·
Xet hash:
c18a018433afef12ff29106ffbccf2a9dff1533966b9144594aced1d9f966de0

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