import{S as Ar,i as Er,s as Jr,e as a,k as d,w,t as l,M as Zr,c as s,d as t,m as c,a as i,x as v,h as r,b as y,G as e,g as b,y as I,q as $,o as T,B as j,v as Gr,L as me}from"../../../chunks/vendor-hf-doc-builder.js";import{T as kn}from"../../../chunks/Tip-hf-doc-builder.js";import{D as de}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as oe}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as An}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ce}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Wr(x){let p,_,m,f,u;return{c(){p=a("p"),_=l("Check out the "),m=a("a"),f=l("AutoPipeline"),u=l(" tutorial to learn how to use this API!"),this.h()},l(n){p=s(n,"P",{});var h=i(p);_=r(h,"Check out the "),m=s(h,"A",{href:!0});var A=i(m);f=r(A,"AutoPipeline"),A.forEach(t),u=r(h," tutorial to learn how to use this API!"),h.forEach(t),this.h()},h(){y(m,"href","/tutorials/autopipeline")},m(n,h){b(n,p,h),e(p,_),e(p,m),e(m,f),e(p,u)},d(n){n&&t(p)}}}function Sr(x){let p,_,m,f,u;return f=new oe({props:{code:"U29tZSUyMHdlaWdodHMlMjBvZiUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTIwd2VyZSUyMG5vdCUyMGluaXRpYWxpemVkJTIwZnJvbSUyMHRoZSUyMG1vZGVsJTIwY2hlY2twb2ludCUyMGF0JTIwcnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjBhbmQlMjBhcmUlMjBuZXdseSUyMGluaXRpYWxpemVkJTIwYmVjYXVzZSUyMHRoZSUyMHNoYXBlcyUyMGRpZCUyMG5vdCUyMG1hdGNoJTNBJTBBLSUyMGNvbnZfaW4ud2VpZ2h0JTNBJTIwZm91bmQlMjBzaGFwZSUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwNCUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwY2hlY2twb2ludCUyMGFuZCUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwOSUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwbW9kZWwlMjBpbnN0YW50aWF0ZWQlMEFZb3UlMjBzaG91bGQlMjBwcm9iYWJseSUyMFRSQUlOJTIwdGhpcyUyMG1vZGVsJTIwb24lMjBhJTIwZG93bi1zdHJlYW0lMjB0YXNrJTIwdG8lMjBiZSUyMGFibGUlMjB0byUyMHVzZSUyMGl0JTIwZm9yJTIwcHJlZGljdGlvbnMlMjBhbmQlMjBpbmZlcmVuY2Uu",highlighted:`<span class="hljs-comment">Some</span> <span class="hljs-comment">weights</span> <span class="hljs-comment">of</span> <span class="hljs-comment">UNet2DConditionModel were not initialized from the model checkpoint at</span> <span class="hljs-comment">runwayml/stable</span><span class="hljs-literal">-</span><span class="hljs-comment">diffusion</span><span class="hljs-literal">-</span><span class="hljs-comment">v1</span><span class="hljs-literal">-</span><span class="hljs-comment">5 and are newly initialized because the shapes did</span> <span class="hljs-comment">not</span> <span class="hljs-comment">match:</span>
<span class="hljs-literal">-</span> <span class="hljs-comment">conv_in</span><span class="hljs-string">.</span><span class="hljs-comment">weight:</span> <span class="hljs-comment">found</span> <span class="hljs-comment">shape</span> <span class="hljs-comment">torch</span><span class="hljs-string">.</span><span class="hljs-comment">Size(</span><span class="hljs-title">[</span><span class="hljs-comment">320</span><span class="hljs-string">,</span> <span class="hljs-comment">4</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-title">]</span><span class="hljs-comment">) in the checkpoint and</span> <span class="hljs-comment">torch</span><span class="hljs-string">.</span><span class="hljs-comment">Size(</span><span class="hljs-title">[</span><span class="hljs-comment">320</span><span class="hljs-string">,</span> <span class="hljs-comment">9</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-title">]</span><span class="hljs-comment">) in the model instantiated</span>
<span class="hljs-comment">You</span> <span class="hljs-comment">should</span> <span class="hljs-comment">probably</span> <span class="hljs-comment">TRAIN this model on a down-stream task to be able to use it for predictions and inference</span><span class="hljs-string">.</span>`}}),{c(){p=a("p"),_=l("If you get the error message below, you need to finetune the weights for your downstream task:"),m=d(),w(f.$$.fragment)},l(n){p=s(n,"P",{});var h=i(p);_=r(h,"If you get the error message below, you need to finetune the weights for your downstream task:"),h.forEach(t),m=c(n),v(f.$$.fragment,n)},m(n,h){b(n,p,h),e(p,_),b(n,m,h),I(f,n,h),u=!0},p:me,i(n){u||($(f.$$.fragment,n),u=!0)},o(n){T(f.$$.fragment,n),u=!1},d(n){n&&t(p),n&&t(m),j(f,n)}}}function Br(x){let p,_,m,f,u,n,h,A;return{c(){p=a("p"),_=l("To use private or "),m=a("a"),f=l("gated"),u=l(` models, log-in with
`),n=a("code"),h=l("huggingface-cli login"),A=l("."),this.h()},l(k){p=s(k,"P",{});var M=i(p);_=r(M,"To use private or "),m=s(M,"A",{href:!0,rel:!0});var B=i(m);f=r(B,"gated"),B.forEach(t),u=r(M,` models, log-in with
`),n=s(M,"CODE",{});var N=i(n);h=r(N,"huggingface-cli login"),N.forEach(t),A=r(M,"."),M.forEach(t),this.h()},h(){y(m,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),y(m,"rel","nofollow")},m(k,M){b(k,p,M),e(p,_),e(p,m),e(m,f),e(p,u),e(p,n),e(n,h),e(p,A)},d(k){k&&t(p)}}}function Cr(x){let p,_,m,f,u;return f=new oe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEElMEFwaXBlbGluZSUyMCUzRCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UuZnJvbV9wcmV0cmFpbmVkKCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyKSUwQWltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0KS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image

<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = AutoPipelineForText2Image.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipeline(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){p=a("p"),_=l("Examples:"),m=d(),w(f.$$.fragment)},l(n){p=s(n,"P",{});var h=i(p);_=r(h,"Examples:"),h.forEach(t),m=c(n),v(f.$$.fragment,n)},m(n,h){b(n,p,h),e(p,_),b(n,m,h),I(f,n,h),u=!0},p:me,i(n){u||($(f.$$.fragment,n),u=!0)},o(n){T(f.$$.fragment,n),u=!1},d(n){n&&t(p),n&&t(m),j(f,n)}}}function Vr(x){let p,_;return p=new oe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMkMlMjBBdXRvUGlwZWxpbmVGb3JJbWFnZTJJbWFnZSUwQSUwQXBpcGVfaTJpJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9ySW1hZ2UySW1hZ2UuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTIwcmVxdWlyZXNfc2FmZXR5X2NoZWNrZXIlM0RGYWxzZSUwQSklMEElMEFwaXBlX3QyaSUyMCUzRCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UuZnJvbV9waXBlKHBpcGVfaTJpKSUwQWltYWdlJTIwJTNEJTIwcGlwZV90MmkocHJvbXB0KS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image, AutoPipelineForImage2Image

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe_i2i = AutoPipelineForImage2Image.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, requires_safety_checker=<span class="hljs-literal">False</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe_t2i = AutoPipelineForText2Image.from_pipe(pipe_i2i)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe_t2i(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){w(p.$$.fragment)},l(m){v(p.$$.fragment,m)},m(m,f){I(p,m,f),_=!0},p:me,i(m){_||($(p.$$.fragment,m),_=!0)},o(m){T(p.$$.fragment,m),_=!1},d(m){j(p,m)}}}function Dr(x){let p,_,m,f,u;return f=new oe({props:{code:"U29tZSUyMHdlaWdodHMlMjBvZiUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTIwd2VyZSUyMG5vdCUyMGluaXRpYWxpemVkJTIwZnJvbSUyMHRoZSUyMG1vZGVsJTIwY2hlY2twb2ludCUyMGF0JTIwcnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjBhbmQlMjBhcmUlMjBuZXdseSUyMGluaXRpYWxpemVkJTIwYmVjYXVzZSUyMHRoZSUyMHNoYXBlcyUyMGRpZCUyMG5vdCUyMG1hdGNoJTNBJTBBLSUyMGNvbnZfaW4ud2VpZ2h0JTNBJTIwZm91bmQlMjBzaGFwZSUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwNCUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwY2hlY2twb2ludCUyMGFuZCUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwOSUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwbW9kZWwlMjBpbnN0YW50aWF0ZWQlMEFZb3UlMjBzaG91bGQlMjBwcm9iYWJseSUyMFRSQUlOJTIwdGhpcyUyMG1vZGVsJTIwb24lMjBhJTIwZG93bi1zdHJlYW0lMjB0YXNrJTIwdG8lMjBiZSUyMGFibGUlMjB0byUyMHVzZSUyMGl0JTIwZm9yJTIwcHJlZGljdGlvbnMlMjBhbmQlMjBpbmZlcmVuY2Uu",highlighted:`<span class="hljs-comment">Some</span> <span class="hljs-comment">weights</span> <span class="hljs-comment">of</span> <span class="hljs-comment">UNet2DConditionModel were not initialized from the model checkpoint at</span> <span class="hljs-comment">runwayml/stable</span><span class="hljs-literal">-</span><span class="hljs-comment">diffusion</span><span class="hljs-literal">-</span><span class="hljs-comment">v1</span><span class="hljs-literal">-</span><span class="hljs-comment">5 and are newly initialized because the shapes did</span> <span class="hljs-comment">not</span> <span class="hljs-comment">match:</span>
<span class="hljs-literal">-</span> <span class="hljs-comment">conv_in</span><span class="hljs-string">.</span><span class="hljs-comment">weight:</span> <span class="hljs-comment">found</span> <span class="hljs-comment">shape</span> <span class="hljs-comment">torch</span><span class="hljs-string">.</span><span class="hljs-comment">Size(</span><span class="hljs-title">[</span><span class="hljs-comment">320</span><span class="hljs-string">,</span> <span class="hljs-comment">4</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-title">]</span><span class="hljs-comment">) in the checkpoint and</span> <span class="hljs-comment">torch</span><span class="hljs-string">.</span><span class="hljs-comment">Size(</span><span class="hljs-title">[</span><span class="hljs-comment">320</span><span class="hljs-string">,</span> <span class="hljs-comment">9</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-title">]</span><span class="hljs-comment">) in the model instantiated</span>
<span class="hljs-comment">You</span> <span class="hljs-comment">should</span> <span class="hljs-comment">probably</span> <span class="hljs-comment">TRAIN this model on a down-stream task to be able to use it for predictions and inference</span><span class="hljs-string">.</span>`}}),{c(){p=a("p"),_=l("If you get the error message below, you need to finetune the weights for your downstream task:"),m=d(),w(f.$$.fragment)},l(n){p=s(n,"P",{});var h=i(p);_=r(h,"If you get the error message below, you need to finetune the weights for your downstream task:"),h.forEach(t),m=c(n),v(f.$$.fragment,n)},m(n,h){b(n,p,h),e(p,_),b(n,m,h),I(f,n,h),u=!0},p:me,i(n){u||($(f.$$.fragment,n),u=!0)},o(n){T(f.$$.fragment,n),u=!1},d(n){n&&t(p),n&&t(m),j(f,n)}}}function Rr(x){let p,_,m,f,u,n,h,A;return{c(){p=a("p"),_=l("To use private or "),m=a("a"),f=l("gated"),u=l(` models, log-in with
`),n=a("code"),h=l("huggingface-cli login"),A=l("."),this.h()},l(k){p=s(k,"P",{});var M=i(p);_=r(M,"To use private or "),m=s(M,"A",{href:!0,rel:!0});var B=i(m);f=r(B,"gated"),B.forEach(t),u=r(M,` models, log-in with
`),n=s(M,"CODE",{});var N=i(n);h=r(N,"huggingface-cli login"),N.forEach(t),A=r(M,"."),M.forEach(t),this.h()},h(){y(m,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),y(m,"rel","nofollow")},m(k,M){b(k,p,M),e(p,_),e(p,m),e(m,f),e(p,u),e(p,n),e(n,h),e(p,A)},d(k){k&&t(p)}}}function Nr(x){let p,_,m,f,u;return f=new oe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvckltYWdlMkltYWdlJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JJbWFnZTJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIpJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlMkMlMjBpbWFnZSkuaW1hZ2VzJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForImage2Image

<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = AutoPipelineForImage2Image.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipeline(prompt, image).images[<span class="hljs-number">0</span>]`}}),{c(){p=a("p"),_=l("Examples:"),m=d(),w(f.$$.fragment)},l(n){p=s(n,"P",{});var h=i(p);_=r(h,"Examples:"),h.forEach(t),m=c(n),v(f.$$.fragment,n)},m(n,h){b(n,p,h),e(p,_),b(n,m,h),I(f,n,h),u=!0},p:me,i(n){u||($(f.$$.fragment,n),u=!0)},o(n){T(f.$$.fragment,n),u=!1},d(n){n&&t(p),n&&t(m),j(f,n)}}}function Xr(x){let p,_,m,f,u;return f=new oe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMkMlMjBBdXRvUGlwZWxpbmVGb3JJbWFnZTJJbWFnZSUwQSUwQXBpcGVfdDJpJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMjByZXF1aXJlc19zYWZldHlfY2hlY2tlciUzREZhbHNlJTBBKSUwQSUwQXBpcGVfaTJpJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9ySW1hZ2UySW1hZ2UuZnJvbV9waXBlKHBpcGVfdDJpKSUwQWltYWdlJTIwJTNEJTIwcGlwZV9pMmkocHJvbXB0JTJDJTIwaW1hZ2UpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image, AutoPipelineForImage2Image

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe_t2i = AutoPipelineForText2Image.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, requires_safety_checker=<span class="hljs-literal">False</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe_i2i = AutoPipelineForImage2Image.from_pipe(pipe_t2i)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe_i2i(prompt, image).images[<span class="hljs-number">0</span>]`}}),{c(){p=a("p"),_=l("Examples:"),m=d(),w(f.$$.fragment)},l(n){p=s(n,"P",{});var h=i(p);_=r(h,"Examples:"),h.forEach(t),m=c(n),v(f.$$.fragment,n)},m(n,h){b(n,p,h),e(p,_),b(n,m,h),I(f,n,h),u=!0},p:me,i(n){u||($(f.$$.fragment,n),u=!0)},o(n){T(f.$$.fragment,n),u=!1},d(n){n&&t(p),n&&t(m),j(f,n)}}}function Qr(x){let p,_,m,f,u;return f=new oe({props:{code:"U29tZSUyMHdlaWdodHMlMjBvZiUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTIwd2VyZSUyMG5vdCUyMGluaXRpYWxpemVkJTIwZnJvbSUyMHRoZSUyMG1vZGVsJTIwY2hlY2twb2ludCUyMGF0JTIwcnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjBhbmQlMjBhcmUlMjBuZXdseSUyMGluaXRpYWxpemVkJTIwYmVjYXVzZSUyMHRoZSUyMHNoYXBlcyUyMGRpZCUyMG5vdCUyMG1hdGNoJTNBJTBBLSUyMGNvbnZfaW4ud2VpZ2h0JTNBJTIwZm91bmQlMjBzaGFwZSUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwNCUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwY2hlY2twb2ludCUyMGFuZCUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwOSUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwbW9kZWwlMjBpbnN0YW50aWF0ZWQlMEFZb3UlMjBzaG91bGQlMjBwcm9iYWJseSUyMFRSQUlOJTIwdGhpcyUyMG1vZGVsJTIwb24lMjBhJTIwZG93bi1zdHJlYW0lMjB0YXNrJTIwdG8lMjBiZSUyMGFibGUlMjB0byUyMHVzZSUyMGl0JTIwZm9yJTIwcHJlZGljdGlvbnMlMjBhbmQlMjBpbmZlcmVuY2Uu",highlighted:`<span class="hljs-comment">Some</span> <span class="hljs-comment">weights</span> <span class="hljs-comment">of</span> <span class="hljs-comment">UNet2DConditionModel were not initialized from the model checkpoint at</span> <span class="hljs-comment">runwayml/stable</span><span class="hljs-literal">-</span><span class="hljs-comment">diffusion</span><span class="hljs-literal">-</span><span class="hljs-comment">v1</span><span class="hljs-literal">-</span><span class="hljs-comment">5 and are newly initialized because the shapes did</span> <span class="hljs-comment">not</span> <span class="hljs-comment">match:</span>
<span class="hljs-literal">-</span> <span class="hljs-comment">conv_in</span><span class="hljs-string">.</span><span class="hljs-comment">weight:</span> <span class="hljs-comment">found</span> <span class="hljs-comment">shape</span> <span class="hljs-comment">torch</span><span class="hljs-string">.</span><span class="hljs-comment">Size(</span><span class="hljs-title">[</span><span class="hljs-comment">320</span><span class="hljs-string">,</span> <span class="hljs-comment">4</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-title">]</span><span class="hljs-comment">) in the checkpoint and</span> <span class="hljs-comment">torch</span><span class="hljs-string">.</span><span class="hljs-comment">Size(</span><span class="hljs-title">[</span><span class="hljs-comment">320</span><span class="hljs-string">,</span> <span class="hljs-comment">9</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-title">]</span><span class="hljs-comment">) in the model instantiated</span>
<span class="hljs-comment">You</span> <span class="hljs-comment">should</span> <span class="hljs-comment">probably</span> <span class="hljs-comment">TRAIN this model on a down-stream task to be able to use it for predictions and inference</span><span class="hljs-string">.</span>`}}),{c(){p=a("p"),_=l("If you get the error message below, you need to finetune the weights for your downstream task:"),m=d(),w(f.$$.fragment)},l(n){p=s(n,"P",{});var h=i(p);_=r(h,"If you get the error message below, you need to finetune the weights for your downstream task:"),h.forEach(t),m=c(n),v(f.$$.fragment,n)},m(n,h){b(n,p,h),e(p,_),b(n,m,h),I(f,n,h),u=!0},p:me,i(n){u||($(f.$$.fragment,n),u=!0)},o(n){T(f.$$.fragment,n),u=!1},d(n){n&&t(p),n&&t(m),j(f,n)}}}function zr(x){let p,_,m,f,u,n,h,A;return{c(){p=a("p"),_=l("To use private or "),m=a("a"),f=l("gated"),u=l(` models, log-in with
`),n=a("code"),h=l("huggingface-cli login"),A=l("."),this.h()},l(k){p=s(k,"P",{});var M=i(p);_=r(M,"To use private or "),m=s(M,"A",{href:!0,rel:!0});var B=i(m);f=r(B,"gated"),B.forEach(t),u=r(M,` models, log-in with
`),n=s(M,"CODE",{});var N=i(n);h=r(N,"huggingface-cli login"),N.forEach(t),A=r(M,"."),M.forEach(t),this.h()},h(){y(m,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),y(m,"rel","nofollow")},m(k,M){b(k,p,M),e(p,_),e(p,m),e(m,f),e(p,u),e(p,n),e(n,h),e(p,A)},d(k){k&&t(p)}}}function Lr(x){let p,_,m,f,u;return f=new oe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvcklucGFpbnRpbmclMEElMEFwaXBlbGluZSUyMCUzRCUyMEF1dG9QaXBlbGluZUZvcklucGFpbnRpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyKSUwQWltYWdlJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0JTJDJTIwaW1hZ2UlM0Rpbml0X2ltYWdlJTJDJTIwbWFza19pbWFnZSUzRG1hc2tfaW1hZ2UpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForInpainting

<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = AutoPipelineForInpainting.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipeline(prompt, image=init_image, mask_image=mask_image).images[<span class="hljs-number">0</span>]`}}),{c(){p=a("p"),_=l("Examples:"),m=d(),w(f.$$.fragment)},l(n){p=s(n,"P",{});var h=i(p);_=r(h,"Examples:"),h.forEach(t),m=c(n),v(f.$$.fragment,n)},m(n,h){b(n,p,h),e(p,_),b(n,m,h),I(f,n,h),u=!0},p:me,i(n){u||($(f.$$.fragment,n),u=!0)},o(n){T(f.$$.fragment,n),u=!1},d(n){n&&t(p),n&&t(m),j(f,n)}}}function Yr(x){let p,_,m,f,u;return f=new oe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMkMlMjBBdXRvUGlwZWxpbmVGb3JJbnBhaW50aW5nJTBBJTBBcGlwZV90MmklMjAlM0QlMjBBdXRvUGlwZWxpbmVGb3JUZXh0MkltYWdlLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJEZWVwRmxveWQlMkZJRi1JLVhMLXYxLjAlMjIlMkMlMjByZXF1aXJlc19zYWZldHlfY2hlY2tlciUzREZhbHNlJTBBKSUwQSUwQXBpcGVfaW5wYWludCUyMCUzRCUyMEF1dG9QaXBlbGluZUZvcklucGFpbnRpbmcuZnJvbV9waXBlKHBpcGVfdDJpKSUwQWltYWdlJTIwJTNEJTIwcGlwZV9pbnBhaW50KHByb21wdCUyQyUyMGltYWdlJTNEaW5pdF9pbWFnZSUyQyUyMG1hc2tfaW1hZ2UlM0RtYXNrX2ltYWdlKS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image, AutoPipelineForInpainting

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe_t2i = AutoPipelineForText2Image.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;DeepFloyd/IF-I-XL-v1.0&quot;</span>, requires_safety_checker=<span class="hljs-literal">False</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe_inpaint = AutoPipelineForInpainting.from_pipe(pipe_t2i)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe_inpaint(prompt, image=init_image, mask_image=mask_image).images[<span class="hljs-number">0</span>]`}}),{c(){p=a("p"),_=l("Examples:"),m=d(),w(f.$$.fragment)},l(n){p=s(n,"P",{});var h=i(p);_=r(h,"Examples:"),h.forEach(t),m=c(n),v(f.$$.fragment,n)},m(n,h){b(n,p,h),e(p,_),b(n,m,h),I(f,n,h),u=!0},p:me,i(n){u||($(f.$$.fragment,n),u=!0)},o(n){T(f.$$.fragment,n),u=!1},d(n){n&&t(p),n&&t(m),j(f,n)}}}function Hr(x){let p,_,m,f,u,n,h,A,k,M,B,N,En,Jn,tn,fe,Jt,Zn,Gn,Zt,Wn,on,O,Sn,Gt,Bn,Cn,Wt,Vn,Dn,nn,he,Rn,St,Nn,Xn,an,Je,sn,ue,ln,Ze,Bt,Qn,zn,rn,C,Ct,mt,Ln,Yn,Vt,ft,Hn,qn,Dt,ht,On,Kn,Rt,ut,ea,ta,Nt,gt,oa,na,Xt,_t,aa,pn,ne,ge,Qt,Ge,sa,zt,ia,dn,E,We,la,K,yt,ra,pa,bt,da,ca,wt,ma,fa,ha,Se,ua,Lt,ga,_a,ya,Yt,ba,wa,Ht,_e,qt,va,Ia,Ot,$a,Ta,ja,U,Be,Ma,Kt,xa,Ua,eo,Pa,Fa,Ce,to,ka,Aa,oo,Ea,Ja,ae,Za,no,Ga,Wa,vt,Sa,Ba,Ca,Ve,Va,ao,Da,Ra,Na,ye,Xa,be,Qa,we,za,V,De,La,so,Ya,Ha,io,qa,Oa,lo,Ka,es,Re,ts,ro,os,ns,as,ve,cn,se,Ie,po,Ne,ss,co,is,mn,J,Xe,ls,ee,It,rs,ps,$t,ds,cs,Tt,ms,fs,hs,Qe,us,mo,gs,_s,ys,fo,bs,ws,ho,$e,uo,vs,Is,go,$s,Ts,js,P,ze,Ms,_o,xs,Us,yo,Ps,Fs,Le,bo,ks,As,wo,Es,Js,ie,Zs,vo,Gs,Ws,jt,Ss,Bs,Cs,Ye,Vs,Io,Ds,Rs,Ns,Te,Xs,je,Qs,Me,zs,D,He,Ls,$o,Ys,Hs,To,qs,Os,jo,Ks,ei,qe,ti,Mo,oi,ni,ai,xe,fn,le,Ue,xo,Oe,si,Uo,ii,hn,Z,Ke,li,te,Mt,ri,pi,xt,di,ci,Ut,mi,fi,hi,et,ui,Po,gi,_i,yi,Fo,bi,wi,ko,Pe,Ao,vi,Ii,Eo,$i,Ti,ji,F,tt,Mi,Jo,xi,Ui,Zo,Pi,Fi,ot,Go,ki,Ai,Wo,Ei,Ji,re,Zi,So,Gi,Wi,Pt,Si,Bi,Ci,nt,Vi,Bo,Di,Ri,Ni,Fe,Xi,ke,Qi,Ae,zi,R,at,Li,Co,Yi,Hi,Vo,qi,Oi,Do,Ki,el,st,tl,Ro,ol,nl,al,Ee,un;return n=new An({}),Je=new oe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlJTBBKS50byglMjJjdWRhJTIyKSUwQXByb21wdCUyMCUzRCUyMCUyMkFzdHJvbmF1dCUyMGluJTIwYSUyMGp1bmdsZSUyQyUyMGNvbGQlMjBjb2xvciUyMHBhbGV0dGUlMkMlMjBtdXRlZCUyMGNvbG9ycyUyQyUyMGRldGFpbGVkJTJDJTIwOGslMjIlMEElMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lKHByb21wdCUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QyNSkuaW1hZ2VzJTVCMCU1RA==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image
<span class="hljs-keyword">import</span> torch

pipeline = AutoPipelineForText2Image.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, torch_dtype=torch.float16, use_safetensors=<span class="hljs-literal">True</span>
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
prompt = <span class="hljs-string">&quot;Astronaut in a jungle, cold color palette, muted colors, detailed, 8k&quot;</span>

image = pipeline(prompt, num_inference_steps=<span class="hljs-number">25</span>).images[<span class="hljs-number">0</span>]`}}),ue=new kn({props:{$$slots:{default:[Wr]},$$scope:{ctx:x}}}),Ge=new An({}),We=new de({props:{name:"class diffusers.AutoPipelineForText2Image",anchor:"diffusers.AutoPipelineForText2Image",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/auto_pipeline.py#L161"}}),Be=new de({props:{name:"from_pretrained",anchor:"diffusers.AutoPipelineForText2Image.from_pretrained",parameters:[{name:"pretrained_model_or_path",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>repo id</em> (for example <code>CompVis/ldm-text2im-large-256</code>) of a pretrained pipeline
hosted on the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_pipeline_directory/</code>) containing pipeline weights
saved using
<a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline.save_pretrained">save_pretrained()</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model with another dtype. If &#x201C;auto&#x201D; is passed, the
dtype is automatically derived from the model&#x2019;s weights.`,name:"torch_dtype"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.output_loading_info(bool,",description:`<strong>output_loading_info(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.`,name:"output_loading_info(bool,"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.custom_revision",description:`<strong>custom_revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id similar to
<code>revision</code> when loading a custom pipeline from the Hub. It can be a &#x1F917; Diffusers version when loading a
custom pipeline from GitHub, otherwise it defaults to <code>&quot;main&quot;</code> when loading from the Hub.`,name:"custom_revision"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>Dict[str, Union[int, str, torch.device]]</code>, <em>optional</em>) &#x2014;
A map that specifies where each submodule should go. It doesn&#x2019;t need to be defined for each
parameter/buffer name; once a given module name is inside, every submodule of it will be sent to the
same device.</p>
<p>Set <code>device_map=&quot;auto&quot;</code> to have &#x1F917; Accelerate automatically compute the most optimized <code>device_map</code>. For
more information about each option see <a href="https://hf.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map" rel="nofollow">designing a device
map</a>.`,name:"device_map"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.max_memory",description:`<strong>max_memory</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
A dictionary device identifier for the maximum memory. Will default to the maximum memory available for
each GPU and the available CPU RAM if unset.`,name:"max_memory"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.offload_folder",description:`<strong>offload_folder</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
The path to offload weights if device_map contains the value <code>&quot;disk&quot;</code>.`,name:"offload_folder"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.offload_state_dict",description:`<strong>offload_state_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, temporarily offloads the CPU state dict to the hard drive to avoid running out of CPU RAM if
the weight of the CPU state dict + the biggest shard of the checkpoint does not fit. Defaults to <code>True</code>
when there is some disk offload.`,name:"offload_state_dict"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 else <code>False</code>) &#x2014;
Speed up model loading only loading the pretrained weights and not initializing the weights. This also
tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model.
Only supported for PyTorch &gt;= 1.9.0. If you are using an older version of PyTorch, setting this
argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to <code>None</code>, the safetensors weights are downloaded if they&#x2019;re available <strong>and</strong> if the
safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors
weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to overwrite load and saveable variables (the pipeline components of the specific pipeline
class). The overwritten components are passed directly to the pipelines <code>__init__</code> method. See example
below for more information.`,name:"kwargs"},{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Load weights from a specified variant filename such as <code>&quot;fp16&quot;</code> or <code>&quot;ema&quot;</code>. This is ignored when
loading <code>from_flax</code>.`,name:"variant"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/auto_pipeline.py#L185"}}),ye=new ce({props:{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.example",$$slots:{default:[Sr]},$$scope:{ctx:x}}}),be=new kn({props:{$$slots:{default:[Br]},$$scope:{ctx:x}}}),we=new ce({props:{anchor:"diffusers.AutoPipelineForText2Image.from_pretrained.example-2",$$slots:{default:[Cr]},$$scope:{ctx:x}}}),De=new de({props:{name:"from_pipe",anchor:"diffusers.AutoPipelineForText2Image.from_pipe",parameters:[{name:"pipeline",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.AutoPipelineForText2Image.from_pipe.pipeline",description:`<strong>pipeline</strong> (<code>DiffusionPipeline</code>) &#x2014;
an instantiated <code>DiffusionPipeline</code> object`,name:"pipeline"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/auto_pipeline.py#L334"}}),ve=new ce({props:{anchor:"diffusers.AutoPipelineForText2Image.from_pipe.example",$$slots:{default:[Vr]},$$scope:{ctx:x}}}),Ne=new An({}),Xe=new de({props:{name:"class diffusers.AutoPipelineForImage2Image",anchor:"diffusers.AutoPipelineForImage2Image",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/auto_pipeline.py#L423"}}),ze=new de({props:{name:"from_pretrained",anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained",parameters:[{name:"pretrained_model_or_path",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>repo id</em> (for example <code>CompVis/ldm-text2im-large-256</code>) of a pretrained pipeline
hosted on the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_pipeline_directory/</code>) containing pipeline weights
saved using
<a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline.save_pretrained">save_pretrained()</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model with another dtype. If &#x201C;auto&#x201D; is passed, the
dtype is automatically derived from the model&#x2019;s weights.`,name:"torch_dtype"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.output_loading_info(bool,",description:`<strong>output_loading_info(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.`,name:"output_loading_info(bool,"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.custom_revision",description:`<strong>custom_revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id similar to
<code>revision</code> when loading a custom pipeline from the Hub. It can be a &#x1F917; Diffusers version when loading a
custom pipeline from GitHub, otherwise it defaults to <code>&quot;main&quot;</code> when loading from the Hub.`,name:"custom_revision"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>Dict[str, Union[int, str, torch.device]]</code>, <em>optional</em>) &#x2014;
A map that specifies where each submodule should go. It doesn&#x2019;t need to be defined for each
parameter/buffer name; once a given module name is inside, every submodule of it will be sent to the
same device.</p>
<p>Set <code>device_map=&quot;auto&quot;</code> to have &#x1F917; Accelerate automatically compute the most optimized <code>device_map</code>. For
more information about each option see <a href="https://hf.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map" rel="nofollow">designing a device
map</a>.`,name:"device_map"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.max_memory",description:`<strong>max_memory</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
A dictionary device identifier for the maximum memory. Will default to the maximum memory available for
each GPU and the available CPU RAM if unset.`,name:"max_memory"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.offload_folder",description:`<strong>offload_folder</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
The path to offload weights if device_map contains the value <code>&quot;disk&quot;</code>.`,name:"offload_folder"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.offload_state_dict",description:`<strong>offload_state_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, temporarily offloads the CPU state dict to the hard drive to avoid running out of CPU RAM if
the weight of the CPU state dict + the biggest shard of the checkpoint does not fit. Defaults to <code>True</code>
when there is some disk offload.`,name:"offload_state_dict"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 else <code>False</code>) &#x2014;
Speed up model loading only loading the pretrained weights and not initializing the weights. This also
tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model.
Only supported for PyTorch &gt;= 1.9.0. If you are using an older version of PyTorch, setting this
argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to <code>None</code>, the safetensors weights are downloaded if they&#x2019;re available <strong>and</strong> if the
safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors
weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to overwrite load and saveable variables (the pipeline components of the specific pipeline
class). The overwritten components are passed directly to the pipelines <code>__init__</code> method. See example
below for more information.`,name:"kwargs"},{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Load weights from a specified variant filename such as <code>&quot;fp16&quot;</code> or <code>&quot;ema&quot;</code>. This is ignored when
loading <code>from_flax</code>.`,name:"variant"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/auto_pipeline.py#L447"}}),Te=new ce({props:{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.example",$$slots:{default:[Dr]},$$scope:{ctx:x}}}),je=new kn({props:{$$slots:{default:[Rr]},$$scope:{ctx:x}}}),Me=new ce({props:{anchor:"diffusers.AutoPipelineForImage2Image.from_pretrained.example-2",$$slots:{default:[Nr]},$$scope:{ctx:x}}}),He=new de({props:{name:"from_pipe",anchor:"diffusers.AutoPipelineForImage2Image.from_pipe",parameters:[{name:"pipeline",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.AutoPipelineForImage2Image.from_pipe.pipeline",description:`<strong>pipeline</strong> (<code>DiffusionPipeline</code>) &#x2014;
an instantiated <code>DiffusionPipeline</code> object`,name:"pipeline"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/auto_pipeline.py#L597"}}),xe=new ce({props:{anchor:"diffusers.AutoPipelineForImage2Image.from_pipe.example",$$slots:{default:[Xr]},$$scope:{ctx:x}}}),Oe=new An({}),Ke=new de({props:{name:"class diffusers.AutoPipelineForInpainting",anchor:"diffusers.AutoPipelineForInpainting",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/auto_pipeline.py#L688"}}),tt=new de({props:{name:"from_pretrained",anchor:"diffusers.AutoPipelineForInpainting.from_pretrained",parameters:[{name:"pretrained_model_or_path",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>repo id</em> (for example <code>CompVis/ldm-text2im-large-256</code>) of a pretrained pipeline
hosted on the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_pipeline_directory/</code>) containing pipeline weights
saved using
<a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline.save_pretrained">save_pretrained()</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model with another dtype. If &#x201C;auto&#x201D; is passed, the
dtype is automatically derived from the model&#x2019;s weights.`,name:"torch_dtype"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.output_loading_info(bool,",description:`<strong>output_loading_info(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.`,name:"output_loading_info(bool,"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.custom_revision",description:`<strong>custom_revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id similar to
<code>revision</code> when loading a custom pipeline from the Hub. It can be a &#x1F917; Diffusers version when loading a
custom pipeline from GitHub, otherwise it defaults to <code>&quot;main&quot;</code> when loading from the Hub.`,name:"custom_revision"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>Dict[str, Union[int, str, torch.device]]</code>, <em>optional</em>) &#x2014;
A map that specifies where each submodule should go. It doesn&#x2019;t need to be defined for each
parameter/buffer name; once a given module name is inside, every submodule of it will be sent to the
same device.</p>
<p>Set <code>device_map=&quot;auto&quot;</code> to have &#x1F917; Accelerate automatically compute the most optimized <code>device_map</code>. For
more information about each option see <a href="https://hf.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map" rel="nofollow">designing a device
map</a>.`,name:"device_map"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.max_memory",description:`<strong>max_memory</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
A dictionary device identifier for the maximum memory. Will default to the maximum memory available for
each GPU and the available CPU RAM if unset.`,name:"max_memory"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.offload_folder",description:`<strong>offload_folder</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
The path to offload weights if device_map contains the value <code>&quot;disk&quot;</code>.`,name:"offload_folder"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.offload_state_dict",description:`<strong>offload_state_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, temporarily offloads the CPU state dict to the hard drive to avoid running out of CPU RAM if
the weight of the CPU state dict + the biggest shard of the checkpoint does not fit. Defaults to <code>True</code>
when there is some disk offload.`,name:"offload_state_dict"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 else <code>False</code>) &#x2014;
Speed up model loading only loading the pretrained weights and not initializing the weights. This also
tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model.
Only supported for PyTorch &gt;= 1.9.0. If you are using an older version of PyTorch, setting this
argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to <code>None</code>, the safetensors weights are downloaded if they&#x2019;re available <strong>and</strong> if the
safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors
weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to overwrite load and saveable variables (the pipeline components of the specific pipeline
class). The overwritten components are passed directly to the pipelines <code>__init__</code> method. See example
below for more information.`,name:"kwargs"},{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Load weights from a specified variant filename such as <code>&quot;fp16&quot;</code> or <code>&quot;ema&quot;</code>. This is ignored when
loading <code>from_flax</code>.`,name:"variant"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/auto_pipeline.py#L712"}}),Fe=new ce({props:{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.example",$$slots:{default:[Qr]},$$scope:{ctx:x}}}),ke=new kn({props:{$$slots:{default:[zr]},$$scope:{ctx:x}}}),Ae=new ce({props:{anchor:"diffusers.AutoPipelineForInpainting.from_pretrained.example-2",$$slots:{default:[Lr]},$$scope:{ctx:x}}}),at=new de({props:{name:"from_pipe",anchor:"diffusers.AutoPipelineForInpainting.from_pipe",parameters:[{name:"pipeline",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.AutoPipelineForInpainting.from_pipe.pipeline",description:`<strong>pipeline</strong> (<code>DiffusionPipeline</code>) &#x2014;
an instantiated <code>DiffusionPipeline</code> object`,name:"pipeline"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/auto_pipeline.py#L861"}}),Ee=new ce({props:{anchor:"diffusers.AutoPipelineForInpainting.from_pipe.example",$$slots:{default:[Yr]},$$scope:{ctx:x}}}),{c(){p=a("meta"),_=d(),m=a("h1"),f=a("a"),u=a("span"),w(n.$$.fragment),h=d(),A=a("span"),k=l("AutoPipeline"),M=d(),B=a("p"),N=a("code"),En=l("AutoPipeline"),Jn=l(" is designed to:"),tn=d(),fe=a("ol"),Jt=a("li"),Zn=l("make it easy for you to load a checkpoint for a task without knowing the specific pipeline class to use"),Gn=d(),Zt=a("li"),Wn=l("use multiple pipelines in your workflow"),on=d(),O=a("p"),Sn=l("Based on the task, the "),Gt=a("code"),Bn=l("AutoPipeline"),Cn=l(" class automatically retrieves the relevant pipeline given the name or path to the pretrained weights with the "),Wt=a("code"),Vn=l("from_pretrained()"),Dn=l(" method."),nn=d(),he=a("p"),Rn=l("To seamlessly switch between tasks with the same checkpoint without reallocating additional memory, use the "),St=a("code"),Nn=l("from_pipe()"),Xn=l(" method to transfer the components from the original pipeline to the new one."),an=d(),w(Je.$$.fragment),sn=d(),w(ue.$$.fragment),ln=d(),Ze=a("p"),Bt=a("code"),Qn=l("AutoPipeline"),zn=l(" supports text-to-image, image-to-image, and inpainting for the following diffusion models:"),rn=d(),C=a("ul"),Ct=a("li"),mt=a("a"),Ln=l("Stable Diffusion"),Yn=d(),Vt=a("li"),ft=a("a"),Hn=l("ControlNet"),qn=d(),Dt=a("li"),ht=a("a"),On=l("Stable Diffusion XL (SDXL)"),Kn=d(),Rt=a("li"),ut=a("a"),ea=l("DeepFloyd IF"),ta=d(),Nt=a("li"),gt=a("a"),oa=l("Kandinsky"),na=d(),Xt=a("li"),_t=a("a"),aa=l("Kandinsky 2.2"),pn=d(),ne=a("h2"),ge=a("a"),Qt=a("span"),w(Ge.$$.fragment),sa=d(),zt=a("span"),ia=l("AutoPipelineForText2Image"),dn=d(),E=a("div"),w(We.$$.fragment),la=d(),K=a("p"),yt=a("a"),ra=l("AutoPipelineForText2Image"),pa=l(` is a generic pipeline class that instantiates a text-to-image pipeline class. The
specific underlying pipeline class is automatically selected from either the
`),bt=a("a"),da=l("from_pretrained()"),ca=l(" or "),wt=a("a"),ma=l("from_pipe()"),fa=l(" methods."),ha=d(),Se=a("p"),ua=l("This class cannot be instantiated using "),Lt=a("code"),ga=l("__init__()"),_a=l(" (throws an error)."),ya=d(),Yt=a("p"),ba=l("Class attributes:"),wa=d(),Ht=a("ul"),_e=a("li"),qt=a("strong"),va=l("config_name"),Ia=l(" ("),Ot=a("code"),$a=l("str"),Ta=l(`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),ja=d(),U=a("div"),w(Be.$$.fragment),Ma=d(),Kt=a("p"),xa=l("Instantiates a text-to-image Pytorch diffusion pipeline from pretrained pipeline weight."),Ua=d(),eo=a("p"),Pa=l("The from_pretrained() method takes care of returning the correct pipeline class instance by:"),Fa=d(),Ce=a("ol"),to=a("li"),ka=l(`Detect the pipeline class of the pretrained_model_or_path based on the _class_name property of its
config object`),Aa=d(),oo=a("li"),Ea=l(`Find the text-to-image pipeline linked to the pipeline class using pattern matching on pipeline class
name.`),Ja=d(),ae=a("p"),Za=l("If a "),no=a("code"),Ga=l("controlnet"),Wa=l(" argument is passed, it will instantiate a "),vt=a("a"),Sa=l("StableDiffusionControlNetPipeline"),Ba=l(" object."),Ca=d(),Ve=a("p"),Va=l("The pipeline is set in evaluation mode ("),ao=a("code"),Da=l("model.eval()"),Ra=l(") by default."),Na=d(),w(ye.$$.fragment),Xa=d(),w(be.$$.fragment),Qa=d(),w(we.$$.fragment),za=d(),V=a("div"),w(De.$$.fragment),La=d(),so=a("p"),Ya=l("Instantiates a text-to-image Pytorch diffusion pipeline from another instantiated diffusion pipeline class."),Ha=d(),io=a("p"),qa=l(`The from_pipe() method takes care of returning the correct pipeline class instance by finding the text-to-image
pipeline linked to the pipeline class using pattern matching on pipeline class name.`),Oa=d(),lo=a("p"),Ka=l(`All the modules the pipeline contains will be used to initialize the new pipeline without reallocating
additional memoery.`),es=d(),Re=a("p"),ts=l("The pipeline is set in evaluation mode ("),ro=a("code"),os=l("model.eval()"),ns=l(") by default."),as=d(),w(ve.$$.fragment),cn=d(),se=a("h2"),Ie=a("a"),po=a("span"),w(Ne.$$.fragment),ss=d(),co=a("span"),is=l("AutoPipelineForImage2Image"),mn=d(),J=a("div"),w(Xe.$$.fragment),ls=d(),ee=a("p"),It=a("a"),rs=l("AutoPipelineForImage2Image"),ps=l(` is a generic pipeline class that instantiates an image-to-image pipeline class. The
specific underlying pipeline class is automatically selected from either the
`),$t=a("a"),ds=l("from_pretrained()"),cs=l(" or "),Tt=a("a"),ms=l("from_pipe()"),fs=l(" methods."),hs=d(),Qe=a("p"),us=l("This class cannot be instantiated using "),mo=a("code"),gs=l("__init__()"),_s=l(" (throws an error)."),ys=d(),fo=a("p"),bs=l("Class attributes:"),ws=d(),ho=a("ul"),$e=a("li"),uo=a("strong"),vs=l("config_name"),Is=l(" ("),go=a("code"),$s=l("str"),Ts=l(`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),js=d(),P=a("div"),w(ze.$$.fragment),Ms=d(),_o=a("p"),xs=l("Instantiates a image-to-image Pytorch diffusion pipeline from pretrained pipeline weight."),Us=d(),yo=a("p"),Ps=l("The from_pretrained() method takes care of returning the correct pipeline class instance by:"),Fs=d(),Le=a("ol"),bo=a("li"),ks=l(`Detect the pipeline class of the pretrained_model_or_path based on the _class_name property of its
config object`),As=d(),wo=a("li"),Es=l(`Find the image-to-image pipeline linked to the pipeline class using pattern matching on pipeline class
name.`),Js=d(),ie=a("p"),Zs=l("If a "),vo=a("code"),Gs=l("controlnet"),Ws=l(" argument is passed, it will instantiate a "),jt=a("a"),Ss=l("StableDiffusionControlNetImg2ImgPipeline"),Bs=l(`
object.`),Cs=d(),Ye=a("p"),Vs=l("The pipeline is set in evaluation mode ("),Io=a("code"),Ds=l("model.eval()"),Rs=l(") by default."),Ns=d(),w(Te.$$.fragment),Xs=d(),w(je.$$.fragment),Qs=d(),w(Me.$$.fragment),zs=d(),D=a("div"),w(He.$$.fragment),Ls=d(),$o=a("p"),Ys=l("Instantiates a image-to-image Pytorch diffusion pipeline from another instantiated diffusion pipeline class."),Hs=d(),To=a("p"),qs=l(`The from_pipe() method takes care of returning the correct pipeline class instance by finding the
image-to-image pipeline linked to the pipeline class using pattern matching on pipeline class name.`),Os=d(),jo=a("p"),Ks=l(`All the modules the pipeline contains will be used to initialize the new pipeline without reallocating
additional memoery.`),ei=d(),qe=a("p"),ti=l("The pipeline is set in evaluation mode ("),Mo=a("code"),oi=l("model.eval()"),ni=l(") by default."),ai=d(),w(xe.$$.fragment),fn=d(),le=a("h2"),Ue=a("a"),xo=a("span"),w(Oe.$$.fragment),si=d(),Uo=a("span"),ii=l("AutoPipelineForInpainting"),hn=d(),Z=a("div"),w(Ke.$$.fragment),li=d(),te=a("p"),Mt=a("a"),ri=l("AutoPipelineForInpainting"),pi=l(` is a generic pipeline class that instantiates an inpainting pipeline class. The
specific underlying pipeline class is automatically selected from either the
`),xt=a("a"),di=l("from_pretrained()"),ci=l(" or "),Ut=a("a"),mi=l("from_pipe()"),fi=l(" methods."),hi=d(),et=a("p"),ui=l("This class cannot be instantiated using "),Po=a("code"),gi=l("__init__()"),_i=l(" (throws an error)."),yi=d(),Fo=a("p"),bi=l("Class attributes:"),wi=d(),ko=a("ul"),Pe=a("li"),Ao=a("strong"),vi=l("config_name"),Ii=l(" ("),Eo=a("code"),$i=l("str"),Ti=l(`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),ji=d(),F=a("div"),w(tt.$$.fragment),Mi=d(),Jo=a("p"),xi=l("Instantiates a inpainting Pytorch diffusion pipeline from pretrained pipeline weight."),Ui=d(),Zo=a("p"),Pi=l("The from_pretrained() method takes care of returning the correct pipeline class instance by:"),Fi=d(),ot=a("ol"),Go=a("li"),ki=l(`Detect the pipeline class of the pretrained_model_or_path based on the _class_name property of its
config object`),Ai=d(),Wo=a("li"),Ei=l("Find the inpainting pipeline linked to the pipeline class using pattern matching on pipeline class name."),Ji=d(),re=a("p"),Zi=l("If a "),So=a("code"),Gi=l("controlnet"),Wi=l(" argument is passed, it will instantiate a "),Pt=a("a"),Si=l("StableDiffusionControlNetInpaintPipeline"),Bi=l(`
object.`),Ci=d(),nt=a("p"),Vi=l("The pipeline is set in evaluation mode ("),Bo=a("code"),Di=l("model.eval()"),Ri=l(") by default."),Ni=d(),w(Fe.$$.fragment),Xi=d(),w(ke.$$.fragment),Qi=d(),w(Ae.$$.fragment),zi=d(),R=a("div"),w(at.$$.fragment),Li=d(),Co=a("p"),Yi=l("Instantiates a inpainting Pytorch diffusion pipeline from another instantiated diffusion pipeline class."),Hi=d(),Vo=a("p"),qi=l(`The from_pipe() method takes care of returning the correct pipeline class instance by finding the inpainting
pipeline linked to the pipeline class using pattern matching on pipeline class name.`),Oi=d(),Do=a("p"),Ki=l(`All the modules the pipeline class contain will be used to initialize the new pipeline without reallocating
additional memoery.`),el=d(),st=a("p"),tl=l("The pipeline is set in evaluation mode ("),Ro=a("code"),ol=l("model.eval()"),nl=l(") by default."),al=d(),w(Ee.$$.fragment),this.h()},l(o){const g=Zr('[data-svelte="svelte-1phssyn"]',document.head);p=s(g,"META",{name:!0,content:!0}),g.forEach(t),_=c(o),m=s(o,"H1",{class:!0});var it=i(m);f=s(it,"A",{id:!0,class:!0,href:!0});var No=i(f);u=s(No,"SPAN",{});var Xo=i(u);v(n.$$.fragment,Xo),Xo.forEach(t),No.forEach(t),h=c(it),A=s(it,"SPAN",{});var Qo=i(A);k=r(Qo,"AutoPipeline"),Qo.forEach(t),it.forEach(t),M=c(o),B=s(o,"P",{});var Ft=i(B);N=s(Ft,"CODE",{});var zo=i(N);En=r(zo,"AutoPipeline"),zo.forEach(t),Jn=r(Ft," is designed to:"),Ft.forEach(t),tn=c(o),fe=s(o,"OL",{});var lt=i(fe);Jt=s(lt,"LI",{});var Lo=i(Jt);Zn=r(Lo,"make it easy for you to load a checkpoint for a task without knowing the specific pipeline class to use"),Lo.forEach(t),Gn=c(lt),Zt=s(lt,"LI",{});var Yo=i(Zt);Wn=r(Yo,"use multiple pipelines in your workflow"),Yo.forEach(t),lt.forEach(t),on=c(o),O=s(o,"P",{});var pe=i(O);Sn=r(pe,"Based on the task, the "),Gt=s(pe,"CODE",{});var Ho=i(Gt);Bn=r(Ho,"AutoPipeline"),Ho.forEach(t),Cn=r(pe," class automatically retrieves the relevant pipeline given the name or path to the pretrained weights with the "),Wt=s(pe,"CODE",{});var qo=i(Wt);Vn=r(qo,"from_pretrained()"),qo.forEach(t),Dn=r(pe," method."),pe.forEach(t),nn=c(o),he=s(o,"P",{});var rt=i(he);Rn=r(rt,"To seamlessly switch between tasks with the same checkpoint without reallocating additional memory, use the "),St=s(rt,"CODE",{});var il=i(St);Nn=r(il,"from_pipe()"),il.forEach(t),Xn=r(rt," method to transfer the components from the original pipeline to the new one."),rt.forEach(t),an=c(o),v(Je.$$.fragment,o),sn=c(o),v(ue.$$.fragment,o),ln=c(o),Ze=s(o,"P",{});var sl=i(Ze);Bt=s(sl,"CODE",{});var ll=i(Bt);Qn=r(ll,"AutoPipeline"),ll.forEach(t),zn=r(sl," supports text-to-image, image-to-image, and inpainting for the following diffusion models:"),sl.forEach(t),rn=c(o),C=s(o,"UL",{});var L=i(C);Ct=s(L,"LI",{});var rl=i(Ct);mt=s(rl,"A",{href:!0});var pl=i(mt);Ln=r(pl,"Stable Diffusion"),pl.forEach(t),rl.forEach(t),Yn=c(L),Vt=s(L,"LI",{});var dl=i(Vt);ft=s(dl,"A",{href:!0});var cl=i(ft);Hn=r(cl,"ControlNet"),cl.forEach(t),dl.forEach(t),qn=c(L),Dt=s(L,"LI",{});var ml=i(Dt);ht=s(ml,"A",{href:!0});var fl=i(ht);On=r(fl,"Stable Diffusion XL (SDXL)"),fl.forEach(t),ml.forEach(t),Kn=c(L),Rt=s(L,"LI",{});var hl=i(Rt);ut=s(hl,"A",{href:!0});var ul=i(ut);ea=r(ul,"DeepFloyd IF"),ul.forEach(t),hl.forEach(t),ta=c(L),Nt=s(L,"LI",{});var gl=i(Nt);gt=s(gl,"A",{href:!0});var _l=i(gt);oa=r(_l,"Kandinsky"),_l.forEach(t),gl.forEach(t),na=c(L),Xt=s(L,"LI",{});var yl=i(Xt);_t=s(yl,"A",{href:!0});var bl=i(_t);aa=r(bl,"Kandinsky 2.2"),bl.forEach(t),yl.forEach(t),L.forEach(t),pn=c(o),ne=s(o,"H2",{class:!0});var gn=i(ne);ge=s(gn,"A",{id:!0,class:!0,href:!0});var wl=i(ge);Qt=s(wl,"SPAN",{});var vl=i(Qt);v(Ge.$$.fragment,vl),vl.forEach(t),wl.forEach(t),sa=c(gn),zt=s(gn,"SPAN",{});var Il=i(zt);ia=r(Il,"AutoPipelineForText2Image"),Il.forEach(t),gn.forEach(t),dn=c(o),E=s(o,"DIV",{class:!0});var X=i(E);v(We.$$.fragment,X),la=c(X),K=s(X,"P",{});var pt=i(K);yt=s(pt,"A",{href:!0});var $l=i(yt);ra=r($l,"AutoPipelineForText2Image"),$l.forEach(t),pa=r(pt,` is a generic pipeline class that instantiates a text-to-image pipeline class. The
specific underlying pipeline class is automatically selected from either the
`),bt=s(pt,"A",{href:!0});var Tl=i(bt);da=r(Tl,"from_pretrained()"),Tl.forEach(t),ca=r(pt," or "),wt=s(pt,"A",{href:!0});var jl=i(wt);ma=r(jl,"from_pipe()"),jl.forEach(t),fa=r(pt," methods."),pt.forEach(t),ha=c(X),Se=s(X,"P",{});var _n=i(Se);ua=r(_n,"This class cannot be instantiated using "),Lt=s(_n,"CODE",{});var Ml=i(Lt);ga=r(Ml,"__init__()"),Ml.forEach(t),_a=r(_n," (throws an error)."),_n.forEach(t),ya=c(X),Yt=s(X,"P",{});var xl=i(Yt);ba=r(xl,"Class attributes:"),xl.forEach(t),wa=c(X),Ht=s(X,"UL",{});var Ul=i(Ht);_e=s(Ul,"LI",{});var Oo=i(_e);qt=s(Oo,"STRONG",{});var Pl=i(qt);va=r(Pl,"config_name"),Pl.forEach(t),Ia=r(Oo," ("),Ot=s(Oo,"CODE",{});var Fl=i(Ot);$a=r(Fl,"str"),Fl.forEach(t),Ta=r(Oo,`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),Oo.forEach(t),Ul.forEach(t),ja=c(X),U=s(X,"DIV",{class:!0});var G=i(U);v(Be.$$.fragment,G),Ma=c(G),Kt=s(G,"P",{});var kl=i(Kt);xa=r(kl,"Instantiates a text-to-image Pytorch diffusion pipeline from pretrained pipeline weight."),kl.forEach(t),Ua=c(G),eo=s(G,"P",{});var Al=i(eo);Pa=r(Al,"The from_pretrained() method takes care of returning the correct pipeline class instance by:"),Al.forEach(t),Fa=c(G),Ce=s(G,"OL",{});var yn=i(Ce);to=s(yn,"LI",{});var El=i(to);ka=r(El,`Detect the pipeline class of the pretrained_model_or_path based on the _class_name property of its
config object`),El.forEach(t),Aa=c(yn),oo=s(yn,"LI",{});var Jl=i(oo);Ea=r(Jl,`Find the text-to-image pipeline linked to the pipeline class using pattern matching on pipeline class
name.`),Jl.forEach(t),yn.forEach(t),Ja=c(G),ae=s(G,"P",{});var kt=i(ae);Za=r(kt,"If a "),no=s(kt,"CODE",{});var Zl=i(no);Ga=r(Zl,"controlnet"),Zl.forEach(t),Wa=r(kt," argument is passed, it will instantiate a "),vt=s(kt,"A",{href:!0});var Gl=i(vt);Sa=r(Gl,"StableDiffusionControlNetPipeline"),Gl.forEach(t),Ba=r(kt," object."),kt.forEach(t),Ca=c(G),Ve=s(G,"P",{});var bn=i(Ve);Va=r(bn,"The pipeline is set in evaluation mode ("),ao=s(bn,"CODE",{});var Wl=i(ao);Da=r(Wl,"model.eval()"),Wl.forEach(t),Ra=r(bn,") by default."),bn.forEach(t),Na=c(G),v(ye.$$.fragment,G),Xa=c(G),v(be.$$.fragment,G),Qa=c(G),v(we.$$.fragment,G),G.forEach(t),za=c(X),V=s(X,"DIV",{class:!0});var Y=i(V);v(De.$$.fragment,Y),La=c(Y),so=s(Y,"P",{});var Sl=i(so);Ya=r(Sl,"Instantiates a text-to-image Pytorch diffusion pipeline from another instantiated diffusion pipeline class."),Sl.forEach(t),Ha=c(Y),io=s(Y,"P",{});var Bl=i(io);qa=r(Bl,`The from_pipe() method takes care of returning the correct pipeline class instance by finding the text-to-image
pipeline linked to the pipeline class using pattern matching on pipeline class name.`),Bl.forEach(t),Oa=c(Y),lo=s(Y,"P",{});var Cl=i(lo);Ka=r(Cl,`All the modules the pipeline contains will be used to initialize the new pipeline without reallocating
additional memoery.`),Cl.forEach(t),es=c(Y),Re=s(Y,"P",{});var wn=i(Re);ts=r(wn,"The pipeline is set in evaluation mode ("),ro=s(wn,"CODE",{});var Vl=i(ro);os=r(Vl,"model.eval()"),Vl.forEach(t),ns=r(wn,") by default."),wn.forEach(t),as=c(Y),v(ve.$$.fragment,Y),Y.forEach(t),X.forEach(t),cn=c(o),se=s(o,"H2",{class:!0});var vn=i(se);Ie=s(vn,"A",{id:!0,class:!0,href:!0});var Dl=i(Ie);po=s(Dl,"SPAN",{});var Rl=i(po);v(Ne.$$.fragment,Rl),Rl.forEach(t),Dl.forEach(t),ss=c(vn),co=s(vn,"SPAN",{});var Nl=i(co);is=r(Nl,"AutoPipelineForImage2Image"),Nl.forEach(t),vn.forEach(t),mn=c(o),J=s(o,"DIV",{class:!0});var Q=i(J);v(Xe.$$.fragment,Q),ls=c(Q),ee=s(Q,"P",{});var dt=i(ee);It=s(dt,"A",{href:!0});var Xl=i(It);rs=r(Xl,"AutoPipelineForImage2Image"),Xl.forEach(t),ps=r(dt,` is a generic pipeline class that instantiates an image-to-image pipeline class. The
specific underlying pipeline class is automatically selected from either the
`),$t=s(dt,"A",{href:!0});var Ql=i($t);ds=r(Ql,"from_pretrained()"),Ql.forEach(t),cs=r(dt," or "),Tt=s(dt,"A",{href:!0});var zl=i(Tt);ms=r(zl,"from_pipe()"),zl.forEach(t),fs=r(dt," methods."),dt.forEach(t),hs=c(Q),Qe=s(Q,"P",{});var In=i(Qe);us=r(In,"This class cannot be instantiated using "),mo=s(In,"CODE",{});var Ll=i(mo);gs=r(Ll,"__init__()"),Ll.forEach(t),_s=r(In," (throws an error)."),In.forEach(t),ys=c(Q),fo=s(Q,"P",{});var Yl=i(fo);bs=r(Yl,"Class attributes:"),Yl.forEach(t),ws=c(Q),ho=s(Q,"UL",{});var Hl=i(ho);$e=s(Hl,"LI",{});var Ko=i($e);uo=s(Ko,"STRONG",{});var ql=i(uo);vs=r(ql,"config_name"),ql.forEach(t),Is=r(Ko," ("),go=s(Ko,"CODE",{});var Ol=i(go);$s=r(Ol,"str"),Ol.forEach(t),Ts=r(Ko,`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),Ko.forEach(t),Hl.forEach(t),js=c(Q),P=s(Q,"DIV",{class:!0});var W=i(P);v(ze.$$.fragment,W),Ms=c(W),_o=s(W,"P",{});var Kl=i(_o);xs=r(Kl,"Instantiates a image-to-image Pytorch diffusion pipeline from pretrained pipeline weight."),Kl.forEach(t),Us=c(W),yo=s(W,"P",{});var er=i(yo);Ps=r(er,"The from_pretrained() method takes care of returning the correct pipeline class instance by:"),er.forEach(t),Fs=c(W),Le=s(W,"OL",{});var $n=i(Le);bo=s($n,"LI",{});var tr=i(bo);ks=r(tr,`Detect the pipeline class of the pretrained_model_or_path based on the _class_name property of its
config object`),tr.forEach(t),As=c($n),wo=s($n,"LI",{});var or=i(wo);Es=r(or,`Find the image-to-image pipeline linked to the pipeline class using pattern matching on pipeline class
name.`),or.forEach(t),$n.forEach(t),Js=c(W),ie=s(W,"P",{});var At=i(ie);Zs=r(At,"If a "),vo=s(At,"CODE",{});var nr=i(vo);Gs=r(nr,"controlnet"),nr.forEach(t),Ws=r(At," argument is passed, it will instantiate a "),jt=s(At,"A",{href:!0});var ar=i(jt);Ss=r(ar,"StableDiffusionControlNetImg2ImgPipeline"),ar.forEach(t),Bs=r(At,`
object.`),At.forEach(t),Cs=c(W),Ye=s(W,"P",{});var Tn=i(Ye);Vs=r(Tn,"The pipeline is set in evaluation mode ("),Io=s(Tn,"CODE",{});var sr=i(Io);Ds=r(sr,"model.eval()"),sr.forEach(t),Rs=r(Tn,") by default."),Tn.forEach(t),Ns=c(W),v(Te.$$.fragment,W),Xs=c(W),v(je.$$.fragment,W),Qs=c(W),v(Me.$$.fragment,W),W.forEach(t),zs=c(Q),D=s(Q,"DIV",{class:!0});var H=i(D);v(He.$$.fragment,H),Ls=c(H),$o=s(H,"P",{});var ir=i($o);Ys=r(ir,"Instantiates a image-to-image Pytorch diffusion pipeline from another instantiated diffusion pipeline class."),ir.forEach(t),Hs=c(H),To=s(H,"P",{});var lr=i(To);qs=r(lr,`The from_pipe() method takes care of returning the correct pipeline class instance by finding the
image-to-image pipeline linked to the pipeline class using pattern matching on pipeline class name.`),lr.forEach(t),Os=c(H),jo=s(H,"P",{});var rr=i(jo);Ks=r(rr,`All the modules the pipeline contains will be used to initialize the new pipeline without reallocating
additional memoery.`),rr.forEach(t),ei=c(H),qe=s(H,"P",{});var jn=i(qe);ti=r(jn,"The pipeline is set in evaluation mode ("),Mo=s(jn,"CODE",{});var pr=i(Mo);oi=r(pr,"model.eval()"),pr.forEach(t),ni=r(jn,") by default."),jn.forEach(t),ai=c(H),v(xe.$$.fragment,H),H.forEach(t),Q.forEach(t),fn=c(o),le=s(o,"H2",{class:!0});var Mn=i(le);Ue=s(Mn,"A",{id:!0,class:!0,href:!0});var dr=i(Ue);xo=s(dr,"SPAN",{});var cr=i(xo);v(Oe.$$.fragment,cr),cr.forEach(t),dr.forEach(t),si=c(Mn),Uo=s(Mn,"SPAN",{});var mr=i(Uo);ii=r(mr,"AutoPipelineForInpainting"),mr.forEach(t),Mn.forEach(t),hn=c(o),Z=s(o,"DIV",{class:!0});var z=i(Z);v(Ke.$$.fragment,z),li=c(z),te=s(z,"P",{});var ct=i(te);Mt=s(ct,"A",{href:!0});var fr=i(Mt);ri=r(fr,"AutoPipelineForInpainting"),fr.forEach(t),pi=r(ct,` is a generic pipeline class that instantiates an inpainting pipeline class. The
specific underlying pipeline class is automatically selected from either the
`),xt=s(ct,"A",{href:!0});var hr=i(xt);di=r(hr,"from_pretrained()"),hr.forEach(t),ci=r(ct," or "),Ut=s(ct,"A",{href:!0});var ur=i(Ut);mi=r(ur,"from_pipe()"),ur.forEach(t),fi=r(ct," methods."),ct.forEach(t),hi=c(z),et=s(z,"P",{});var xn=i(et);ui=r(xn,"This class cannot be instantiated using "),Po=s(xn,"CODE",{});var gr=i(Po);gi=r(gr,"__init__()"),gr.forEach(t),_i=r(xn," (throws an error)."),xn.forEach(t),yi=c(z),Fo=s(z,"P",{});var _r=i(Fo);bi=r(_r,"Class attributes:"),_r.forEach(t),wi=c(z),ko=s(z,"UL",{});var yr=i(ko);Pe=s(yr,"LI",{});var en=i(Pe);Ao=s(en,"STRONG",{});var br=i(Ao);vi=r(br,"config_name"),br.forEach(t),Ii=r(en," ("),Eo=s(en,"CODE",{});var wr=i(Eo);$i=r(wr,"str"),wr.forEach(t),Ti=r(en,`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),en.forEach(t),yr.forEach(t),ji=c(z),F=s(z,"DIV",{class:!0});var S=i(F);v(tt.$$.fragment,S),Mi=c(S),Jo=s(S,"P",{});var vr=i(Jo);xi=r(vr,"Instantiates a inpainting Pytorch diffusion pipeline from pretrained pipeline weight."),vr.forEach(t),Ui=c(S),Zo=s(S,"P",{});var Ir=i(Zo);Pi=r(Ir,"The from_pretrained() method takes care of returning the correct pipeline class instance by:"),Ir.forEach(t),Fi=c(S),ot=s(S,"OL",{});var Un=i(ot);Go=s(Un,"LI",{});var $r=i(Go);ki=r($r,`Detect the pipeline class of the pretrained_model_or_path based on the _class_name property of its
config object`),$r.forEach(t),Ai=c(Un),Wo=s(Un,"LI",{});var Tr=i(Wo);Ei=r(Tr,"Find the inpainting pipeline linked to the pipeline class using pattern matching on pipeline class name."),Tr.forEach(t),Un.forEach(t),Ji=c(S),re=s(S,"P",{});var Et=i(re);Zi=r(Et,"If a "),So=s(Et,"CODE",{});var jr=i(So);Gi=r(jr,"controlnet"),jr.forEach(t),Wi=r(Et," argument is passed, it will instantiate a "),Pt=s(Et,"A",{href:!0});var Mr=i(Pt);Si=r(Mr,"StableDiffusionControlNetInpaintPipeline"),Mr.forEach(t),Bi=r(Et,`
object.`),Et.forEach(t),Ci=c(S),nt=s(S,"P",{});var Pn=i(nt);Vi=r(Pn,"The pipeline is set in evaluation mode ("),Bo=s(Pn,"CODE",{});var xr=i(Bo);Di=r(xr,"model.eval()"),xr.forEach(t),Ri=r(Pn,") by default."),Pn.forEach(t),Ni=c(S),v(Fe.$$.fragment,S),Xi=c(S),v(ke.$$.fragment,S),Qi=c(S),v(Ae.$$.fragment,S),S.forEach(t),zi=c(z),R=s(z,"DIV",{class:!0});var q=i(R);v(at.$$.fragment,q),Li=c(q),Co=s(q,"P",{});var Ur=i(Co);Yi=r(Ur,"Instantiates a inpainting Pytorch diffusion pipeline from another instantiated diffusion pipeline class."),Ur.forEach(t),Hi=c(q),Vo=s(q,"P",{});var Pr=i(Vo);qi=r(Pr,`The from_pipe() method takes care of returning the correct pipeline class instance by finding the inpainting
pipeline linked to the pipeline class using pattern matching on pipeline class name.`),Pr.forEach(t),Oi=c(q),Do=s(q,"P",{});var Fr=i(Do);Ki=r(Fr,`All the modules the pipeline class contain will be used to initialize the new pipeline without reallocating
additional memoery.`),Fr.forEach(t),el=c(q),st=s(q,"P",{});var Fn=i(st);tl=r(Fn,"The pipeline is set in evaluation mode ("),Ro=s(Fn,"CODE",{});var kr=i(Ro);ol=r(kr,"model.eval()"),kr.forEach(t),nl=r(Fn,") by default."),Fn.forEach(t),al=c(q),v(Ee.$$.fragment,q),q.forEach(t),z.forEach(t),this.h()},h(){y(p,"name","hf:doc:metadata"),y(p,"content",JSON.stringify(qr)),y(f,"id","autopipeline"),y(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(f,"href","#autopipeline"),y(m,"class","relative group"),y(mt,"href","./stable_diffusion"),y(ft,"href","./api/pipelines/controlnet"),y(ht,"href","./stable_diffusion/stable_diffusion_xl"),y(ut,"href","./if"),y(gt,"href","./kandinsky"),y(_t,"href","./kandinsky#kandinsky-22"),y(ge,"id","diffusers.AutoPipelineForText2Image"),y(ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(ge,"href","#diffusers.AutoPipelineForText2Image"),y(ne,"class","relative group"),y(yt,"href","/docs/diffusers/main/en/api/pipelines/auto_pipeline#diffusers.AutoPipelineForText2Image"),y(bt,"href","/docs/diffusers/main/en/api/pipelines/auto_pipeline#diffusers.AutoPipelineForText2Image.from_pretrained"),y(wt,"href","/docs/diffusers/main/en/api/pipelines/auto_pipeline#diffusers.AutoPipelineForText2Image.from_pipe"),y(vt,"href","/docs/diffusers/main/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetPipeline"),y(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Ie,"id","diffusers.AutoPipelineForImage2Image"),y(Ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(Ie,"href","#diffusers.AutoPipelineForImage2Image"),y(se,"class","relative group"),y(It,"href","/docs/diffusers/main/en/api/pipelines/auto_pipeline#diffusers.AutoPipelineForImage2Image"),y($t,"href","/docs/diffusers/main/en/api/pipelines/auto_pipeline#diffusers.AutoPipelineForImage2Image.from_pretrained"),y(Tt,"href","/docs/diffusers/main/en/api/pipelines/auto_pipeline#diffusers.AutoPipelineForImage2Image.from_pipe"),y(jt,"href","/docs/diffusers/main/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetImg2ImgPipeline"),y(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Ue,"id","diffusers.AutoPipelineForInpainting"),y(Ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),y(Ue,"href","#diffusers.AutoPipelineForInpainting"),y(le,"class","relative group"),y(Mt,"href","/docs/diffusers/main/en/api/pipelines/auto_pipeline#diffusers.AutoPipelineForInpainting"),y(xt,"href","/docs/diffusers/main/en/api/pipelines/auto_pipeline#diffusers.AutoPipelineForInpainting.from_pretrained"),y(Ut,"href","/docs/diffusers/main/en/api/pipelines/auto_pipeline#diffusers.AutoPipelineForInpainting.from_pipe"),y(Pt,"href","/docs/diffusers/main/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetInpaintPipeline"),y(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,g){e(document.head,p),b(o,_,g),b(o,m,g),e(m,f),e(f,u),I(n,u,null),e(m,h),e(m,A),e(A,k),b(o,M,g),b(o,B,g),e(B,N),e(N,En),e(B,Jn),b(o,tn,g),b(o,fe,g),e(fe,Jt),e(Jt,Zn),e(fe,Gn),e(fe,Zt),e(Zt,Wn),b(o,on,g),b(o,O,g),e(O,Sn),e(O,Gt),e(Gt,Bn),e(O,Cn),e(O,Wt),e(Wt,Vn),e(O,Dn),b(o,nn,g),b(o,he,g),e(he,Rn),e(he,St),e(St,Nn),e(he,Xn),b(o,an,g),I(Je,o,g),b(o,sn,g),I(ue,o,g),b(o,ln,g),b(o,Ze,g),e(Ze,Bt),e(Bt,Qn),e(Ze,zn),b(o,rn,g),b(o,C,g),e(C,Ct),e(Ct,mt),e(mt,Ln),e(C,Yn),e(C,Vt),e(Vt,ft),e(ft,Hn),e(C,qn),e(C,Dt),e(Dt,ht),e(ht,On),e(C,Kn),e(C,Rt),e(Rt,ut),e(ut,ea),e(C,ta),e(C,Nt),e(Nt,gt),e(gt,oa),e(C,na),e(C,Xt),e(Xt,_t),e(_t,aa),b(o,pn,g),b(o,ne,g),e(ne,ge),e(ge,Qt),I(Ge,Qt,null),e(ne,sa),e(ne,zt),e(zt,ia),b(o,dn,g),b(o,E,g),I(We,E,null),e(E,la),e(E,K),e(K,yt),e(yt,ra),e(K,pa),e(K,bt),e(bt,da),e(K,ca),e(K,wt),e(wt,ma),e(K,fa),e(E,ha),e(E,Se),e(Se,ua),e(Se,Lt),e(Lt,ga),e(Se,_a),e(E,ya),e(E,Yt),e(Yt,ba),e(E,wa),e(E,Ht),e(Ht,_e),e(_e,qt),e(qt,va),e(_e,Ia),e(_e,Ot),e(Ot,$a),e(_e,Ta),e(E,ja),e(E,U),I(Be,U,null),e(U,Ma),e(U,Kt),e(Kt,xa),e(U,Ua),e(U,eo),e(eo,Pa),e(U,Fa),e(U,Ce),e(Ce,to),e(to,ka),e(Ce,Aa),e(Ce,oo),e(oo,Ea),e(U,Ja),e(U,ae),e(ae,Za),e(ae,no),e(no,Ga),e(ae,Wa),e(ae,vt),e(vt,Sa),e(ae,Ba),e(U,Ca),e(U,Ve),e(Ve,Va),e(Ve,ao),e(ao,Da),e(Ve,Ra),e(U,Na),I(ye,U,null),e(U,Xa),I(be,U,null),e(U,Qa),I(we,U,null),e(E,za),e(E,V),I(De,V,null),e(V,La),e(V,so),e(so,Ya),e(V,Ha),e(V,io),e(io,qa),e(V,Oa),e(V,lo),e(lo,Ka),e(V,es),e(V,Re),e(Re,ts),e(Re,ro),e(ro,os),e(Re,ns),e(V,as),I(ve,V,null),b(o,cn,g),b(o,se,g),e(se,Ie),e(Ie,po),I(Ne,po,null),e(se,ss),e(se,co),e(co,is),b(o,mn,g),b(o,J,g),I(Xe,J,null),e(J,ls),e(J,ee),e(ee,It),e(It,rs),e(ee,ps),e(ee,$t),e($t,ds),e(ee,cs),e(ee,Tt),e(Tt,ms),e(ee,fs),e(J,hs),e(J,Qe),e(Qe,us),e(Qe,mo),e(mo,gs),e(Qe,_s),e(J,ys),e(J,fo),e(fo,bs),e(J,ws),e(J,ho),e(ho,$e),e($e,uo),e(uo,vs),e($e,Is),e($e,go),e(go,$s),e($e,Ts),e(J,js),e(J,P),I(ze,P,null),e(P,Ms),e(P,_o),e(_o,xs),e(P,Us),e(P,yo),e(yo,Ps),e(P,Fs),e(P,Le),e(Le,bo),e(bo,ks),e(Le,As),e(Le,wo),e(wo,Es),e(P,Js),e(P,ie),e(ie,Zs),e(ie,vo),e(vo,Gs),e(ie,Ws),e(ie,jt),e(jt,Ss),e(ie,Bs),e(P,Cs),e(P,Ye),e(Ye,Vs),e(Ye,Io),e(Io,Ds),e(Ye,Rs),e(P,Ns),I(Te,P,null),e(P,Xs),I(je,P,null),e(P,Qs),I(Me,P,null),e(J,zs),e(J,D),I(He,D,null),e(D,Ls),e(D,$o),e($o,Ys),e(D,Hs),e(D,To),e(To,qs),e(D,Os),e(D,jo),e(jo,Ks),e(D,ei),e(D,qe),e(qe,ti),e(qe,Mo),e(Mo,oi),e(qe,ni),e(D,ai),I(xe,D,null),b(o,fn,g),b(o,le,g),e(le,Ue),e(Ue,xo),I(Oe,xo,null),e(le,si),e(le,Uo),e(Uo,ii),b(o,hn,g),b(o,Z,g),I(Ke,Z,null),e(Z,li),e(Z,te),e(te,Mt),e(Mt,ri),e(te,pi),e(te,xt),e(xt,di),e(te,ci),e(te,Ut),e(Ut,mi),e(te,fi),e(Z,hi),e(Z,et),e(et,ui),e(et,Po),e(Po,gi),e(et,_i),e(Z,yi),e(Z,Fo),e(Fo,bi),e(Z,wi),e(Z,ko),e(ko,Pe),e(Pe,Ao),e(Ao,vi),e(Pe,Ii),e(Pe,Eo),e(Eo,$i),e(Pe,Ti),e(Z,ji),e(Z,F),I(tt,F,null),e(F,Mi),e(F,Jo),e(Jo,xi),e(F,Ui),e(F,Zo),e(Zo,Pi),e(F,Fi),e(F,ot),e(ot,Go),e(Go,ki),e(ot,Ai),e(ot,Wo),e(Wo,Ei),e(F,Ji),e(F,re),e(re,Zi),e(re,So),e(So,Gi),e(re,Wi),e(re,Pt),e(Pt,Si),e(re,Bi),e(F,Ci),e(F,nt),e(nt,Vi),e(nt,Bo),e(Bo,Di),e(nt,Ri),e(F,Ni),I(Fe,F,null),e(F,Xi),I(ke,F,null),e(F,Qi),I(Ae,F,null),e(Z,zi),e(Z,R),I(at,R,null),e(R,Li),e(R,Co),e(Co,Yi),e(R,Hi),e(R,Vo),e(Vo,qi),e(R,Oi),e(R,Do),e(Do,Ki),e(R,el),e(R,st),e(st,tl),e(st,Ro),e(Ro,ol),e(st,nl),e(R,al),I(Ee,R,null),un=!0},p(o,[g]){const it={};g&2&&(it.$$scope={dirty:g,ctx:o}),ue.$set(it);const No={};g&2&&(No.$$scope={dirty:g,ctx:o}),ye.$set(No);const Xo={};g&2&&(Xo.$$scope={dirty:g,ctx:o}),be.$set(Xo);const Qo={};g&2&&(Qo.$$scope={dirty:g,ctx:o}),we.$set(Qo);const Ft={};g&2&&(Ft.$$scope={dirty:g,ctx:o}),ve.$set(Ft);const zo={};g&2&&(zo.$$scope={dirty:g,ctx:o}),Te.$set(zo);const lt={};g&2&&(lt.$$scope={dirty:g,ctx:o}),je.$set(lt);const Lo={};g&2&&(Lo.$$scope={dirty:g,ctx:o}),Me.$set(Lo);const Yo={};g&2&&(Yo.$$scope={dirty:g,ctx:o}),xe.$set(Yo);const pe={};g&2&&(pe.$$scope={dirty:g,ctx:o}),Fe.$set(pe);const Ho={};g&2&&(Ho.$$scope={dirty:g,ctx:o}),ke.$set(Ho);const qo={};g&2&&(qo.$$scope={dirty:g,ctx:o}),Ae.$set(qo);const rt={};g&2&&(rt.$$scope={dirty:g,ctx:o}),Ee.$set(rt)},i(o){un||($(n.$$.fragment,o),$(Je.$$.fragment,o),$(ue.$$.fragment,o),$(Ge.$$.fragment,o),$(We.$$.fragment,o),$(Be.$$.fragment,o),$(ye.$$.fragment,o),$(be.$$.fragment,o),$(we.$$.fragment,o),$(De.$$.fragment,o),$(ve.$$.fragment,o),$(Ne.$$.fragment,o),$(Xe.$$.fragment,o),$(ze.$$.fragment,o),$(Te.$$.fragment,o),$(je.$$.fragment,o),$(Me.$$.fragment,o),$(He.$$.fragment,o),$(xe.$$.fragment,o),$(Oe.$$.fragment,o),$(Ke.$$.fragment,o),$(tt.$$.fragment,o),$(Fe.$$.fragment,o),$(ke.$$.fragment,o),$(Ae.$$.fragment,o),$(at.$$.fragment,o),$(Ee.$$.fragment,o),un=!0)},o(o){T(n.$$.fragment,o),T(Je.$$.fragment,o),T(ue.$$.fragment,o),T(Ge.$$.fragment,o),T(We.$$.fragment,o),T(Be.$$.fragment,o),T(ye.$$.fragment,o),T(be.$$.fragment,o),T(we.$$.fragment,o),T(De.$$.fragment,o),T(ve.$$.fragment,o),T(Ne.$$.fragment,o),T(Xe.$$.fragment,o),T(ze.$$.fragment,o),T(Te.$$.fragment,o),T(je.$$.fragment,o),T(Me.$$.fragment,o),T(He.$$.fragment,o),T(xe.$$.fragment,o),T(Oe.$$.fragment,o),T(Ke.$$.fragment,o),T(tt.$$.fragment,o),T(Fe.$$.fragment,o),T(ke.$$.fragment,o),T(Ae.$$.fragment,o),T(at.$$.fragment,o),T(Ee.$$.fragment,o),un=!1},d(o){t(p),o&&t(_),o&&t(m),j(n),o&&t(M),o&&t(B),o&&t(tn),o&&t(fe),o&&t(on),o&&t(O),o&&t(nn),o&&t(he),o&&t(an),j(Je,o),o&&t(sn),j(ue,o),o&&t(ln),o&&t(Ze),o&&t(rn),o&&t(C),o&&t(pn),o&&t(ne),j(Ge),o&&t(dn),o&&t(E),j(We),j(Be),j(ye),j(be),j(we),j(De),j(ve),o&&t(cn),o&&t(se),j(Ne),o&&t(mn),o&&t(J),j(Xe),j(ze),j(Te),j(je),j(Me),j(He),j(xe),o&&t(fn),o&&t(le),j(Oe),o&&t(hn),o&&t(Z),j(Ke),j(tt),j(Fe),j(ke),j(Ae),j(at),j(Ee)}}}const qr={local:"autopipeline",sections:[{local:"diffusers.AutoPipelineForText2Image",title:"AutoPipelineForText2Image"},{local:"diffusers.AutoPipelineForImage2Image",title:"AutoPipelineForImage2Image"},{local:"diffusers.AutoPipelineForInpainting",title:"AutoPipelineForInpainting"}],title:"AutoPipeline"};function Or(x){return Gr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class sp extends Ar{constructor(p){super();Er(this,p,Or,Hr,Jr,{})}}export{sp as default,qr as metadata};
