Buckets:
| import{s as Ss,o as Ds,n as Ot}from"../chunks/scheduler.8c3d61f6.js";import{S as ks,i as Ps,g as a,s as n,r as c,A as Ws,h as i,f as o,c as s,j as I,u as m,x as b,k as w,y as t,a as M,v as g,d as f,t as u,w as h}from"../chunks/index.da70eac4.js";import{T as Es}from"../chunks/Tip.1d9b8c37.js";import{D as T}from"../chunks/Docstring.eabe339b.js";import{C as $s}from"../chunks/CodeBlock.a9c4becf.js";import{E as Zs}from"../chunks/ExampleCodeBlock.4ca28371.js";import{H as Ft,E as Bs}from"../chunks/getInferenceSnippets.366c2c95.js";function Vs(L){let d,U="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.";return{c(){d=a("p"),d.textContent=U},l(x){d=i(x,"P",{"data-svelte-h":!0}),b(d)!=="svelte-ic4u42"&&(d.textContent=U)},m(x,y){M(x,d,y)},p:Ot,d(x){x&&o(d)}}}function As(L){let d,U='Make sure to check out the Stable Diffusion <a href="https://huggingface.co/docs/diffusers/en/api/pipelines/stable_diffusion/overview#tips" rel="nofollow">Tips</a> section to learn how to explore the tradeoff between scheduler speed and quality and how to reuse pipeline components efficiently!',x,y,J='If you want to use one of the official checkpoints for a task, explore the <a href="https://huggingface.co/gligen" rel="nofollow">gligen</a> Hub organizations!';return{c(){d=a("p"),d.innerHTML=U,x=n(),y=a("p"),y.innerHTML=J},l(l){d=i(l,"P",{"data-svelte-h":!0}),b(d)!=="svelte-v9h8gm"&&(d.innerHTML=U),x=s(l),y=i(l,"P",{"data-svelte-h":!0}),b(y)!=="svelte-9ek9ww"&&(y.innerHTML=J)},m(l,j){M(l,d,j),M(l,x,j),M(l,y,j)},p:Ot,d(l){l&&(o(d),o(x),o(y))}}}function Rs(L){let d,U="Examples:",x,y,J;return y=new $s({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnV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">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionGLIGENPipeline | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Insert objects described by text at the region defined by bounding boxes</span> | |
| <span class="hljs-meta">>>> </span>pipe = StableDiffusionGLIGENPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"masterful/gligen-1-4-inpainting-text-box"</span>, variant=<span class="hljs-string">"fp16"</span>, torch_dtype=torch.float16 | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>pipe = pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>input_image = load_image( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"https://hf.co/datasets/huggingface/documentation-images/resolve/main/diffusers/gligen/livingroom_modern.png"</span> | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"a birthday cake"</span> | |
| <span class="hljs-meta">>>> </span>boxes = [[<span class="hljs-number">0.2676</span>, <span class="hljs-number">0.6088</span>, <span class="hljs-number">0.4773</span>, <span class="hljs-number">0.7183</span>]] | |
| <span class="hljs-meta">>>> </span>phrases = [<span class="hljs-string">"a birthday cake"</span>] | |
| <span class="hljs-meta">>>> </span>images = pipe( | |
| <span class="hljs-meta">... </span> prompt=prompt, | |
| <span class="hljs-meta">... </span> gligen_phrases=phrases, | |
| <span class="hljs-meta">... </span> gligen_inpaint_image=input_image, | |
| <span class="hljs-meta">... </span> gligen_boxes=boxes, | |
| <span class="hljs-meta">... </span> gligen_scheduled_sampling_beta=<span class="hljs-number">1</span>, | |
| <span class="hljs-meta">... </span> output_type=<span class="hljs-string">"pil"</span>, | |
| <span class="hljs-meta">... </span> num_inference_steps=<span class="hljs-number">50</span>, | |
| <span class="hljs-meta">... </span>).images | |
| <span class="hljs-meta">>>> </span>images[<span class="hljs-number">0</span>].save(<span class="hljs-string">"./gligen-1-4-inpainting-text-box.jpg"</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Generate an image described by the prompt and</span> | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># insert objects described by text at the region defined by bounding boxes</span> | |
| <span class="hljs-meta">>>> </span>pipe = StableDiffusionGLIGENPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"masterful/gligen-1-4-generation-text-box"</span>, variant=<span class="hljs-string">"fp16"</span>, torch_dtype=torch.float16 | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>pipe = pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"a waterfall and a modern high speed train running through the tunnel in a beautiful forest with fall foliage"</span> | |
| <span class="hljs-meta">>>> </span>boxes = [[<span class="hljs-number">0.1387</span>, <span class="hljs-number">0.2051</span>, <span class="hljs-number">0.4277</span>, <span class="hljs-number">0.7090</span>], [<span class="hljs-number">0.4980</span>, <span class="hljs-number">0.4355</span>, <span class="hljs-number">0.8516</span>, <span class="hljs-number">0.7266</span>]] | |
| <span class="hljs-meta">>>> </span>phrases = [<span class="hljs-string">"a waterfall"</span>, <span class="hljs-string">"a modern high speed train running through the tunnel"</span>] | |
| <span class="hljs-meta">>>> </span>images = pipe( | |
| <span class="hljs-meta">... </span> prompt=prompt, | |
| <span class="hljs-meta">... </span> gligen_phrases=phrases, | |
| <span class="hljs-meta">... </span> gligen_boxes=boxes, | |
| <span class="hljs-meta">... </span> gligen_scheduled_sampling_beta=<span class="hljs-number">1</span>, | |
| <span class="hljs-meta">... </span> output_type=<span class="hljs-string">"pil"</span>, | |
| <span class="hljs-meta">... </span> num_inference_steps=<span class="hljs-number">50</span>, | |
| <span class="hljs-meta">... </span>).images | |
| <span class="hljs-meta">>>> </span>images[<span class="hljs-number">0</span>].save(<span class="hljs-string">"./gligen-1-4-generation-text-box.jpg"</span>)`,wrap:!1}}),{c(){d=a("p"),d.textContent=U,x=n(),c(y.$$.fragment)},l(l){d=i(l,"P",{"data-svelte-h":!0}),b(d)!=="svelte-kvfsh7"&&(d.textContent=U),x=s(l),m(y.$$.fragment,l)},m(l,j){M(l,d,j),M(l,x,j),g(y,l,j),J=!0},p:Ot,i(l){J||(f(y.$$.fragment,l),J=!0)},o(l){u(y.$$.fragment,l),J=!1},d(l){l&&(o(d),o(x)),h(y,l)}}}function zs(L){let d,U="Examples:",x,y,J;return y=new $s({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uR0xJR0VOVGV4dEltYWdlUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwbG9hZF9pbWFnZSUwQSUwQSUyMyUyMEluc2VydCUyMG9iamVjdHMlMjBkZXNjcmliZWQlMjBieSUyMGltYWdlJTIwYXQlMjB0aGUlMjByZWdpb24lMjBkZWZpbmVkJTIwYnklMjBib3VuZGluZyUyMGJveGVzJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvbkdMSUdFTlRleHRJbWFnZVBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJhbmhuY3QlMkZHbGlnZW5fSW5wYWludGluZ19UZXh0X0ltYWdlJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKSUwQXBpcGUlMjAlM0QlMjBwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBaW5wdXRfaW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaGYuY28lMkZkYXRhc2V0cyUyRmh1Z2dpbmdmYWNlJTJGZG9jdW1lbnRhdG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jAlMjAlMjAlMjBvdXRwdXRfdHlwZSUzRCUyMnBpbCUyMiUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q1MCUyQyUwQSkuaW1hZ2VzJTBBJTBBaW1hZ2VzJTVCMCU1RC5zYXZlKCUyMi4lMkZnbGlnZW4tZ2VuZXJhdGlvbi10ZXh0LWltYWdlLWJveC1zdHlsZS10cmFuc2Zlci5qcGclMjIp",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionGLIGENTextImagePipeline | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Insert objects described by image at the region defined by bounding boxes</span> | |
| <span class="hljs-meta">>>> </span>pipe = StableDiffusionGLIGENTextImagePipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"anhnct/Gligen_Inpainting_Text_Image"</span>, torch_dtype=torch.float16 | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>pipe = pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>input_image = load_image( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"https://hf.co/datasets/huggingface/documentation-images/resolve/main/diffusers/gligen/livingroom_modern.png"</span> | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"a backpack"</span> | |
| <span class="hljs-meta">>>> </span>boxes = [[<span class="hljs-number">0.2676</span>, <span class="hljs-number">0.4088</span>, <span class="hljs-number">0.4773</span>, <span class="hljs-number">0.7183</span>]] | |
| <span class="hljs-meta">>>> </span>phrases = <span class="hljs-literal">None</span> | |
| <span class="hljs-meta">>>> </span>gligen_image = load_image( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/gligen/backpack.jpeg"</span> | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>images = pipe( | |
| <span class="hljs-meta">... </span> prompt=prompt, | |
| <span class="hljs-meta">... </span> gligen_phrases=phrases, | |
| <span class="hljs-meta">... </span> gligen_inpaint_image=input_image, | |
| <span class="hljs-meta">... </span> gligen_boxes=boxes, | |
| <span class="hljs-meta">... </span> gligen_images=[gligen_image], | |
| <span class="hljs-meta">... </span> gligen_scheduled_sampling_beta=<span class="hljs-number">1</span>, | |
| <span class="hljs-meta">... </span> output_type=<span class="hljs-string">"pil"</span>, | |
| <span class="hljs-meta">... </span> num_inference_steps=<span class="hljs-number">50</span>, | |
| <span class="hljs-meta">... </span>).images | |
| <span class="hljs-meta">>>> </span>images[<span class="hljs-number">0</span>].save(<span class="hljs-string">"./gligen-inpainting-text-image-box.jpg"</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Generate an image described by the prompt and</span> | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># insert objects described by text and image at the region defined by bounding boxes</span> | |
| <span class="hljs-meta">>>> </span>pipe = StableDiffusionGLIGENTextImagePipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"anhnct/Gligen_Text_Image"</span>, torch_dtype=torch.float16 | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>pipe = pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"a flower sitting on the beach"</span> | |
| <span class="hljs-meta">>>> </span>boxes = [[<span class="hljs-number">0.0</span>, <span class="hljs-number">0.09</span>, <span class="hljs-number">0.53</span>, <span class="hljs-number">0.76</span>]] | |
| <span class="hljs-meta">>>> </span>phrases = [<span class="hljs-string">"flower"</span>] | |
| <span class="hljs-meta">>>> </span>gligen_image = load_image( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/gligen/pexels-pixabay-60597.jpg"</span> | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>images = pipe( | |
| <span class="hljs-meta">... </span> prompt=prompt, | |
| <span class="hljs-meta">... </span> gligen_phrases=phrases, | |
| <span class="hljs-meta">... </span> gligen_images=[gligen_image], | |
| <span class="hljs-meta">... </span> gligen_boxes=boxes, | |
| <span class="hljs-meta">... </span> gligen_scheduled_sampling_beta=<span class="hljs-number">1</span>, | |
| <span class="hljs-meta">... </span> output_type=<span class="hljs-string">"pil"</span>, | |
| <span class="hljs-meta">... </span> num_inference_steps=<span class="hljs-number">50</span>, | |
| <span class="hljs-meta">... </span>).images | |
| <span class="hljs-meta">>>> </span>images[<span class="hljs-number">0</span>].save(<span class="hljs-string">"./gligen-generation-text-image-box.jpg"</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Generate an image described by the prompt and</span> | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># transfer style described by image at the region defined by bounding boxes</span> | |
| <span class="hljs-meta">>>> </span>pipe = StableDiffusionGLIGENTextImagePipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"anhnct/Gligen_Text_Image"</span>, torch_dtype=torch.float16 | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>pipe = pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"a dragon flying on the sky"</span> | |
| <span class="hljs-meta">>>> </span>boxes = [[<span class="hljs-number">0.4</span>, <span class="hljs-number">0.2</span>, <span class="hljs-number">1.0</span>, <span class="hljs-number">0.8</span>], [<span class="hljs-number">0.0</span>, <span class="hljs-number">1.0</span>, <span class="hljs-number">0.0</span>, <span class="hljs-number">1.0</span>]] <span class="hljs-comment"># Set \`[0.0, 1.0, 0.0, 1.0]\` for the style</span> | |
| <span class="hljs-meta">>>> </span>gligen_image = load_image( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/landscape.png"</span> | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>gligen_placeholder = load_image( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/landscape.png"</span> | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>images = pipe( | |
| <span class="hljs-meta">... </span> prompt=prompt, | |
| <span class="hljs-meta">... </span> gligen_phrases=[ | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"dragon"</span>, | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"placeholder"</span>, | |
| <span class="hljs-meta">... </span> ], <span class="hljs-comment"># Can use any text instead of \`placeholder\` token, because we will use mask here</span> | |
| <span class="hljs-meta">... </span> gligen_images=[ | |
| <span class="hljs-meta">... </span> gligen_placeholder, | |
| <span class="hljs-meta">... </span> gligen_image, | |
| <span class="hljs-meta">... </span> ], <span class="hljs-comment"># Can use any image in gligen_placeholder, because we will use mask here</span> | |
| <span class="hljs-meta">... </span> input_phrases_mask=[<span class="hljs-number">1</span>, <span class="hljs-number">0</span>], <span class="hljs-comment"># Set 0 for the placeholder token</span> | |
| <span class="hljs-meta">... </span> input_images_mask=[<span class="hljs-number">0</span>, <span class="hljs-number">1</span>], <span class="hljs-comment"># Set 0 for the placeholder image</span> | |
| <span class="hljs-meta">... </span> gligen_boxes=boxes, | |
| <span class="hljs-meta">... </span> gligen_scheduled_sampling_beta=<span class="hljs-number">1</span>, | |
| <span class="hljs-meta">... </span> output_type=<span class="hljs-string">"pil"</span>, | |
| <span class="hljs-meta">... </span> num_inference_steps=<span class="hljs-number">50</span>, | |
| <span class="hljs-meta">... </span>).images | |
| <span class="hljs-meta">>>> </span>images[<span class="hljs-number">0</span>].save(<span class="hljs-string">"./gligen-generation-text-image-box-style-transfer.jpg"</span>)`,wrap:!1}}),{c(){d=a("p"),d.textContent=U,x=n(),c(y.$$.fragment)},l(l){d=i(l,"P",{"data-svelte-h":!0}),b(d)!=="svelte-kvfsh7"&&(d.textContent=U),x=s(l),m(y.$$.fragment,l)},m(l,j){M(l,d,j),M(l,x,j),g(y,l,j),J=!0},p:Ot,i(l){J||(f(y.$$.fragment,l),J=!0)},o(l){u(y.$$.fragment,l),J=!1},d(l){l&&(o(d),o(x)),h(y,l)}}}function Ys(L){let d,U,x,y,J,l,j,Mt,se,Kn='The GLIGEN model was created by researchers and engineers from <a href="https://github.com/gligen/GLIGEN" rel="nofollow">University of Wisconsin-Madison, Columbia University, and Microsoft</a>. The <a href="/docs/diffusers/pr_11986/en/api/pipelines/stable_diffusion/gligen#diffusers.StableDiffusionGLIGENPipeline">StableDiffusionGLIGENPipeline</a> and <a href="/docs/diffusers/pr_11986/en/api/pipelines/stable_diffusion/gligen#diffusers.StableDiffusionGLIGENTextImagePipeline">StableDiffusionGLIGENTextImagePipeline</a> can generate photorealistic images conditioned on grounding inputs. Along with text and bounding boxes with <a href="/docs/diffusers/pr_11986/en/api/pipelines/stable_diffusion/gligen#diffusers.StableDiffusionGLIGENPipeline">StableDiffusionGLIGENPipeline</a>, if input images are given, <a href="/docs/diffusers/pr_11986/en/api/pipelines/stable_diffusion/gligen#diffusers.StableDiffusionGLIGENTextImagePipeline">StableDiffusionGLIGENTextImagePipeline</a> can insert objects described by text at the region defined by bounding boxes. Otherwise, it’ll generate an image described by the caption/prompt and insert objects described by text at the region defined by bounding boxes. It’s trained on COCO2014D and COCO2014CD datasets, and the model uses a frozen CLIP ViT-L/14 text encoder to condition itself on grounding inputs.',yt,ae,es='The abstract from the <a href="https://huggingface.co/papers/2301.07093" rel="nofollow">paper</a> is:',It,ie,ts="<em>Large-scale text-to-image diffusion models have made amazing advances. However, the status quo is to use text input alone, which can impede controllability. In this work, we propose GLIGEN, Grounded-Language-to-Image Generation, a novel approach that builds upon and extends the functionality of existing pre-trained text-to-image diffusion models by enabling them to also be conditioned on grounding inputs. To preserve the vast concept knowledge of the pre-trained model, we freeze all of its weights and inject the grounding information into new trainable layers via a gated mechanism. Our model achieves open-world grounded text2img generation with caption and bounding box condition inputs, and the grounding ability generalizes well to novel spatial configurations and concepts. GLIGEN’s zeroshot performance on COCO and LVIS outperforms existing supervised layout-to-image baselines by a large margin.</em>",wt,$,vt,oe,ns='<a href="/docs/diffusers/pr_11986/en/api/pipelines/stable_diffusion/gligen#diffusers.StableDiffusionGLIGENPipeline">StableDiffusionGLIGENPipeline</a> was contributed by <a href="https://github.com/nikhil-masterful" rel="nofollow">Nikhil Gajendrakumar</a> and <a href="/docs/diffusers/pr_11986/en/api/pipelines/stable_diffusion/gligen#diffusers.StableDiffusionGLIGENTextImagePipeline">StableDiffusionGLIGENTextImagePipeline</a> was contributed by <a href="https://github.com/tuanh123789" rel="nofollow">Nguyễn Công Tú Anh</a>.',Tt,le,Gt,v,re,Kt,Be,ss="Pipeline for text-to-image generation using Stable Diffusion with Grounded-Language-to-Image Generation (GLIGEN).",en,Ve,as=`This model inherits from <a href="/docs/diffusers/pr_11986/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. 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.).`,tn,N,pe,nn,Ae,is="The call function to the pipeline for generation.",sn,S,an,D,de,on,Re,os=`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to | |
| compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`,ln,k,ce,rn,ze,ls=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,pn,P,me,dn,Ye,rs=`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to | |
| compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow | |
| processing larger images.`,cn,W,ge,mn,Xe,ps=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,gn,B,fe,fn,Qe,ds=`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared | |
| to <code>enable_sequential_cpu_offload</code>, this method moves one whole model at a time to the accelerator when its | |
| <code>forward</code> method is called, and the model remains in accelerator until the next model runs. Memory savings are | |
| lower than with <code>enable_sequential_cpu_offload</code>, but performance is much better due to the iterative execution | |
| of the <code>unet</code>.`,un,He,ue,hn,qe,he,_n,V,_e,bn,Fe,cs="Encodes the prompt into text encoder hidden states.",xt,be,Jt,p,Me,Mn,Oe,ms="Pipeline for text-to-image generation using Stable Diffusion with Grounded-Language-to-Image Generation (GLIGEN).",yn,Ke,gs=`This model inherits from <a href="/docs/diffusers/pr_11986/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. 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.).`,In,C,ye,wn,et,fs="The call function to the pipeline for generation.",vn,A,Tn,R,Ie,Gn,tt,us=`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to | |
| compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`,xn,z,we,Jn,nt,hs=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,jn,Y,ve,Un,st,_s=`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to | |
| compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow | |
| processing larger images.`,Ln,X,Te,Nn,at,bs=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,Cn,Q,Ge,En,it,Ms=`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared | |
| to <code>enable_sequential_cpu_offload</code>, this method moves one whole model at a time to the accelerator when its | |
| <code>forward</code> method is called, and the model remains in accelerator until the next model runs. Memory savings are | |
| lower than with <code>enable_sequential_cpu_offload</code>, but performance is much better due to the iterative execution | |
| of the <code>unet</code>.`,Zn,ot,xe,$n,lt,Je,Sn,H,je,Dn,rt,ys=`Based on the input mask corresponding value <code>0 or 1</code> for each phrases and image, mask the features | |
| corresponding to phrases and images.`,kn,q,Ue,Pn,pt,Is="Crop the input image to the specified dimensions.",Wn,F,Le,Bn,dt,ws=`Create an inpainting mask based on given boxes. This function generates an inpainting mask using the provided | |
| boxes to mark regions that need to be inpainted.`,Vn,O,Ne,An,ct,vs="Encodes the prompt into text encoder hidden states.",Rn,K,Ce,zn,mt,Ts=`Get image and phrases embedding by using CLIP pretrain model. The image embedding is transformed into the | |
| phrases embedding space through a projection.`,Yn,ee,Ee,Xn,gt,Gs=`Prepare the cross-attention kwargs containing information about the grounded input (boxes, mask, image | |
| embedding, phrases embedding).`,Qn,te,Ze,Hn,ft,xs=`Prepare the cross-attention kwargs without information about the grounded input (boxes, mask, image embedding, | |
| phrases embedding) (All are zero tensor).`,qn,ne,$e,Fn,ut,Js="Crop and resize the image to the target size while keeping the center.",jt,Se,Ut,E,De,On,ht,js="Output class for Stable Diffusion pipelines.",Lt,ke,Nt,bt,Ct;return J=new Es({props:{warning:!0,$$slots:{default:[Vs]},$$scope:{ctx:L}}}),j=new Ft({props:{title:"GLIGEN (Grounded Language-to-Image Generation)",local:"gligen-grounded-language-to-image-generation",headingTag:"h1"}}),$=new Es({props:{$$slots:{default:[As]},$$scope:{ctx:L}}}),le=new Ft({props:{title:"StableDiffusionGLIGENPipeline",local:"diffusers.StableDiffusionGLIGENPipeline",headingTag:"h2"}}),re=new T({props:{name:"class diffusers.StableDiffusionGLIGENPipeline",anchor:"diffusers.StableDiffusionGLIGENPipeline",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:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionGLIGENPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_11986/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) — | |
| Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.text_encoder",description:`<strong>text_encoder</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIPTextModel</a>) — | |
| Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) — | |
| A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/pr_11986/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) — | |
| A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_11986/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) — | |
| A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of | |
| <a href="/docs/diffusers/pr_11986/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/pr_11986/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/pr_11986/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) — | |
| Classification module that estimates whether generated images could be considered offensive or harmful. | |
| Please refer to the <a href="https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5" rel="nofollow">model card</a> for | |
| more details about a model’s potential harms.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a>) — | |
| A <code>CLIPImageProcessor</code> to extract features from generated images; used as inputs to the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py#L111"}}),pe=new T({props:{name:"__call__",anchor:"diffusers.StableDiffusionGLIGENPipeline.__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:"gligen_scheduled_sampling_beta",val:": float = 0.3"},{name:"gligen_phrases",val:": typing.List[str] = None"},{name:"gligen_boxes",val:": typing.List[typing.List[float]] = None"},{name:"gligen_inpaint_image",val:": typing.Optional[PIL.Image.Image] = None"},{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:"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:": 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.StableDiffusionGLIGENPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to guide image generation. If not defined, you need to pass <code>prompt_embeds</code>.`,name:"prompt"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__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>) — | |
| The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__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>) — | |
| The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) — | |
| 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.StableDiffusionGLIGENPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) — | |
| 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 > 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.gligen_phrases",description:`<strong>gligen_phrases</strong> (<code>List[str]</code>) — | |
| The phrases to guide what to include in each of the regions defined by the corresponding | |
| <code>gligen_boxes</code>. There should only be one phrase per bounding box.`,name:"gligen_phrases"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.gligen_boxes",description:`<strong>gligen_boxes</strong> (<code>List[List[float]]</code>) — | |
| The bounding boxes that identify rectangular regions of the image that are going to be filled with the | |
| content described by the corresponding <code>gligen_phrases</code>. Each rectangular box is defined as a | |
| <code>List[float]</code> of 4 elements <code>[xmin, ymin, xmax, ymax]</code> where each value is between [0,1].`,name:"gligen_boxes"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.gligen_inpaint_image",description:`<strong>gligen_inpaint_image</strong> (<code>PIL.Image.Image</code>, <em>optional</em>) — | |
| The input image, if provided, is inpainted with objects described by the <code>gligen_boxes</code> and | |
| <code>gligen_phrases</code>. Otherwise, it is treated as a generation task on a blank input image.`,name:"gligen_inpaint_image"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.gligen_scheduled_sampling_beta",description:`<strong>gligen_scheduled_sampling_beta</strong> (<code>float</code>, defaults to 0.3) — | |
| Scheduled Sampling factor from <a href="https://huggingface.co/papers/2301.07093" rel="nofollow">GLIGEN: Open-Set Grounded Text-to-Image | |
| Generation</a>. Scheduled Sampling factor is only varied for | |
| scheduled sampling during inference for improved quality and controllability.`,name:"gligen_scheduled_sampling_beta"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| 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 < 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) — | |
| Corresponds to parameter eta (η) from the <a href="https://huggingface.co/papers/2010.02502" rel="nofollow">DDIM</a> paper. Only | |
| applies to the <a href="/docs/diffusers/pr_11986/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"pil"</code>) — | |
| The output format of the generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to return a <a href="/docs/diffusers/pr_11986/en/api/pipelines/stable_diffusion/inpaint#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a | |
| plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENPipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| 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.StableDiffusionGLIGENPipeline.__call__.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENPipeline.__call__.guidance_rescale",description:`<strong>guidance_rescale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) — | |
| Guidance rescale factor from <a href="https://huggingface.co/papers/2305.08891" rel="nofollow">Common Diffusion Noise Schedules and Sample Steps are | |
| Flawed</a>. Guidance rescale factor should fix overexposure when | |
| using zero terminal SNR.`,name:"guidance_rescale"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) — | |
| 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_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py#L539",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If <code>return_dict</code> is <code>True</code>, <a | |
| href="/docs/diffusers/pr_11986/en/api/pipelines/stable_diffusion/inpaint#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_11986/en/api/pipelines/stable_diffusion/inpaint#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput" | |
| >StableDiffusionPipelineOutput</a> or <code>tuple</code></p> | |
| `}}),S=new Zs({props:{anchor:"diffusers.StableDiffusionGLIGENPipeline.__call__.example",$$slots:{default:[Rs]},$$scope:{ctx:L}}}),de=new T({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionGLIGENPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/pipeline_utils.py#L2039"}}),ce=new T({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionGLIGENPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/pipeline_utils.py#L2046"}}),me=new T({props:{name:"enable_vae_tiling",anchor:"diffusers.StableDiffusionGLIGENPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/pipeline_utils.py#L2053"}}),ge=new T({props:{name:"disable_vae_tiling",anchor:"diffusers.StableDiffusionGLIGENPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/pipeline_utils.py#L2061"}}),fe=new T({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionGLIGENPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:": typing.Optional[int] = None"},{name:"device",val:": typing.Union[torch.device, str] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionGLIGENPipeline.enable_model_cpu_offload.gpu_id",description:`<strong>gpu_id</strong> (<code>int</code>, <em>optional</em>) — | |
| The ID of the accelerator that shall be used in inference. If not specified, it will default to 0.`,name:"gpu_id"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.enable_model_cpu_offload.device",description:`<strong>device</strong> (<code>torch.Device</code> or <code>str</code>, <em>optional</em>, defaults to None) — | |
| The PyTorch device type of the accelerator that shall be used in inference. If not specified, it will | |
| automatically detect the available accelerator and use.`,name:"device"}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/pipeline_utils.py#L1151"}}),ue=new T({props:{name:"prepare_latents",anchor:"diffusers.StableDiffusionGLIGENPipeline.prepare_latents",parameters:[{name:"batch_size",val:""},{name:"num_channels_latents",val:""},{name:"height",val:""},{name:"width",val:""},{name:"dtype",val:""},{name:"device",val:""},{name:"generator",val:""},{name:"latents",val:" = None"}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py#L490"}}),he=new T({props:{name:"enable_fuser",anchor:"diffusers.StableDiffusionGLIGENPipeline.enable_fuser",parameters:[{name:"enabled",val:" = True"}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py#L512"}}),_e=new T({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionGLIGENPipeline.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.StableDiffusionGLIGENPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| prompt to be encoded`,name:"prompt"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.encode_prompt.device",description:`<strong>device</strong> — (<code>torch.device</code>): | |
| torch device`,name:"device"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) — | |
| number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) — | |
| whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.StableDiffusionGLIGENPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENPipeline.encode_prompt.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) — | |
| 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_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py#L220"}}),be=new Ft({props:{title:"StableDiffusionGLIGENTextImagePipeline",local:"diffusers.StableDiffusionGLIGENTextImagePipeline",headingTag:"h2"}}),Me=new T({props:{name:"class diffusers.StableDiffusionGLIGENTextImagePipeline",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"processor",val:": CLIPProcessor"},{name:"image_encoder",val:": CLIPVisionModelWithProjection"},{name:"image_project",val:": CLIPImageProjection"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_11986/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) — | |
| Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.text_encoder",description:`<strong>text_encoder</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIPTextModel</a>) — | |
| Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) — | |
| A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.processor",description:`<strong>processor</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPProcessor" rel="nofollow">CLIPProcessor</a>) — | |
| A <code>CLIPProcessor</code> to process reference image.`,name:"processor"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.image_encoder",description:`<strong>image_encoder</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPVisionModelWithProjection" rel="nofollow">CLIPVisionModelWithProjection</a>) — | |
| Frozen image-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"image_encoder"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.image_project",description:`<strong>image_project</strong> (<code>CLIPImageProjection</code>) — | |
| A <code>CLIPImageProjection</code> to project image embedding into phrases embedding space.`,name:"image_project"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/pr_11986/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) — | |
| A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_11986/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) — | |
| A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of | |
| <a href="/docs/diffusers/pr_11986/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/pr_11986/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/pr_11986/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) — | |
| Classification module that estimates whether generated images could be considered offensive or harmful. | |
| Please refer to the <a href="https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5" rel="nofollow">model card</a> for | |
| more details about a model’s potential harms.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a>) — | |
| A <code>CLIPImageProcessor</code> to extract features from generated images; used as inputs to the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L163"}}),ye=new T({props:{name:"__call__",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__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:"gligen_scheduled_sampling_beta",val:": float = 0.3"},{name:"gligen_phrases",val:": typing.List[str] = None"},{name:"gligen_images",val:": typing.List[PIL.Image.Image] = None"},{name:"input_phrases_mask",val:": typing.Union[int, typing.List[int]] = None"},{name:"input_images_mask",val:": typing.Union[int, typing.List[int]] = None"},{name:"gligen_boxes",val:": typing.List[typing.List[float]] = None"},{name:"gligen_inpaint_image",val:": typing.Optional[PIL.Image.Image] = None"},{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:"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:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"gligen_normalize_constant",val:": float = 28.7"},{name:"clip_skip",val:": int = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to guide image generation. If not defined, you need to pass <code>prompt_embeds</code>.`,name:"prompt"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__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>) — | |
| The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__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>) — | |
| The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) — | |
| 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.StableDiffusionGLIGENTextImagePipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) — | |
| 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 > 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.gligen_phrases",description:`<strong>gligen_phrases</strong> (<code>List[str]</code>) — | |
| The phrases to guide what to include in each of the regions defined by the corresponding | |
| <code>gligen_boxes</code>. There should only be one phrase per bounding box.`,name:"gligen_phrases"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.gligen_images",description:`<strong>gligen_images</strong> (<code>List[PIL.Image.Image]</code>) — | |
| The images to guide what to include in each of the regions defined by the corresponding <code>gligen_boxes</code>. | |
| There should only be one image per bounding box`,name:"gligen_images"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.input_phrases_mask",description:`<strong>input_phrases_mask</strong> (<code>int</code> or <code>List[int]</code>) — | |
| pre phrases mask input defined by the correspongding <code>input_phrases_mask</code>`,name:"input_phrases_mask"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.input_images_mask",description:`<strong>input_images_mask</strong> (<code>int</code> or <code>List[int]</code>) — | |
| pre images mask input defined by the correspongding <code>input_images_mask</code>`,name:"input_images_mask"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.gligen_boxes",description:`<strong>gligen_boxes</strong> (<code>List[List[float]]</code>) — | |
| The bounding boxes that identify rectangular regions of the image that are going to be filled with the | |
| content described by the corresponding <code>gligen_phrases</code>. Each rectangular box is defined as a | |
| <code>List[float]</code> of 4 elements <code>[xmin, ymin, xmax, ymax]</code> where each value is between [0,1].`,name:"gligen_boxes"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.gligen_inpaint_image",description:`<strong>gligen_inpaint_image</strong> (<code>PIL.Image.Image</code>, <em>optional</em>) — | |
| The input image, if provided, is inpainted with objects described by the <code>gligen_boxes</code> and | |
| <code>gligen_phrases</code>. Otherwise, it is treated as a generation task on a blank input image.`,name:"gligen_inpaint_image"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.gligen_scheduled_sampling_beta",description:`<strong>gligen_scheduled_sampling_beta</strong> (<code>float</code>, defaults to 0.3) — | |
| Scheduled Sampling factor from <a href="https://huggingface.co/papers/2301.07093" rel="nofollow">GLIGEN: Open-Set Grounded Text-to-Image | |
| Generation</a>. Scheduled Sampling factor is only varied for | |
| scheduled sampling during inference for improved quality and controllability.`,name:"gligen_scheduled_sampling_beta"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| 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 < 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) — | |
| Corresponds to parameter eta (η) from the <a href="https://huggingface.co/papers/2010.02502" rel="nofollow">DDIM</a> paper. Only | |
| applies to the <a href="/docs/diffusers/pr_11986/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENTextImagePipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENTextImagePipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENTextImagePipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENTextImagePipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"pil"</code>) — | |
| The output format of the generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to return a <a href="/docs/diffusers/pr_11986/en/api/pipelines/stable_diffusion/inpaint#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a | |
| plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENTextImagePipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| 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.StableDiffusionGLIGENTextImagePipeline.__call__.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENTextImagePipeline.__call__.gligen_normalize_constant",description:`<strong>gligen_normalize_constant</strong> (<code>float</code>, <em>optional</em>, defaults to 28.7) — | |
| The normalize value of the image embedding.`,name:"gligen_normalize_constant"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) — | |
| 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_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L714",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If <code>return_dict</code> is <code>True</code>, <a | |
| href="/docs/diffusers/pr_11986/en/api/pipelines/stable_diffusion/inpaint#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_11986/en/api/pipelines/stable_diffusion/inpaint#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput" | |
| >StableDiffusionPipelineOutput</a> or <code>tuple</code></p> | |
| `}}),A=new Zs({props:{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.__call__.example",$$slots:{default:[zs]},$$scope:{ctx:L}}}),Ie=new T({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/pipeline_utils.py#L2039"}}),we=new T({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/pipeline_utils.py#L2046"}}),ve=new T({props:{name:"enable_vae_tiling",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/pipeline_utils.py#L2053"}}),Te=new T({props:{name:"disable_vae_tiling",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/pipeline_utils.py#L2061"}}),Ge=new T({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:": typing.Optional[int] = None"},{name:"device",val:": typing.Union[torch.device, str] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.enable_model_cpu_offload.gpu_id",description:`<strong>gpu_id</strong> (<code>int</code>, <em>optional</em>) — | |
| The ID of the accelerator that shall be used in inference. If not specified, it will default to 0.`,name:"gpu_id"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.enable_model_cpu_offload.device",description:`<strong>device</strong> (<code>torch.Device</code> or <code>str</code>, <em>optional</em>, defaults to None) — | |
| The PyTorch device type of the accelerator that shall be used in inference. If not specified, it will | |
| automatically detect the available accelerator and use.`,name:"device"}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/pipeline_utils.py#L1151"}}),xe=new T({props:{name:"prepare_latents",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.prepare_latents",parameters:[{name:"batch_size",val:""},{name:"num_channels_latents",val:""},{name:"height",val:""},{name:"width",val:""},{name:"dtype",val:""},{name:"device",val:""},{name:"generator",val:""},{name:"latents",val:" = None"}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L528"}}),Je=new T({props:{name:"enable_fuser",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.enable_fuser",parameters:[{name:"enabled",val:" = True"}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L550"}}),je=new T({props:{name:"complete_mask",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.complete_mask",parameters:[{name:"has_mask",val:""},{name:"max_objs",val:""},{name:"device",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L587"}}),Ue=new T({props:{name:"crop",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.crop",parameters:[{name:"im",val:""},{name:"new_width",val:""},{name:"new_height",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L567"}}),Le=new T({props:{name:"draw_inpaint_mask_from_boxes",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.draw_inpaint_mask_from_boxes",parameters:[{name:"boxes",val:""},{name:"size",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L555"}}),Ne=new T({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.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.StableDiffusionGLIGENTextImagePipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| prompt to be encoded`,name:"prompt"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.encode_prompt.device",description:`<strong>device</strong> — (<code>torch.device</code>): | |
| torch device`,name:"device"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) — | |
| number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) — | |
| whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENTextImagePipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENTextImagePipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENTextImagePipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) — | |
| 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.StableDiffusionGLIGENTextImagePipeline.encode_prompt.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) — | |
| 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_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L251"}}),Ce=new T({props:{name:"get_clip_feature",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.get_clip_feature",parameters:[{name:"input",val:""},{name:"normalize_constant",val:""},{name:"device",val:""},{name:"is_image",val:" = False"}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L603"}}),Ee=new T({props:{name:"get_cross_attention_kwargs_with_grounded",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.get_cross_attention_kwargs_with_grounded",parameters:[{name:"hidden_size",val:""},{name:"gligen_phrases",val:""},{name:"gligen_images",val:""},{name:"gligen_boxes",val:""},{name:"input_phrases_mask",val:""},{name:"input_images_mask",val:""},{name:"repeat_batch",val:""},{name:"normalize_constant",val:""},{name:"max_objs",val:""},{name:"device",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L627"}}),Ze=new T({props:{name:"get_cross_attention_kwargs_without_grounded",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.get_cross_attention_kwargs_without_grounded",parameters:[{name:"hidden_size",val:""},{name:"repeat_batch",val:""},{name:"max_objs",val:""},{name:"device",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L691"}}),$e=new T({props:{name:"target_size_center_crop",anchor:"diffusers.StableDiffusionGLIGENTextImagePipeline.target_size_center_crop",parameters:[{name:"im",val:""},{name:"new_hw",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_11986/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py#L578"}}),Se=new Ft({props:{title:"StableDiffusionPipelineOutput",local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",headingTag:"h2"}}),De=new T({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>) — | |
| 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>) — | |
| List indicating whether the corresponding generated image contains “not-safe-for-work” (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_11986/src/diffusers/pipelines/stable_diffusion/pipeline_output.py#L10"}}),ke=new Bs({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/stable_diffusion/gligen.md"}}),{c(){d=a("meta"),U=n(),x=a("p"),y=n(),c(J.$$.fragment),l=n(),c(j.$$.fragment),Mt=n(),se=a("p"),se.innerHTML=Kn,yt=n(),ae=a("p"),ae.innerHTML=es,It=n(),ie=a("p"),ie.innerHTML=ts,wt=n(),c($.$$.fragment),vt=n(),oe=a("p"),oe.innerHTML=ns,Tt=n(),c(le.$$.fragment),Gt=n(),v=a("div"),c(re.$$.fragment),Kt=n(),Be=a("p"),Be.textContent=ss,en=n(),Ve=a("p"),Ve.innerHTML=as,tn=n(),N=a("div"),c(pe.$$.fragment),nn=n(),Ae=a("p"),Ae.textContent=is,sn=n(),c(S.$$.fragment),an=n(),D=a("div"),c(de.$$.fragment),on=n(),Re=a("p"),Re.textContent=os,ln=n(),k=a("div"),c(ce.$$.fragment),rn=n(),ze=a("p"),ze.innerHTML=ls,pn=n(),P=a("div"),c(me.$$.fragment),dn=n(),Ye=a("p"),Ye.textContent=rs,cn=n(),W=a("div"),c(ge.$$.fragment),mn=n(),Xe=a("p"),Xe.innerHTML=ps,gn=n(),B=a("div"),c(fe.$$.fragment),fn=n(),Qe=a("p"),Qe.innerHTML=ds,un=n(),He=a("div"),c(ue.$$.fragment),hn=n(),qe=a("div"),c(he.$$.fragment),_n=n(),V=a("div"),c(_e.$$.fragment),bn=n(),Fe=a("p"),Fe.textContent=cs,xt=n(),c(be.$$.fragment),Jt=n(),p=a("div"),c(Me.$$.fragment),Mn=n(),Oe=a("p"),Oe.textContent=ms,yn=n(),Ke=a("p"),Ke.innerHTML=gs,In=n(),C=a("div"),c(ye.$$.fragment),wn=n(),et=a("p"),et.textContent=fs,vn=n(),c(A.$$.fragment),Tn=n(),R=a("div"),c(Ie.$$.fragment),Gn=n(),tt=a("p"),tt.textContent=us,xn=n(),z=a("div"),c(we.$$.fragment),Jn=n(),nt=a("p"),nt.innerHTML=hs,jn=n(),Y=a("div"),c(ve.$$.fragment),Un=n(),st=a("p"),st.textContent=_s,Ln=n(),X=a("div"),c(Te.$$.fragment),Nn=n(),at=a("p"),at.innerHTML=bs,Cn=n(),Q=a("div"),c(Ge.$$.fragment),En=n(),it=a("p"),it.innerHTML=Ms,Zn=n(),ot=a("div"),c(xe.$$.fragment),$n=n(),lt=a("div"),c(Je.$$.fragment),Sn=n(),H=a("div"),c(je.$$.fragment),Dn=n(),rt=a("p"),rt.innerHTML=ys,kn=n(),q=a("div"),c(Ue.$$.fragment),Pn=n(),pt=a("p"),pt.textContent=Is,Wn=n(),F=a("div"),c(Le.$$.fragment),Bn=n(),dt=a("p"),dt.textContent=ws,Vn=n(),O=a("div"),c(Ne.$$.fragment),An=n(),ct=a("p"),ct.textContent=vs,Rn=n(),K=a("div"),c(Ce.$$.fragment),zn=n(),mt=a("p"),mt.textContent=Ts,Yn=n(),ee=a("div"),c(Ee.$$.fragment),Xn=n(),gt=a("p"),gt.textContent=Gs,Qn=n(),te=a("div"),c(Ze.$$.fragment),Hn=n(),ft=a("p"),ft.textContent=xs,qn=n(),ne=a("div"),c($e.$$.fragment),Fn=n(),ut=a("p"),ut.textContent=Js,jt=n(),c(Se.$$.fragment),Ut=n(),E=a("div"),c(De.$$.fragment),On=n(),ht=a("p"),ht.textContent=js,Lt=n(),c(ke.$$.fragment),Nt=n(),bt=a("p"),this.h()},l(e){const r=Ws("svelte-u9bgzb",document.head);d=i(r,"META",{name:!0,content:!0}),r.forEach(o),U=s(e),x=i(e,"P",{}),I(x).forEach(o),y=s(e),m(J.$$.fragment,e),l=s(e),m(j.$$.fragment,e),Mt=s(e),se=i(e,"P",{"data-svelte-h":!0}),b(se)!=="svelte-1sg6yja"&&(se.innerHTML=Kn),yt=s(e),ae=i(e,"P",{"data-svelte-h":!0}),b(ae)!=="svelte-uh0q2i"&&(ae.innerHTML=es),It=s(e),ie=i(e,"P",{"data-svelte-h":!0}),b(ie)!=="svelte-5czwpf"&&(ie.innerHTML=ts),wt=s(e),m($.$$.fragment,e),vt=s(e),oe=i(e,"P",{"data-svelte-h":!0}),b(oe)!=="svelte-1q0wtw2"&&(oe.innerHTML=ns),Tt=s(e),m(le.$$.fragment,e),Gt=s(e),v=i(e,"DIV",{class:!0});var G=I(v);m(re.$$.fragment,G),Kt=s(G),Be=i(G,"P",{"data-svelte-h":!0}),b(Be)!=="svelte-gowtb8"&&(Be.textContent=ss),en=s(G),Ve=i(G,"P",{"data-svelte-h":!0}),b(Ve)!=="svelte-ctvcn2"&&(Ve.innerHTML=as),tn=s(G),N=i(G,"DIV",{class:!0});var Z=I(N);m(pe.$$.fragment,Z),nn=s(Z),Ae=i(Z,"P",{"data-svelte-h":!0}),b(Ae)!=="svelte-50j04k"&&(Ae.textContent=is),sn=s(Z),m(S.$$.fragment,Z),Z.forEach(o),an=s(G),D=i(G,"DIV",{class:!0});var Pe=I(D);m(de.$$.fragment,Pe),on=s(Pe),Re=i(Pe,"P",{"data-svelte-h":!0}),b(Re)!=="svelte-14bnrb6"&&(Re.textContent=os),Pe.forEach(o),ln=s(G),k=i(G,"DIV",{class:!0});var We=I(k);m(ce.$$.fragment,We),rn=s(We),ze=i(We,"P",{"data-svelte-h":!0}),b(ze)!=="svelte-1s3c06i"&&(ze.innerHTML=ls),We.forEach(o),pn=s(G),P=i(G,"DIV",{class:!0});var Et=I(P);m(me.$$.fragment,Et),dn=s(Et),Ye=i(Et,"P",{"data-svelte-h":!0}),b(Ye)!=="svelte-1xwrf7t"&&(Ye.textContent=rs),Et.forEach(o),cn=s(G),W=i(G,"DIV",{class:!0});var Zt=I(W);m(ge.$$.fragment,Zt),mn=s(Zt),Xe=i(Zt,"P",{"data-svelte-h":!0}),b(Xe)!=="svelte-pkn4ui"&&(Xe.innerHTML=ps),Zt.forEach(o),gn=s(G),B=i(G,"DIV",{class:!0});var $t=I(B);m(fe.$$.fragment,$t),fn=s($t),Qe=i($t,"P",{"data-svelte-h":!0}),b(Qe)!=="svelte-9hgqai"&&(Qe.innerHTML=ds),$t.forEach(o),un=s(G),He=i(G,"DIV",{class:!0});var Us=I(He);m(ue.$$.fragment,Us),Us.forEach(o),hn=s(G),qe=i(G,"DIV",{class:!0});var Ls=I(qe);m(he.$$.fragment,Ls),Ls.forEach(o),_n=s(G),V=i(G,"DIV",{class:!0});var St=I(V);m(_e.$$.fragment,St),bn=s(St),Fe=i(St,"P",{"data-svelte-h":!0}),b(Fe)!=="svelte-16q0ax1"&&(Fe.textContent=cs),St.forEach(o),G.forEach(o),xt=s(e),m(be.$$.fragment,e),Jt=s(e),p=i(e,"DIV",{class:!0});var _=I(p);m(Me.$$.fragment,_),Mn=s(_),Oe=i(_,"P",{"data-svelte-h":!0}),b(Oe)!=="svelte-gowtb8"&&(Oe.textContent=ms),yn=s(_),Ke=i(_,"P",{"data-svelte-h":!0}),b(Ke)!=="svelte-ctvcn2"&&(Ke.innerHTML=gs),In=s(_),C=i(_,"DIV",{class:!0});var _t=I(C);m(ye.$$.fragment,_t),wn=s(_t),et=i(_t,"P",{"data-svelte-h":!0}),b(et)!=="svelte-50j04k"&&(et.textContent=fs),vn=s(_t),m(A.$$.fragment,_t),_t.forEach(o),Tn=s(_),R=i(_,"DIV",{class:!0});var Dt=I(R);m(Ie.$$.fragment,Dt),Gn=s(Dt),tt=i(Dt,"P",{"data-svelte-h":!0}),b(tt)!=="svelte-14bnrb6"&&(tt.textContent=us),Dt.forEach(o),xn=s(_),z=i(_,"DIV",{class:!0});var kt=I(z);m(we.$$.fragment,kt),Jn=s(kt),nt=i(kt,"P",{"data-svelte-h":!0}),b(nt)!=="svelte-1s3c06i"&&(nt.innerHTML=hs),kt.forEach(o),jn=s(_),Y=i(_,"DIV",{class:!0});var Pt=I(Y);m(ve.$$.fragment,Pt),Un=s(Pt),st=i(Pt,"P",{"data-svelte-h":!0}),b(st)!=="svelte-1xwrf7t"&&(st.textContent=_s),Pt.forEach(o),Ln=s(_),X=i(_,"DIV",{class:!0});var Wt=I(X);m(Te.$$.fragment,Wt),Nn=s(Wt),at=i(Wt,"P",{"data-svelte-h":!0}),b(at)!=="svelte-pkn4ui"&&(at.innerHTML=bs),Wt.forEach(o),Cn=s(_),Q=i(_,"DIV",{class:!0});var Bt=I(Q);m(Ge.$$.fragment,Bt),En=s(Bt),it=i(Bt,"P",{"data-svelte-h":!0}),b(it)!=="svelte-9hgqai"&&(it.innerHTML=Ms),Bt.forEach(o),Zn=s(_),ot=i(_,"DIV",{class:!0});var Ns=I(ot);m(xe.$$.fragment,Ns),Ns.forEach(o),$n=s(_),lt=i(_,"DIV",{class:!0});var Cs=I(lt);m(Je.$$.fragment,Cs),Cs.forEach(o),Sn=s(_),H=i(_,"DIV",{class:!0});var Vt=I(H);m(je.$$.fragment,Vt),Dn=s(Vt),rt=i(Vt,"P",{"data-svelte-h":!0}),b(rt)!=="svelte-z0y3an"&&(rt.innerHTML=ys),Vt.forEach(o),kn=s(_),q=i(_,"DIV",{class:!0});var At=I(q);m(Ue.$$.fragment,At),Pn=s(At),pt=i(At,"P",{"data-svelte-h":!0}),b(pt)!=="svelte-11j7r65"&&(pt.textContent=Is),At.forEach(o),Wn=s(_),F=i(_,"DIV",{class:!0});var Rt=I(F);m(Le.$$.fragment,Rt),Bn=s(Rt),dt=i(Rt,"P",{"data-svelte-h":!0}),b(dt)!=="svelte-9eocln"&&(dt.textContent=ws),Rt.forEach(o),Vn=s(_),O=i(_,"DIV",{class:!0});var zt=I(O);m(Ne.$$.fragment,zt),An=s(zt),ct=i(zt,"P",{"data-svelte-h":!0}),b(ct)!=="svelte-16q0ax1"&&(ct.textContent=vs),zt.forEach(o),Rn=s(_),K=i(_,"DIV",{class:!0});var Yt=I(K);m(Ce.$$.fragment,Yt),zn=s(Yt),mt=i(Yt,"P",{"data-svelte-h":!0}),b(mt)!=="svelte-1hybt25"&&(mt.textContent=Ts),Yt.forEach(o),Yn=s(_),ee=i(_,"DIV",{class:!0});var Xt=I(ee);m(Ee.$$.fragment,Xt),Xn=s(Xt),gt=i(Xt,"P",{"data-svelte-h":!0}),b(gt)!=="svelte-1f1gk5j"&&(gt.textContent=Gs),Xt.forEach(o),Qn=s(_),te=i(_,"DIV",{class:!0});var Qt=I(te);m(Ze.$$.fragment,Qt),Hn=s(Qt),ft=i(Qt,"P",{"data-svelte-h":!0}),b(ft)!=="svelte-1tqrrzw"&&(ft.textContent=xs),Qt.forEach(o),qn=s(_),ne=i(_,"DIV",{class:!0});var Ht=I(ne);m($e.$$.fragment,Ht),Fn=s(Ht),ut=i(Ht,"P",{"data-svelte-h":!0}),b(ut)!=="svelte-gczl07"&&(ut.textContent=Js),Ht.forEach(o),_.forEach(o),jt=s(e),m(Se.$$.fragment,e),Ut=s(e),E=i(e,"DIV",{class:!0});var qt=I(E);m(De.$$.fragment,qt),On=s(qt),ht=i(qt,"P",{"data-svelte-h":!0}),b(ht)!=="svelte-1qpjiuf"&&(ht.textContent=js),qt.forEach(o),Lt=s(e),m(ke.$$.fragment,e),Nt=s(e),bt=i(e,"P",{}),I(bt).forEach(o),this.h()},h(){w(d,"name","hf:doc:metadata"),w(d,"content",Xs),w(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(He,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(E,"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,r){t(document.head,d),M(e,U,r),M(e,x,r),M(e,y,r),g(J,e,r),M(e,l,r),g(j,e,r),M(e,Mt,r),M(e,se,r),M(e,yt,r),M(e,ae,r),M(e,It,r),M(e,ie,r),M(e,wt,r),g($,e,r),M(e,vt,r),M(e,oe,r),M(e,Tt,r),g(le,e,r),M(e,Gt,r),M(e,v,r),g(re,v,null),t(v,Kt),t(v,Be),t(v,en),t(v,Ve),t(v,tn),t(v,N),g(pe,N,null),t(N,nn),t(N,Ae),t(N,sn),g(S,N,null),t(v,an),t(v,D),g(de,D,null),t(D,on),t(D,Re),t(v,ln),t(v,k),g(ce,k,null),t(k,rn),t(k,ze),t(v,pn),t(v,P),g(me,P,null),t(P,dn),t(P,Ye),t(v,cn),t(v,W),g(ge,W,null),t(W,mn),t(W,Xe),t(v,gn),t(v,B),g(fe,B,null),t(B,fn),t(B,Qe),t(v,un),t(v,He),g(ue,He,null),t(v,hn),t(v,qe),g(he,qe,null),t(v,_n),t(v,V),g(_e,V,null),t(V,bn),t(V,Fe),M(e,xt,r),g(be,e,r),M(e,Jt,r),M(e,p,r),g(Me,p,null),t(p,Mn),t(p,Oe),t(p,yn),t(p,Ke),t(p,In),t(p,C),g(ye,C,null),t(C,wn),t(C,et),t(C,vn),g(A,C,null),t(p,Tn),t(p,R),g(Ie,R,null),t(R,Gn),t(R,tt),t(p,xn),t(p,z),g(we,z,null),t(z,Jn),t(z,nt),t(p,jn),t(p,Y),g(ve,Y,null),t(Y,Un),t(Y,st),t(p,Ln),t(p,X),g(Te,X,null),t(X,Nn),t(X,at),t(p,Cn),t(p,Q),g(Ge,Q,null),t(Q,En),t(Q,it),t(p,Zn),t(p,ot),g(xe,ot,null),t(p,$n),t(p,lt),g(Je,lt,null),t(p,Sn),t(p,H),g(je,H,null),t(H,Dn),t(H,rt),t(p,kn),t(p,q),g(Ue,q,null),t(q,Pn),t(q,pt),t(p,Wn),t(p,F),g(Le,F,null),t(F,Bn),t(F,dt),t(p,Vn),t(p,O),g(Ne,O,null),t(O,An),t(O,ct),t(p,Rn),t(p,K),g(Ce,K,null),t(K,zn),t(K,mt),t(p,Yn),t(p,ee),g(Ee,ee,null),t(ee,Xn),t(ee,gt),t(p,Qn),t(p,te),g(Ze,te,null),t(te,Hn),t(te,ft),t(p,qn),t(p,ne),g($e,ne,null),t(ne,Fn),t(ne,ut),M(e,jt,r),g(Se,e,r),M(e,Ut,r),M(e,E,r),g(De,E,null),t(E,On),t(E,ht),M(e,Lt,r),g(ke,e,r),M(e,Nt,r),M(e,bt,r),Ct=!0},p(e,[r]){const G={};r&2&&(G.$$scope={dirty:r,ctx:e}),J.$set(G);const Z={};r&2&&(Z.$$scope={dirty:r,ctx:e}),$.$set(Z);const Pe={};r&2&&(Pe.$$scope={dirty:r,ctx:e}),S.$set(Pe);const We={};r&2&&(We.$$scope={dirty:r,ctx:e}),A.$set(We)},i(e){Ct||(f(J.$$.fragment,e),f(j.$$.fragment,e),f($.$$.fragment,e),f(le.$$.fragment,e),f(re.$$.fragment,e),f(pe.$$.fragment,e),f(S.$$.fragment,e),f(de.$$.fragment,e),f(ce.$$.fragment,e),f(me.$$.fragment,e),f(ge.$$.fragment,e),f(fe.$$.fragment,e),f(ue.$$.fragment,e),f(he.$$.fragment,e),f(_e.$$.fragment,e),f(be.$$.fragment,e),f(Me.$$.fragment,e),f(ye.$$.fragment,e),f(A.$$.fragment,e),f(Ie.$$.fragment,e),f(we.$$.fragment,e),f(ve.$$.fragment,e),f(Te.$$.fragment,e),f(Ge.$$.fragment,e),f(xe.$$.fragment,e),f(Je.$$.fragment,e),f(je.$$.fragment,e),f(Ue.$$.fragment,e),f(Le.$$.fragment,e),f(Ne.$$.fragment,e),f(Ce.$$.fragment,e),f(Ee.$$.fragment,e),f(Ze.$$.fragment,e),f($e.$$.fragment,e),f(Se.$$.fragment,e),f(De.$$.fragment,e),f(ke.$$.fragment,e),Ct=!0)},o(e){u(J.$$.fragment,e),u(j.$$.fragment,e),u($.$$.fragment,e),u(le.$$.fragment,e),u(re.$$.fragment,e),u(pe.$$.fragment,e),u(S.$$.fragment,e),u(de.$$.fragment,e),u(ce.$$.fragment,e),u(me.$$.fragment,e),u(ge.$$.fragment,e),u(fe.$$.fragment,e),u(ue.$$.fragment,e),u(he.$$.fragment,e),u(_e.$$.fragment,e),u(be.$$.fragment,e),u(Me.$$.fragment,e),u(ye.$$.fragment,e),u(A.$$.fragment,e),u(Ie.$$.fragment,e),u(we.$$.fragment,e),u(ve.$$.fragment,e),u(Te.$$.fragment,e),u(Ge.$$.fragment,e),u(xe.$$.fragment,e),u(Je.$$.fragment,e),u(je.$$.fragment,e),u(Ue.$$.fragment,e),u(Le.$$.fragment,e),u(Ne.$$.fragment,e),u(Ce.$$.fragment,e),u(Ee.$$.fragment,e),u(Ze.$$.fragment,e),u($e.$$.fragment,e),u(Se.$$.fragment,e),u(De.$$.fragment,e),u(ke.$$.fragment,e),Ct=!1},d(e){e&&(o(U),o(x),o(y),o(l),o(Mt),o(se),o(yt),o(ae),o(It),o(ie),o(wt),o(vt),o(oe),o(Tt),o(Gt),o(v),o(xt),o(Jt),o(p),o(jt),o(Ut),o(E),o(Lt),o(Nt),o(bt)),o(d),h(J,e),h(j,e),h($,e),h(le,e),h(re),h(pe),h(S),h(de),h(ce),h(me),h(ge),h(fe),h(ue),h(he),h(_e),h(be,e),h(Me),h(ye),h(A),h(Ie),h(we),h(ve),h(Te),h(Ge),h(xe),h(Je),h(je),h(Ue),h(Le),h(Ne),h(Ce),h(Ee),h(Ze),h($e),h(Se,e),h(De),h(ke,e)}}}const Xs='{"title":"GLIGEN (Grounded Language-to-Image Generation)","local":"gligen-grounded-language-to-image-generation","sections":[{"title":"StableDiffusionGLIGENPipeline","local":"diffusers.StableDiffusionGLIGENPipeline","sections":[],"depth":2},{"title":"StableDiffusionGLIGENTextImagePipeline","local":"diffusers.StableDiffusionGLIGENTextImagePipeline","sections":[],"depth":2},{"title":"StableDiffusionPipelineOutput","local":"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput","sections":[],"depth":2}],"depth":1}';function Qs(L){return Ds(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class na extends ks{constructor(d){super(),Ps(this,d,Qs,Ys,Ss,{})}}export{na as component}; | |
Xet Storage Details
- Size:
- 99.7 kB
- Xet hash:
- 8811f407b43f43235911904b619cd2f16dba22f4f8c28238596dcae252ef4bd6
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.