var de=Object.defineProperty,he=Object.defineProperties;var pe=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var Z=(a,e,t)=>e in a?de(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,b=(a,e)=>{for(var t in e||(e={}))ee.call(e,t)&&Z(a,t,e[t]);if(B)for(var t of B(e))te.call(e,t)&&Z(a,t,e[t]);return a},W=(a,e)=>he(a,pe(e));var ie=(a,e)=>{var t={};for(var s in a)ee.call(a,s)&&e.indexOf(s)<0&&(t[s]=a[s]);if(a!=null&&B)for(var s of B(a))e.indexOf(s)<0&&te.call(a,s)&&(t[s]=a[s]);return t};import{S as ge,i as me,s as ve,e as we,c as be,a as Ee,d as R,b as G,f as D,g as A,t as $e,h as ye,j as ke,k as Re,l as E,m as Le,n as x,o as $,p as U,q as y,r as Oe,u as Ae,v as F,w as P,x as C,y as T,z as j,A as z,B as V,C as q,D as Y,E as se}from"./chunks/vendor-hf-doc-builder.js";import{s as Pe,b as Te}from"./chunks/paths-hf-doc-builder.js";function Ve(a){let e,t,s;const l=[a[1]||{}];var r=a[0][0];function c(i){let o={};for(let u=0;u<l.length;u+=1)o=q(o,l[u]);return{props:o}}return r&&(e=new r(c())),{c(){e&&P(e.$$.fragment),t=E()},l(i){e&&C(e.$$.fragment,i),t=E()},m(i,o){e&&T(e,i,o),A(i,t,o),s=!0},p(i,o){const u=o&2?j(l,[z(i[1]||{})]):{};if(r!==(r=i[0][0])){if(e){x();const f=e;$(f.$$.fragment,1,0,()=>{V(f,1)}),U()}r?(e=new r(c()),P(e.$$.fragment),y(e.$$.fragment,1),T(e,t.parentNode,t)):e=null}else r&&e.$set(u)},i(i){s||(e&&y(e.$$.fragment,i),s=!0)},o(i){e&&$(e.$$.fragment,i),s=!1},d(i){i&&R(t),e&&V(e,i)}}}function Ie(a){let e,t,s;const l=[a[1]||{}];var r=a[0][0];function c(i){let o={$$slots:{default:[Ue]},$$scope:{ctx:i}};for(let u=0;u<l.length;u+=1)o=q(o,l[u]);return{props:o}}return r&&(e=new r(c(a))),{c(){e&&P(e.$$.fragment),t=E()},l(i){e&&C(e.$$.fragment,i),t=E()},m(i,o){e&&T(e,i,o),A(i,t,o),s=!0},p(i,o){const u=o&2?j(l,[z(i[1]||{})]):{};if(o&525&&(u.$$scope={dirty:o,ctx:i}),r!==(r=i[0][0])){if(e){x();const f=e;$(f.$$.fragment,1,0,()=>{V(f,1)}),U()}r?(e=new r(c(i)),P(e.$$.fragment),y(e.$$.fragment,1),T(e,t.parentNode,t)):e=null}else r&&e.$set(u)},i(i){s||(e&&y(e.$$.fragment,i),s=!0)},o(i){e&&$(e.$$.fragment,i),s=!1},d(i){i&&R(t),e&&V(e,i)}}}function De(a){let e,t,s;const l=[a[2]||{}];var r=a[0][1];function c(i){let o={};for(let u=0;u<l.length;u+=1)o=q(o,l[u]);return{props:o}}return r&&(e=new r(c())),{c(){e&&P(e.$$.fragment),t=E()},l(i){e&&C(e.$$.fragment,i),t=E()},m(i,o){e&&T(e,i,o),A(i,t,o),s=!0},p(i,o){const u=o&4?j(l,[z(i[2]||{})]):{};if(r!==(r=i[0][1])){if(e){x();const f=e;$(f.$$.fragment,1,0,()=>{V(f,1)}),U()}r?(e=new r(c()),P(e.$$.fragment),y(e.$$.fragment,1),T(e,t.parentNode,t)):e=null}else r&&e.$set(u)},i(i){s||(e&&y(e.$$.fragment,i),s=!0)},o(i){e&&$(e.$$.fragment,i),s=!1},d(i){i&&R(t),e&&V(e,i)}}}function Se(a){let e,t,s;const l=[a[2]||{}];var r=a[0][1];function c(i){let o={$$slots:{default:[xe]},$$scope:{ctx:i}};for(let u=0;u<l.length;u+=1)o=q(o,l[u]);return{props:o}}return r&&(e=new r(c(a))),{c(){e&&P(e.$$.fragment),t=E()},l(i){e&&C(e.$$.fragment,i),t=E()},m(i,o){e&&T(e,i,o),A(i,t,o),s=!0},p(i,o){const u=o&4?j(l,[z(i[2]||{})]):{};if(o&521&&(u.$$scope={dirty:o,ctx:i}),r!==(r=i[0][1])){if(e){x();const f=e;$(f.$$.fragment,1,0,()=>{V(f,1)}),U()}r?(e=new r(c(i)),P(e.$$.fragment),y(e.$$.fragment,1),T(e,t.parentNode,t)):e=null}else r&&e.$set(u)},i(i){s||(e&&y(e.$$.fragment,i),s=!0)},o(i){e&&$(e.$$.fragment,i),s=!1},d(i){i&&R(t),e&&V(e,i)}}}function xe(a){let e,t,s;const l=[a[3]||{}];var r=a[0][2];function c(i){let o={};for(let u=0;u<l.length;u+=1)o=q(o,l[u]);return{props:o}}return r&&(e=new r(c())),{c(){e&&P(e.$$.fragment),t=E()},l(i){e&&C(e.$$.fragment,i),t=E()},m(i,o){e&&T(e,i,o),A(i,t,o),s=!0},p(i,o){const u=o&8?j(l,[z(i[3]||{})]):{};if(r!==(r=i[0][2])){if(e){x();const f=e;$(f.$$.fragment,1,0,()=>{V(f,1)}),U()}r?(e=new r(c()),P(e.$$.fragment),y(e.$$.fragment,1),T(e,t.parentNode,t)):e=null}else r&&e.$set(u)},i(i){s||(e&&y(e.$$.fragment,i),s=!0)},o(i){e&&$(e.$$.fragment,i),s=!1},d(i){i&&R(t),e&&V(e,i)}}}function Ue(a){let e,t,s,l;const r=[Se,De],c=[];function i(o,u){return o[0][2]?0:1}return e=i(a),t=c[e]=r[e](a),{c(){t.c(),s=E()},l(o){t.l(o),s=E()},m(o,u){c[e].m(o,u),A(o,s,u),l=!0},p(o,u){let f=e;e=i(o),e===f?c[e].p(o,u):(x(),$(c[f],1,1,()=>{c[f]=null}),U(),t=c[e],t?t.p(o,u):(t=c[e]=r[e](o),t.c()),y(t,1),t.m(s.parentNode,s))},i(o){l||(y(t),l=!0)},o(o){$(t),l=!1},d(o){c[e].d(o),o&&R(s)}}}function re(a){let e,t=a[5]&&ne(a);return{c(){e=we("div"),t&&t.c(),this.h()},l(s){e=be(s,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var l=Ee(e);t&&t.l(l),l.forEach(R),this.h()},h(){G(e,"id","svelte-announcer"),G(e,"aria-live","assertive"),G(e,"aria-atomic","true"),D(e,"position","absolute"),D(e,"left","0"),D(e,"top","0"),D(e,"clip","rect(0 0 0 0)"),D(e,"clip-path","inset(50%)"),D(e,"overflow","hidden"),D(e,"white-space","nowrap"),D(e,"width","1px"),D(e,"height","1px")},m(s,l){A(s,e,l),t&&t.m(e,null)},p(s,l){s[5]?t?t.p(s,l):(t=ne(s),t.c(),t.m(e,null)):t&&(t.d(1),t=null)},d(s){s&&R(e),t&&t.d()}}}function ne(a){let e;return{c(){e=$e(a[6])},l(t){e=ye(t,a[6])},m(t,s){A(t,e,s)},p(t,s){s&64&&ke(e,t[6])},d(t){t&&R(e)}}}function Ne(a){let e,t,s,l,r;const c=[Ie,Ve],i=[];function o(f,d){return f[0][1]?0:1}e=o(a),t=i[e]=c[e](a);let u=a[4]&&re(a);return{c(){t.c(),s=Re(),u&&u.c(),l=E()},l(f){t.l(f),s=Le(f),u&&u.l(f),l=E()},m(f,d){i[e].m(f,d),A(f,s,d),u&&u.m(f,d),A(f,l,d),r=!0},p(f,[d]){let _=e;e=o(f),e===_?i[e].p(f,d):(x(),$(i[_],1,1,()=>{i[_]=null}),U(),t=i[e],t?t.p(f,d):(t=i[e]=c[e](f),t.c()),y(t,1),t.m(s.parentNode,s)),f[4]?u?u.p(f,d):(u=re(f),u.c(),u.m(l.parentNode,l)):u&&(u.d(1),u=null)},i(f){r||(y(t),r=!0)},o(f){$(t),r=!1},d(f){i[e].d(f),f&&R(s),u&&u.d(f),f&&R(l)}}}function Ce(a,e,t){let{stores:s}=e,{page:l}=e,{components:r}=e,{props_0:c=null}=e,{props_1:i=null}=e,{props_2:o=null}=e;Oe("__svelte__",s),Ae(s.page.notify);let u=!1,f=!1,d=null;return F(()=>{const _=s.page.subscribe(()=>{u&&(t(5,f=!0),t(6,d=document.title||"untitled page"))});return t(4,u=!0),_}),a.$$set=_=>{"stores"in _&&t(7,s=_.stores),"page"in _&&t(8,l=_.page),"components"in _&&t(0,r=_.components),"props_0"in _&&t(1,c=_.props_0),"props_1"in _&&t(2,i=_.props_1),"props_2"in _&&t(3,o=_.props_2)},a.$$.update=()=>{a.$$.dirty&384&&s.page.set(l)},[r,c,i,o,u,f,d,s,l]}class je extends ge{constructor(e){super();me(this,e,Ce,Ne,ve,{stores:7,page:8,components:0,props_0:1,props_1:2,props_2:3})}}const ze="modulepreload",oe={},qe="/docs/diffusers/pr_516/en/_app/",h=function(e,t){return!t||t.length===0?e():Promise.all(t.map(s=>{if(s=`${qe}${s}`,s in oe)return;oe[s]=!0;const l=s.endsWith(".css"),r=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${r}`))return;const c=document.createElement("link");if(c.rel=l?"stylesheet":ze,l||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),l)return new Promise((i,o)=>{c.addEventListener("load",i),c.addEventListener("error",o)})})).then(()=>e())},n=[()=>h(()=>import("./pages/__layout.svelte-hf-doc-builder.js"),["pages/__layout.svelte-hf-doc-builder.js","assets/pages/__layout.svelte-hf-doc-builder.css","chunks/vendor-hf-doc-builder.js","chunks/paths-hf-doc-builder.js"]),()=>h(()=>import("./error.svelte-hf-doc-builder.js"),["error.svelte-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js"]),()=>h(()=>import("./pages/index.mdx-hf-doc-builder.js"),["pages/index.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/using-diffusers/unconditional_image_generation.mdx-hf-doc-builder.js"),["pages/using-diffusers/unconditional_image_generation.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/using-diffusers/conditional_image_generation.mdx-hf-doc-builder.js"),["pages/using-diffusers/conditional_image_generation.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/using-diffusers/custom_pipeline_examples.mdx-hf-doc-builder.js"),["pages/using-diffusers/custom_pipeline_examples.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/using-diffusers/custom_pipeline_overview.mdx-hf-doc-builder.js"),["pages/using-diffusers/custom_pipeline_overview.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/using-diffusers/contribute_pipeline.mdx-hf-doc-builder.js"),["pages/using-diffusers/contribute_pipeline.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/using-diffusers/configuration.mdx-hf-doc-builder.js"),["pages/using-diffusers/configuration.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/using-diffusers/img2img.mdx-hf-doc-builder.js"),["pages/using-diffusers/img2img.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/using-diffusers/inpaint.mdx-hf-doc-builder.js"),["pages/using-diffusers/inpaint.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/using-diffusers/loading.mdx-hf-doc-builder.js"),["pages/using-diffusers/loading.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/ExampleCodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/installation.mdx-hf-doc-builder.js"),["pages/installation.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/optimization/open_vino.mdx-hf-doc-builder.js"),["pages/optimization/open_vino.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/optimization/fp16.mdx-hf-doc-builder.js"),["pages/optimization/fp16.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/optimization/onnx.mdx-hf-doc-builder.js"),["pages/optimization/onnx.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/optimization/mps.mdx-hf-doc-builder.js"),["pages/optimization/mps.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/conceptual/stable_diffusion.mdx-hf-doc-builder.js"),["pages/conceptual/stable_diffusion.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/conceptual/contribution.mdx-hf-doc-builder.js"),["pages/conceptual/contribution.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/conceptual/philosophy.mdx-hf-doc-builder.js"),["pages/conceptual/philosophy.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/quicktour.mdx-hf-doc-builder.js"),["pages/quicktour.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/training/unconditional_training.mdx-hf-doc-builder.js"),["pages/training/unconditional_training.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/training/text_inversion.mdx-hf-doc-builder.js"),["pages/training/text_inversion.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/training/dreambooth.mdx-hf-doc-builder.js"),["pages/training/dreambooth.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/training/text2image.mdx-hf-doc-builder.js"),["pages/training/text2image.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/training/overview.mdx-hf-doc-builder.js"),["pages/training/overview.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/diffusion_pipeline.mdx-hf-doc-builder.js"),["pages/api/diffusion_pipeline.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/ExampleCodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/configuration.mdx-hf-doc-builder.js"),["pages/api/configuration.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/schedulers.mdx-hf-doc-builder.js"),["pages/api/schedulers.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/pipelines/latent_diffusion_uncond.mdx-hf-doc-builder.js"),["pages/api/pipelines/latent_diffusion_uncond.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/pipelines/stochastic_karras_ve.mdx-hf-doc-builder.js"),["pages/api/pipelines/stochastic_karras_ve.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/pipelines/latent_diffusion.mdx-hf-doc-builder.js"),["pages/api/pipelines/latent_diffusion.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/pipelines/stable_diffusion.mdx-hf-doc-builder.js"),["pages/api/pipelines/stable_diffusion.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/pipelines/dance_diffusion.mdx-hf-doc-builder.js"),["pages/api/pipelines/dance_diffusion.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/pipelines/score_sde_ve.mdx-hf-doc-builder.js"),["pages/api/pipelines/score_sde_ve.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/pipelines/overview.mdx-hf-doc-builder.js"),["pages/api/pipelines/overview.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/pipelines/ddim.mdx-hf-doc-builder.js"),["pages/api/pipelines/ddim.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/pipelines/ddpm.mdx-hf-doc-builder.js"),["pages/api/pipelines/ddpm.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/pipelines/pndm.mdx-hf-doc-builder.js"),["pages/api/pipelines/pndm.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/logging.mdx-hf-doc-builder.js"),["pages/api/logging.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/ExampleCodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/outputs.mdx-hf-doc-builder.js"),["pages/api/outputs.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/api/models.mdx-hf-doc-builder.js"),["pages/api/models.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Docstring-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/ExampleCodeBlock-hf-doc-builder.js"])],Je=[[/^\/$/,[n[0],n[2]],[n[1]]],[/^\/using-diffusers\/unconditional_image_generation\/?$/,[n[0],n[3]],[n[1]]],[/^\/using-diffusers\/conditional_image_generation\/?$/,[n[0],n[4]],[n[1]]],[/^\/using-diffusers\/custom_pipeline_examples\/?$/,[n[0],n[5]],[n[1]]],[/^\/using-diffusers\/custom_pipeline_overview\/?$/,[n[0],n[6]],[n[1]]],[/^\/using-diffusers\/contribute_pipeline\/?$/,[n[0],n[7]],[n[1]]],[/^\/using-diffusers\/configuration\/?$/,[n[0],n[8]],[n[1]]],[/^\/using-diffusers\/img2img\/?$/,[n[0],n[9]],[n[1]]],[/^\/using-diffusers\/inpaint\/?$/,[n[0],n[10]],[n[1]]],[/^\/using-diffusers\/loading\/?$/,[n[0],n[11]],[n[1]]],[/^\/installation\/?$/,[n[0],n[12]],[n[1]]],[/^\/optimization\/open_vino\/?$/,[n[0],n[13]],[n[1]]],[/^\/optimization\/fp16\/?$/,[n[0],n[14]],[n[1]]],[/^\/optimization\/onnx\/?$/,[n[0],n[15]],[n[1]]],[/^\/optimization\/mps\/?$/,[n[0],n[16]],[n[1]]],[/^\/conceptual\/stable_diffusion\/?$/,[n[0],n[17]],[n[1]]],[/^\/conceptual\/contribution\/?$/,[n[0],n[18]],[n[1]]],[/^\/conceptual\/philosophy\/?$/,[n[0],n[19]],[n[1]]],[/^\/quicktour\/?$/,[n[0],n[20]],[n[1]]],[/^\/training\/unconditional_training\/?$/,[n[0],n[21]],[n[1]]],[/^\/training\/text_inversion\/?$/,[n[0],n[22]],[n[1]]],[/^\/training\/dreambooth\/?$/,[n[0],n[23]],[n[1]]],[/^\/training\/text2image\/?$/,[n[0],n[24]],[n[1]]],[/^\/training\/overview\/?$/,[n[0],n[25]],[n[1]]],[/^\/api\/diffusion_pipeline\/?$/,[n[0],n[26]],[n[1]]],[/^\/api\/configuration\/?$/,[n[0],n[27]],[n[1]]],[/^\/api\/schedulers\/?$/,[n[0],n[28]],[n[1]]],[/^\/api\/pipelines\/latent_diffusion_uncond\/?$/,[n[0],n[29]],[n[1]]],[/^\/api\/pipelines\/stochastic_karras_ve\/?$/,[n[0],n[30]],[n[1]]],[/^\/api\/pipelines\/latent_diffusion\/?$/,[n[0],n[31]],[n[1]]],[/^\/api\/pipelines\/stable_diffusion\/?$/,[n[0],n[32]],[n[1]]],[/^\/api\/pipelines\/dance_diffusion\/?$/,[n[0],n[33]],[n[1]]],[/^\/api\/pipelines\/score_sde_ve\/?$/,[n[0],n[34]],[n[1]]],[/^\/api\/pipelines\/overview\/?$/,[n[0],n[35]],[n[1]]],[/^\/api\/pipelines\/ddim\/?$/,[n[0],n[36]],[n[1]]],[/^\/api\/pipelines\/ddpm\/?$/,[n[0],n[37]],[n[1]]],[/^\/api\/pipelines\/pndm\/?$/,[n[0],n[38]],[n[1]]],[/^\/api\/logging\/?$/,[n[0],n[39]],[n[1]]],[/^\/api\/outputs\/?$/,[n[0],n[40]],[n[1]]],[/^\/api\/models\/?$/,[n[0],n[41]],[n[1]]]],Ke=[n[0](),n[1]()];function Be(a){let e=a.baseURI;if(!e){const t=a.getElementsByTagName("base");e=t.length?t[0].href:a.URL}return e}function We(a,e){return a==="/"||e==="ignore"?a:e==="never"?a.endsWith("/")?a.slice(0,-1):a:e==="always"&&/\/[^./]+$/.test(a)?a+"/":a}const _e="sveltekit:scroll";let N={};try{N=JSON.parse(sessionStorage[_e])}catch{}function M(a){N[a]=X()}function X(){return{x:pageXOffset,y:pageYOffset}}function ae(a){return a.composedPath().find(t=>t instanceof Node&&t.nodeName.toUpperCase()==="A")}function le(a){return a instanceof SVGAElement?new URL(a.href.baseVal,document.baseURI):new URL(a.href)}class Ye{constructor({base:e,routes:t,trailing_slash:s,renderer:l}){var c,i;this.base=e,this.routes=t,this.trailing_slash=s,this.navigating=0,this.renderer=l,l.router=this,this.enabled=!0,this.initialized=!1,document.body.setAttribute("tabindex","-1"),this.current_history_index=(i=(c=history.state)==null?void 0:c["sveltekit:index"])!=null?i:0,this.current_history_index===0&&history.replaceState(W(b({},history.state),{"sveltekit:index":0}),"",location.href);const r=N[this.current_history_index];r&&scrollTo(r.x,r.y),this.hash_navigating=!1,this.callbacks={before_navigate:[],after_navigate:[]}}init_listeners(){history.scrollRestoration="manual",addEventListener("beforeunload",l=>{let r=!1;const c={from:this.renderer.current.url,to:null,cancel:()=>r=!0};this.callbacks.before_navigate.forEach(i=>i(c)),r?(l.preventDefault(),l.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){M(this.current_history_index);try{sessionStorage[_e]=JSON.stringify(N)}catch{}}});const e=l=>{const r=ae(l);r&&r.href&&r.hasAttribute("sveltekit:prefetch")&&this.prefetch(le(r))};let t;const s=l=>{clearTimeout(t),t=setTimeout(()=>{var r;(r=l.target)==null||r.dispatchEvent(new CustomEvent("sveltekit:trigger_prefetch",{bubbles:!0}))},20)};addEventListener("touchstart",e),addEventListener("mousemove",s),addEventListener("sveltekit:trigger_prefetch",e),addEventListener("click",l=>{if(!this.enabled||l.button||l.which!==1||l.metaKey||l.ctrlKey||l.shiftKey||l.altKey||l.defaultPrevented)return;const r=ae(l);if(!r||!r.href)return;const c=r instanceof SVGAElement,i=le(r);if(i.toString()===location.href){location.hash||l.preventDefault();return}if(!c&&i.origin==="null")return;const u=(r.getAttribute("rel")||"").split(/\s+/);if(r.hasAttribute("download")||u&&u.includes("external")||(c?r.target.baseVal:r.target))return;const[f,d]=i.href.split("#");if(d!==void 0&&f===location.href.split("#")[0]){this.hash_navigating=!0,M(this.current_history_index),this.renderer.update_page_store(new URL(i.href));return}this._navigate({url:i,scroll:r.hasAttribute("sveltekit:noscroll")?X():null,keepfocus:!1,chain:[],details:{state:{},replaceState:!1},accepted:()=>l.preventDefault(),blocked:()=>l.preventDefault()})}),addEventListener("popstate",l=>{if(l.state&&this.enabled){if(l.state["sveltekit:index"]===this.current_history_index)return;this._navigate({url:new URL(location.href),scroll:N[l.state["sveltekit:index"]],keepfocus:!1,chain:[],details:null,accepted:()=>{this.current_history_index=l.state["sveltekit:index"]},blocked:()=>{const r=this.current_history_index-l.state["sveltekit:index"];history.go(r)}})}}),addEventListener("hashchange",()=>{this.hash_navigating&&(this.hash_navigating=!1,history.replaceState(W(b({},history.state),{"sveltekit:index":++this.current_history_index}),"",location.href))}),this.initialized=!0}owns(e){return e.origin===location.origin&&e.pathname.startsWith(this.base)}parse(e){if(this.owns(e)){const t=decodeURI(e.pathname.slice(this.base.length)||"/");return{id:e.pathname+e.search,routes:this.routes.filter(([s])=>s.test(t)),url:e,path:t,initial:!this.initialized}}}async goto(e,{noscroll:t=!1,replaceState:s=!1,keepfocus:l=!1,state:r={}}={},c){const i=new URL(e,Be(document));return this.enabled?this._navigate({url:i,scroll:t?X():null,keepfocus:l,chain:c,details:{state:r,replaceState:s},accepted:()=>{},blocked:()=>{}}):(location.href=i.href,new Promise(()=>{}))}enable(){this.enabled=!0}disable(){this.enabled=!1}async prefetch(e){const t=this.parse(e);if(!t)throw new Error("Attempted to prefetch a URL that does not belong to this app");return this.renderer.load(t)}after_navigate(e){F(()=>(this.callbacks.after_navigate.push(e),()=>{const t=this.callbacks.after_navigate.indexOf(e);this.callbacks.after_navigate.splice(t,1)}))}before_navigate(e){F(()=>(this.callbacks.before_navigate.push(e),()=>{const t=this.callbacks.before_navigate.indexOf(e);this.callbacks.before_navigate.splice(t,1)}))}async _navigate({url:e,scroll:t,keepfocus:s,chain:l,details:r,accepted:c,blocked:i}){const o=this.renderer.current.url;let u=!1;const f={from:o,to:e,cancel:()=>u=!0};if(this.callbacks.before_navigate.forEach(g=>g(f)),u){i();return}const d=this.parse(e);if(!d)return location.href=e.href,new Promise(()=>{});M(this.current_history_index),c(),this.navigating++;const _=We(e.pathname,this.trailing_slash);d.url=new URL(e.origin+_+e.search+e.hash);const p=this.navigating_token={};if(await this.renderer.handle_navigation(d,l,!1,{scroll:t,keepfocus:s}),this.navigating--,this.navigating_token===p){if(!this.navigating){const g={from:o,to:e};this.callbacks.after_navigate.forEach(I=>I(g))}if(r){const g=r.replaceState?0:1;r.state["sveltekit:index"]=this.current_history_index+=g,history[r.replaceState?"replaceState":"pushState"](r.state,"",d.url)}}}}function ce(a){return a instanceof Error||a&&a.name&&a.message?a:new Error(JSON.stringify(a))}function Ge(a){let e=5381,t=a.length;if(typeof a=="string")for(;t;)e=e*33^a.charCodeAt(--t);else for(;t;)e=e*33^a[--t];return(e>>>0).toString(36)}function ue(a){const e=a.status&&a.status>=400&&a.status<=599&&!a.redirect;if(a.error||e){const t=a.status;if(!a.error&&e)return{status:t||500,error:new Error};const s=typeof a.error=="string"?new Error(a.error):a.error;return s instanceof Error?!t||t<400||t>599?(console.warn('"error" returned from load() without a valid status code \u2014 defaulting to 500'),{status:500,error:s}):{status:t,error:s}:{status:500,error:new Error(`"error" property returned from load() must be a string or instance of Error, received type "${typeof s}"`)}}if(a.redirect){if(!a.status||Math.floor(a.status/100)!==3)return{status:500,error:new Error('"redirect" property returned from load() must be accompanied by a 3xx status code')};if(typeof a.redirect!="string")return{status:500,error:new Error('"redirect" property returned from load() must be a string')}}if(a.context)throw new Error('You are returning "context" from a load function. "context" was renamed to "stuff", please adjust your code accordingly.');return a}function fe(a){const e=Y(a);let t=!0;function s(){t=!0,e.update(c=>c)}function l(c){t=!1,e.set(c)}function r(c){let i;return e.subscribe(o=>{(i===void 0||t&&o!==i)&&c(i=o)})}return{notify:s,set:l,subscribe:r}}function Me(){const{set:a,subscribe:e}=Y(!1),t="1667054467395";let s;async function l(){clearTimeout(s);const c=await fetch(`${Te}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(c.ok){const{version:i}=await c.json(),o=i!==t;return o&&(a(!0),clearTimeout(s)),o}else throw new Error(`Version check failed: ${c.status}`)}return{subscribe:e,check:l}}function Fe(a,e){const t=typeof a=="string"?a:a.url;let s=`script[data-type="svelte-data"][data-url=${JSON.stringify(t)}]`;e&&typeof e.body=="string"&&(s+=`[data-body="${Ge(e.body)}"]`);const l=document.querySelector(s);if(l&&l.textContent){const r=JSON.parse(l.textContent),{body:c}=r,i=ie(r,["body"]);return Promise.resolve(new Response(c,i))}return fetch(a,e)}class Xe{constructor({Root:e,fallback:t,target:s,session:l}){this.Root=e,this.fallback=t,this.router,this.target=s,this.started=!1,this.session_id=1,this.invalid=new Set,this.invalidating=null,this.autoscroll=!0,this.updating=!1,this.current={url:null,session_id:0,branch:[]},this.cache=new Map,this.loading={id:null,promise:null},this.stores={url:fe({}),page:fe({}),navigating:Y(null),session:Y(l),updated:Me()},this.$session=null,this.root=null;let r=!1;this.stores.session.subscribe(async c=>{if(this.$session=c,!r||!this.router)return;this.session_id+=1;const i=this.router.parse(new URL(location.href));i&&this.update(i,[],!0)}),r=!0}disable_scroll_handling(){(this.updating||!this.started)&&(this.autoscroll=!1)}async start({status:e,error:t,nodes:s,params:l}){const r=new URL(location.href),c=[];let i={},o,u;try{for(let f=0;f<s.length;f+=1){const d=f===s.length-1;let _;if(d){const g=document.querySelector('[data-type="svelte-props"]');g&&(_=JSON.parse(g.textContent))}const p=await this._load_node({module:await s[f],url:r,params:l,stuff:i,status:d?e:void 0,error:d?t:void 0,props:_});if(_&&(p.uses.dependencies.add(r.href),p.uses.url=!0),c.push(p),p&&p.loaded)if(p.loaded.error){if(t)throw p.loaded.error;u={status:p.loaded.status,error:p.loaded.error,url:r}}else p.loaded.stuff&&(i=b(b({},i),p.loaded.stuff))}o=u?await this._load_error(u):await this._get_navigation_result_from_branch({url:r,params:l,stuff:i,branch:c,status:e,error:t})}catch(f){if(t)throw f;o=await this._load_error({status:500,error:ce(f),url:r})}if(o.redirect){location.href=new URL(o.redirect,location.href).href;return}this._init(o)}async handle_navigation(e,t,s,l){this.started&&this.stores.navigating.set({from:this.current.url,to:e.url}),await this.update(e,t,s,l)}async update(e,t,s,l){var o,u,f;const r=this.token={};let c=await this._get_navigation_result(e,s);if(!c){location.href=e.url.href;return}if(r!==this.token)return;if(this.invalid.clear(),c.redirect)if(t.length>10||t.includes(e.url.pathname))c=await this._load_error({status:500,error:new Error("Redirect loop"),url:e.url});else{this.router?this.router.goto(new URL(c.redirect,e.url).href,{},[...t,e.url.pathname]):location.href=new URL(c.redirect,location.href).href;return}else if(((u=(o=c.props)==null?void 0:o.page)==null?void 0:u.status)>=400&&await this.stores.updated.check()){location.href=e.url.href;return}if(this.updating=!0,this.started?(this.current=c.state,this.root.$set(c.props),this.stores.navigating.set(null)):this._init(c),l){const{scroll:d,keepfocus:_}=l;if(_||((f=getSelection())==null||f.removeAllRanges(),document.body.focus()),await se(),this.autoscroll){const p=e.url.hash&&document.getElementById(e.url.hash.slice(1));d?scrollTo(d.x,d.y):p?p.scrollIntoView():scrollTo(0,0)}}else await se();if(this.loading.promise=null,this.loading.id=null,this.autoscroll=!0,this.updating=!1,c.props.page&&(this.page=c.props.page),!this.router)return;const i=c.state.branch[c.state.branch.length-1];i&&i.module.router===!1?this.router.disable():this.router.enable()}load(e){return this.loading.promise=this._get_navigation_result(e,!1),this.loading.id=e.id,this.loading.promise}invalidate(e){return this.invalid.add(e),this.invalidating||(this.invalidating=Promise.resolve().then(async()=>{const t=this.router&&this.router.parse(new URL(location.href));t&&await this.update(t,[],!0),this.invalidating=null})),this.invalidating}update_page_store(e){this.stores.page.set(W(b({},this.page),{url:e})),this.stores.page.notify()}_init(e){this.current=e.state;const t=document.querySelector("style[data-svelte]");if(t&&t.remove(),this.page=e.props.page,this.root=new this.Root({target:this.target,props:b({stores:this.stores},e.props),hydrate:!0}),this.started=!0,this.router){const s={from:null,to:new URL(location.href)};this.router.callbacks.after_navigate.forEach(l=>l(s))}}async _get_navigation_result(e,t){if(this.loading.id===e.id&&this.loading.promise)return this.loading.promise;for(let s=0;s<e.routes.length;s+=1){const l=e.routes[s];let r=s+1;for(;r<e.routes.length;){const i=e.routes[r];if(i[0].toString()===l[0].toString())i[1].forEach(o=>o()),r+=1;else break}const c=await this._load({route:l,info:e},t);if(c)return c}if(e.initial)return await this._load_error({status:404,error:new Error(`Not found: ${e.url.pathname}`),url:e.url})}async _get_navigation_result_from_branch({url:e,params:t,stuff:s,branch:l,status:r,error:c}){const i=l.filter(Boolean),o=i.find(_=>_.loaded&&_.loaded.redirect),u={redirect:o&&o.loaded?o.loaded.redirect:void 0,state:{url:e,params:t,branch:l,session_id:this.session_id},props:{components:i.map(_=>_.module.default)}};for(let _=0;_<i.length;_+=1){const p=i[_].loaded;u.props[`props_${_}`]=p?await p.props:null}if(!this.current.url||e.href!==this.current.url.href){u.props.page={url:e,params:t,status:r,error:c,stuff:s};const _=(p,g)=>{Object.defineProperty(u.props.page,p,{get:()=>{throw new Error(`$page.${p} has been replaced by $page.url.${g}`)}})};_("origin","origin"),_("path","pathname"),_("query","searchParams")}const f=i[i.length-1],d=f.loaded&&f.loaded.maxage;if(d){const _=e.pathname+e.search;let p=!1;const g=()=>{this.cache.get(_)===u&&this.cache.delete(_),L(),clearTimeout(I)},I=setTimeout(g,d*1e3),L=this.stores.session.subscribe(()=>{p&&g()});p=!0,this.cache.set(_,u)}return u}async _load_node({status:e,error:t,module:s,url:l,params:r,stuff:c,props:i}){const o={module:s,uses:{params:new Set,url:!1,session:!1,stuff:!1,dependencies:new Set},loaded:null,stuff:c};i&&o.uses.dependencies.add(l.href);const u={};for(const d in r)Object.defineProperty(u,d,{get(){return o.uses.params.add(d),r[d]},enumerable:!0});const f=this.$session;if(s.load){const{started:d}=this,_={params:u,props:i||{},get url(){return o.uses.url=!0,l},get session(){return o.uses.session=!0,f},get stuff(){return o.uses.stuff=!0,b({},c)},fetch(g,I){const L=typeof g=="string"?g:g.url,{href:O}=new URL(L,l);return o.uses.dependencies.add(O),d?fetch(g,I):Fe(g,I)}};t&&(_.status=e,_.error=t);const p=await s.load.call(null,_);if(!p)throw new Error("load function must return a value");o.loaded=ue(p),o.loaded.stuff&&(o.stuff=o.loaded.stuff)}else i&&(o.loaded=ue({props:i}));return o}async _load({route:e,info:{url:t,path:s}},l){const r=t.pathname+t.search;if(!l){const m=this.cache.get(r);if(m)return m}const[c,i,o,u,f]=e,d=u?u(c.exec(s)):{},_=this.current.url&&{url:r!==this.current.url.pathname+this.current.url.search,params:Object.keys(d).filter(m=>this.current.params[m]!==d[m]),session:this.session_id!==this.current.session_id};let p=[],g={},I=!1,L=200,O;i.forEach(m=>m());e:for(let m=0;m<i.length;m+=1){let v;try{if(!i[m])continue;const w=await i[m](),k=this.current.branch[m];if(!k||w!==k.module||_.url&&k.uses.url||_.params.some(S=>k.uses.params.has(S))||_.session&&k.uses.session||Array.from(k.uses.dependencies).some(S=>this.invalid.has(S))||I&&k.uses.stuff){let S={};const H=f&&m===i.length-1;if(H){const K=await fetch(`${t.pathname}${t.pathname.endsWith("/")?"":"/"}__data.json${t.search}`,{headers:{"x-sveltekit-load":"true"}});if(K.ok){const Q=K.headers.get("x-sveltekit-location");if(Q)return{redirect:Q,props:{},state:this.current};S=await K.json()}else L=K.status,O=new Error("Failed to load data")}if(O||(v=await this._load_node({module:w,url:t,params:d,props:S,stuff:g})),v&&(H&&(v.uses.url=!0),v.loaded)){if(v.loaded.fallthrough)return;if(v.loaded.error&&(L=v.loaded.status,O=v.loaded.error),v.loaded.redirect)return{redirect:v.loaded.redirect,props:{},state:this.current};v.loaded.stuff&&(I=!0)}}else v=k}catch(w){L=500,O=ce(w)}if(O){for(;m--;)if(o[m]){let w,k,J=m;for(;!(k=p[J]);)J-=1;try{if(w=await this._load_node({status:L,error:O,module:await o[m](),url:t,params:d,stuff:k.stuff}),w&&w.loaded&&w.loaded.error)continue;w&&w.loaded&&w.loaded.stuff&&(g=b(b({},g),w.loaded.stuff)),p=p.slice(0,J+1).concat(w);break e}catch{continue}}return await this._load_error({status:L,error:O,url:t})}else v&&v.loaded&&v.loaded.stuff&&(g=b(b({},g),v.loaded.stuff)),p.push(v)}return await this._get_navigation_result_from_branch({url:t,params:d,stuff:g,branch:p,status:L,error:O})}async _load_error({status:e,error:t,url:s}){var u,f;const l={},r=await this._load_node({module:await this.fallback[0],url:s,params:l,stuff:{}}),c=await this._load_node({status:e,error:t,module:await this.fallback[1],url:s,params:l,stuff:r&&r.loaded&&r.loaded.stuff||{}}),i=[r,c],o=b(b({},(u=r==null?void 0:r.loaded)==null?void 0:u.stuff),(f=c==null?void 0:c.loaded)==null?void 0:f.stuff);return await this._get_navigation_result_from_branch({url:s,params:l,stuff:o,branch:i,status:e,error:t})}}async function et({paths:a,target:e,session:t,route:s,spa:l,trailing_slash:r,hydrate:c}){const i=new Xe({Root:je,fallback:Ke,target:e,session:t}),o=s?new Ye({base:a.base,routes:Je,trailing_slash:r,renderer:i}):null;Pe(a),c&&await i.start(c),o&&(l&&o.goto(location.href,{replaceState:!0},[]),o.init_listeners()),dispatchEvent(new CustomEvent("sveltekit:start"))}export{et as start};
