import{S as Oo,i as xo,s as zo,e as l,k as d,w as P,t as o,M as Ro,c as r,d as s,m as h,a as i,x as U,h as a,b as f,G as e,g as c,y as C,L as Ao,q as W,o as S,B as j,v as Vo}from"../../chunks/vendor-hf-doc-builder.js";import{I as As}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as ce}from"../../chunks/CodeBlock-hf-doc-builder.js";function Lo(Vs){let Z,Le,B,D,de,O,ut,he,mt,Ye,m,x,yt,wt,pe,vt,gt,ue,bt,Et,z,me,_t,kt,ye,Mt,$t,we,Tt,Zt,Qe,E,Bt,ve,Gt,Jt,ge,Pt,Ut,Xe,R,qe,p,Ct,A,be,Wt,St,Ee,jt,Dt,_e,It,Nt,ke,Ot,xt,Me,zt,Rt,$e,At,Vt,He,_,Lt,Te,Yt,Qt,Ze,Xt,qt,Fe,V,Ke,k,Ht,Be,Ft,Kt,ae,es,ts,et,L,tt,G,I,Ge,Y,ss,Je,os,st,u,as,Pe,ls,rs,Ue,is,ns,Q,fs,cs,Ce,ds,hs,We,ps,us,X,ms,ys,ot,y,ws,Se,vs,gs,je,bs,Es,q,_s,ks,De,Ms,$s,at,H,lt,J,N,Ie,F,Ts,Ne,Zs,rt,le,Bs,it,M,Oe,xe,Gs,Js,g,K,Ps,ze,Us,Cs,Ws,Re,Ss,js,ee,Ds,Ae,Is,Ns,te,Os,Ve,se,xs,oe,zs,Rs,nt;return O=new As({}),R=new ce({props:{code:"IXBpcCUyMGluc3RhbGwlMjBzYWZldGVuc29ycw==",highlighted:"!pip install safetensors"}}),V=new ce({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

pipeline = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, use_safetensors=<span class="hljs-literal">True</span>)`}}),L=new ce({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX2NrcHQoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRldhcnJpb3JNYW1hNzc3JTJGT3JhbmdlTWl4cyUyRmJsb2IlMkZtYWluJTJGTW9kZWxzJTJGQWJ5c3NPcmFuZ2VNaXglMkZBYnlzc09yYW5nZU1peC5zYWZldGVuc29ycyUyMiUwQSk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

pipeline = StableDiffusionPipeline.from_ckpt(
    <span class="hljs-string">&quot;https://huggingface.co/WarriorMama777/OrangeMixs/blob/main/Models/AbyssOrangeMix/AbyssOrangeMix.safetensors&quot;</span>
)`}}),Y=new As({}),H=new ce({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLTItMSUyMiUyQyUyMHJldmlzaW9uJTNEJTIycmVmcyUyRnByJTJGMjIlMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

pipeline = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>, revision=<span class="hljs-string">&quot;refs/pr/22&quot;</span>)`}}),F=new As({}),ee=new ce({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLTItMSUyMiklMEElMjJMb2FkZWQlMjBpbiUyMHNhZmV0ZW5zb3JzJTIwMCUzQTAwJTNBMDIuMDMzNjU4JTIyJTBBJTIyTG9hZGVkJTIwaW4lMjBQeVRvcmNoJTIwMCUzQTAwJTNBMDIuNjYzMzc5JTIy",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

pipeline = StableDiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>)
<span class="hljs-string">&quot;Loaded in safetensors 0:00:02.033658&quot;</span>
<span class="hljs-string">&quot;Loaded in PyTorch 0:00:02.663379&quot;</span>`}}),te=new ce({props:{code:"c2FmZXRlbnNvcnMlM0ElMjAzLjQ4NzNtcyUwQVB5VG9yY2glM0ElMjAxNzIuNzUzN21z",highlighted:`safetensors: 3.4873ms
PyTorch: 172.7537ms`}}),{c(){Z=l("meta"),Le=d(),B=l("h1"),D=l("a"),de=l("span"),P(O.$$.fragment),ut=d(),he=l("span"),mt=o("Load safetensors"),Ye=d(),m=l("p"),x=l("a"),yt=o("safetensors"),wt=o(" is a safe and fast file format for storing and loading tensors. Typically, PyTorch model weights are saved or "),pe=l("em"),vt=o("pickled"),gt=o(" into a "),ue=l("code"),bt=o(".bin"),Et=o(" file with Python\u2019s "),z=l("a"),me=l("code"),_t=o("pickle"),kt=o(" utility. However, "),ye=l("code"),Mt=o("pickle"),$t=o(" is not secure and pickled files may contain malicious code that can be executed. safetensors is a secure alternative to "),we=l("code"),Tt=o("pickle"),Zt=o(", making it ideal for sharing model weights."),Qe=d(),E=l("p"),Bt=o("This guide will show you how you load "),ve=l("code"),Gt=o(".safetensor"),Jt=o(" files, and how to convert Stable Diffusion model weights stored in other formats to "),ge=l("code"),Pt=o(".safetensor"),Ut=o(". Before you start, make sure you have safetensors installed:"),Xe=d(),P(R.$$.fragment),qe=d(),p=l("p"),Ct=o("If you look at the "),A=l("a"),be=l("code"),Wt=o("runwayml/stable-diffusion-v1-5"),St=o(" repository, you\u2019ll see weights inside the "),Ee=l("code"),jt=o("text_encoder"),Dt=o(", "),_e=l("code"),It=o("unet"),Nt=o(" and "),ke=l("code"),Ot=o("vae"),xt=o(" subfolders are stored in the "),Me=l("code"),zt=o(".safetensors"),Rt=o(" format. By default, \u{1F917} Diffusers automatically loads these "),$e=l("code"),At=o(".safetensors"),Vt=o(" files from their subfolders if they\u2019re available in the model repository."),He=d(),_=l("p"),Lt=o("For more explicit control, you can optionally set "),Te=l("code"),Yt=o("use_safetensors=True"),Qt=o(" (if "),Ze=l("code"),Xt=o("safetensors"),qt=o(" is not installed, you\u2019ll get an error message asking you to install it):"),Fe=d(),P(V.$$.fragment),Ke=d(),k=l("p"),Ht=o("However, model weights are not necessarily stored in separate subfolders like in the example above. Sometimes, all the weights are stored in a single "),Be=l("code"),Ft=o(".safetensors"),Kt=o(" file. In this case, if the weights are Stable Diffusion weights, you can load the file directly with the "),ae=l("a"),es=o("from_ckpt()"),ts=o(" method:"),et=d(),P(L.$$.fragment),tt=d(),G=l("h2"),I=l("a"),Ge=l("span"),P(Y.$$.fragment),ss=d(),Je=l("span"),os=o("Convert to safetensors"),st=d(),u=l("p"),as=o("Not all weights on the Hub are available in the "),Pe=l("code"),ls=o(".safetensors"),rs=o(" format, and you may encounter weights stored as "),Ue=l("code"),is=o(".bin"),ns=o(". In this case, use the "),Q=l("a"),fs=o("Convert Space"),cs=o(" to convert the weights to "),Ce=l("code"),ds=o(".safetensors"),hs=o(". The Convert Space downloads the pickled weights, converts them, and opens a Pull Request to upload the newly converted "),We=l("code"),ps=o(".safetensors"),us=o(" file on the Hub. This way, if there is any malicious code contained in the pickled files, they\u2019re uploaded to the Hub - which has a "),X=l("a"),ms=o("security scanner"),ys=o(" to detect unsafe files and suspicious pickle imports - instead of your computer."),ot=d(),y=l("p"),ws=o("You can use the model with the new "),Se=l("code"),vs=o(".safetensors"),gs=o(" weights by specifying the reference to the Pull Request in the "),je=l("code"),bs=o("revision"),Es=o(" parameter (you can also test it in this "),q=l("a"),_s=o("Check PR"),ks=o(" Space on the Hub), for example "),De=l("code"),Ms=o("refs/pr/22"),$s=o(":"),at=d(),P(H.$$.fragment),lt=d(),J=l("h2"),N=l("a"),Ie=l("span"),P(F.$$.fragment),Ts=d(),Ne=l("span"),Zs=o("Why use safetensors?"),rt=d(),le=l("p"),Bs=o("There are several reasons for using safetensors:"),it=d(),M=l("ul"),Oe=l("li"),xe=l("p"),Gs=o("Safety is the number one reason for using safetensors. As open-source and model distribution grows, it is important to be able to trust the model weights you downloaded don\u2019t contain any malicious code. The current size of the header in safetensors prevents parsing extremely large JSON files."),Js=d(),g=l("li"),K=l("p"),Ps=o("Loading speed between switching models is another reason to use safetensors, which performs zero-copy of the tensors. It is especially fast compared to "),ze=l("code"),Us=o("pickle"),Cs=o(" if you\u2019re loading the weights to CPU (the default case), and just as fast if not faster when directly loading the weights to GPU. You\u2019ll only notice the performance difference if the model is already loaded, and not if you\u2019re downloading the weights or loading the model for the first time."),Ws=d(),Re=l("p"),Ss=o("The time it takes to load the entire pipeline:"),js=d(),P(ee.$$.fragment),Ds=d(),Ae=l("p"),Is=o("But the actual time it takes to load 500MB of the model weights is only:"),Ns=d(),P(te.$$.fragment),Os=d(),Ve=l("li"),se=l("p"),xs=o("Lazy loading is also supported in safetensors, which is useful in distributed settings to only load some of the tensors. This format allowed the "),oe=l("a"),zs=o("BLOOM"),Rs=o(" model to be loaded in 45 seconds on 8 GPUs instead of 10 minutes with regular PyTorch weights."),this.h()},l(t){const n=Ro('[data-svelte="svelte-1phssyn"]',document.head);Z=r(n,"META",{name:!0,content:!0}),n.forEach(s),Le=h(t),B=r(t,"H1",{class:!0});var ft=i(B);D=r(ft,"A",{id:!0,class:!0,href:!0});var Ls=i(D);de=r(Ls,"SPAN",{});var Ys=i(de);U(O.$$.fragment,Ys),Ys.forEach(s),Ls.forEach(s),ut=h(ft),he=r(ft,"SPAN",{});var Qs=i(he);mt=a(Qs,"Load safetensors"),Qs.forEach(s),ft.forEach(s),Ye=h(t),m=r(t,"P",{});var b=i(m);x=r(b,"A",{href:!0,rel:!0});var Xs=i(x);yt=a(Xs,"safetensors"),Xs.forEach(s),wt=a(b," is a safe and fast file format for storing and loading tensors. Typically, PyTorch model weights are saved or "),pe=r(b,"EM",{});var qs=i(pe);vt=a(qs,"pickled"),qs.forEach(s),gt=a(b," into a "),ue=r(b,"CODE",{});var Hs=i(ue);bt=a(Hs,".bin"),Hs.forEach(s),Et=a(b," file with Python\u2019s "),z=r(b,"A",{href:!0,rel:!0});var Fs=i(z);me=r(Fs,"CODE",{});var Ks=i(me);_t=a(Ks,"pickle"),Ks.forEach(s),Fs.forEach(s),kt=a(b," utility. However, "),ye=r(b,"CODE",{});var eo=i(ye);Mt=a(eo,"pickle"),eo.forEach(s),$t=a(b," is not secure and pickled files may contain malicious code that can be executed. safetensors is a secure alternative to "),we=r(b,"CODE",{});var to=i(we);Tt=a(to,"pickle"),to.forEach(s),Zt=a(b,", making it ideal for sharing model weights."),b.forEach(s),Qe=h(t),E=r(t,"P",{});var re=i(E);Bt=a(re,"This guide will show you how you load "),ve=r(re,"CODE",{});var so=i(ve);Gt=a(so,".safetensor"),so.forEach(s),Jt=a(re," files, and how to convert Stable Diffusion model weights stored in other formats to "),ge=r(re,"CODE",{});var oo=i(ge);Pt=a(oo,".safetensor"),oo.forEach(s),Ut=a(re,". Before you start, make sure you have safetensors installed:"),re.forEach(s),Xe=h(t),U(R.$$.fragment,t),qe=h(t),p=r(t,"P",{});var w=i(p);Ct=a(w,"If you look at the "),A=r(w,"A",{href:!0,rel:!0});var ao=i(A);be=r(ao,"CODE",{});var lo=i(be);Wt=a(lo,"runwayml/stable-diffusion-v1-5"),lo.forEach(s),ao.forEach(s),St=a(w," repository, you\u2019ll see weights inside the "),Ee=r(w,"CODE",{});var ro=i(Ee);jt=a(ro,"text_encoder"),ro.forEach(s),Dt=a(w,", "),_e=r(w,"CODE",{});var io=i(_e);It=a(io,"unet"),io.forEach(s),Nt=a(w," and "),ke=r(w,"CODE",{});var no=i(ke);Ot=a(no,"vae"),no.forEach(s),xt=a(w," subfolders are stored in the "),Me=r(w,"CODE",{});var fo=i(Me);zt=a(fo,".safetensors"),fo.forEach(s),Rt=a(w," format. By default, \u{1F917} Diffusers automatically loads these "),$e=r(w,"CODE",{});var co=i($e);At=a(co,".safetensors"),co.forEach(s),Vt=a(w," files from their subfolders if they\u2019re available in the model repository."),w.forEach(s),He=h(t),_=r(t,"P",{});var ie=i(_);Lt=a(ie,"For more explicit control, you can optionally set "),Te=r(ie,"CODE",{});var ho=i(Te);Yt=a(ho,"use_safetensors=True"),ho.forEach(s),Qt=a(ie," (if "),Ze=r(ie,"CODE",{});var po=i(Ze);Xt=a(po,"safetensors"),po.forEach(s),qt=a(ie," is not installed, you\u2019ll get an error message asking you to install it):"),ie.forEach(s),Fe=h(t),U(V.$$.fragment,t),Ke=h(t),k=r(t,"P",{});var ne=i(k);Ht=a(ne,"However, model weights are not necessarily stored in separate subfolders like in the example above. Sometimes, all the weights are stored in a single "),Be=r(ne,"CODE",{});var uo=i(Be);Ft=a(uo,".safetensors"),uo.forEach(s),Kt=a(ne," file. In this case, if the weights are Stable Diffusion weights, you can load the file directly with the "),ae=r(ne,"A",{href:!0});var mo=i(ae);es=a(mo,"from_ckpt()"),mo.forEach(s),ts=a(ne," method:"),ne.forEach(s),et=h(t),U(L.$$.fragment,t),tt=h(t),G=r(t,"H2",{class:!0});var ct=i(G);I=r(ct,"A",{id:!0,class:!0,href:!0});var yo=i(I);Ge=r(yo,"SPAN",{});var wo=i(Ge);U(Y.$$.fragment,wo),wo.forEach(s),yo.forEach(s),ss=h(ct),Je=r(ct,"SPAN",{});var vo=i(Je);os=a(vo,"Convert to safetensors"),vo.forEach(s),ct.forEach(s),st=h(t),u=r(t,"P",{});var v=i(u);as=a(v,"Not all weights on the Hub are available in the "),Pe=r(v,"CODE",{});var go=i(Pe);ls=a(go,".safetensors"),go.forEach(s),rs=a(v," format, and you may encounter weights stored as "),Ue=r(v,"CODE",{});var bo=i(Ue);is=a(bo,".bin"),bo.forEach(s),ns=a(v,". In this case, use the "),Q=r(v,"A",{href:!0,rel:!0});var Eo=i(Q);fs=a(Eo,"Convert Space"),Eo.forEach(s),cs=a(v," to convert the weights to "),Ce=r(v,"CODE",{});var _o=i(Ce);ds=a(_o,".safetensors"),_o.forEach(s),hs=a(v,". The Convert Space downloads the pickled weights, converts them, and opens a Pull Request to upload the newly converted "),We=r(v,"CODE",{});var ko=i(We);ps=a(ko,".safetensors"),ko.forEach(s),us=a(v," file on the Hub. This way, if there is any malicious code contained in the pickled files, they\u2019re uploaded to the Hub - which has a "),X=r(v,"A",{href:!0,rel:!0});var Mo=i(X);ms=a(Mo,"security scanner"),Mo.forEach(s),ys=a(v," to detect unsafe files and suspicious pickle imports - instead of your computer."),v.forEach(s),ot=h(t),y=r(t,"P",{});var $=i(y);ws=a($,"You can use the model with the new "),Se=r($,"CODE",{});var $o=i(Se);vs=a($o,".safetensors"),$o.forEach(s),gs=a($," weights by specifying the reference to the Pull Request in the "),je=r($,"CODE",{});var To=i(je);bs=a(To,"revision"),To.forEach(s),Es=a($," parameter (you can also test it in this "),q=r($,"A",{href:!0,rel:!0});var Zo=i(q);_s=a(Zo,"Check PR"),Zo.forEach(s),ks=a($," Space on the Hub), for example "),De=r($,"CODE",{});var Bo=i(De);Ms=a(Bo,"refs/pr/22"),Bo.forEach(s),$s=a($,":"),$.forEach(s),at=h(t),U(H.$$.fragment,t),lt=h(t),J=r(t,"H2",{class:!0});var dt=i(J);N=r(dt,"A",{id:!0,class:!0,href:!0});var Go=i(N);Ie=r(Go,"SPAN",{});var Jo=i(Ie);U(F.$$.fragment,Jo),Jo.forEach(s),Go.forEach(s),Ts=h(dt),Ne=r(dt,"SPAN",{});var Po=i(Ne);Zs=a(Po,"Why use safetensors?"),Po.forEach(s),dt.forEach(s),rt=h(t),le=r(t,"P",{});var Uo=i(le);Bs=a(Uo,"There are several reasons for using safetensors:"),Uo.forEach(s),it=h(t),M=r(t,"UL",{});var fe=i(M);Oe=r(fe,"LI",{});var Co=i(Oe);xe=r(Co,"P",{});var Wo=i(xe);Gs=a(Wo,"Safety is the number one reason for using safetensors. As open-source and model distribution grows, it is important to be able to trust the model weights you downloaded don\u2019t contain any malicious code. The current size of the header in safetensors prevents parsing extremely large JSON files."),Wo.forEach(s),Co.forEach(s),Js=h(fe),g=r(fe,"LI",{});var T=i(g);K=r(T,"P",{});var ht=i(K);Ps=a(ht,"Loading speed between switching models is another reason to use safetensors, which performs zero-copy of the tensors. It is especially fast compared to "),ze=r(ht,"CODE",{});var So=i(ze);Us=a(So,"pickle"),So.forEach(s),Cs=a(ht," if you\u2019re loading the weights to CPU (the default case), and just as fast if not faster when directly loading the weights to GPU. You\u2019ll only notice the performance difference if the model is already loaded, and not if you\u2019re downloading the weights or loading the model for the first time."),ht.forEach(s),Ws=h(T),Re=r(T,"P",{});var jo=i(Re);Ss=a(jo,"The time it takes to load the entire pipeline:"),jo.forEach(s),js=h(T),U(ee.$$.fragment,T),Ds=h(T),Ae=r(T,"P",{});var Do=i(Ae);Is=a(Do,"But the actual time it takes to load 500MB of the model weights is only:"),Do.forEach(s),Ns=h(T),U(te.$$.fragment,T),T.forEach(s),Os=h(fe),Ve=r(fe,"LI",{});var Io=i(Ve);se=r(Io,"P",{});var pt=i(se);xs=a(pt,"Lazy loading is also supported in safetensors, which is useful in distributed settings to only load some of the tensors. This format allowed the "),oe=r(pt,"A",{href:!0,rel:!0});var No=i(oe);zs=a(No,"BLOOM"),No.forEach(s),Rs=a(pt," model to be loaded in 45 seconds on 8 GPUs instead of 10 minutes with regular PyTorch weights."),pt.forEach(s),Io.forEach(s),fe.forEach(s),this.h()},h(){f(Z,"name","hf:doc:metadata"),f(Z,"content",JSON.stringify(Yo)),f(D,"id","load-safetensors"),f(D,"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"),f(D,"href","#load-safetensors"),f(B,"class","relative group"),f(x,"href","https://github.com/huggingface/safetensors"),f(x,"rel","nofollow"),f(z,"href","https://docs.python.org/3/library/pickle.html"),f(z,"rel","nofollow"),f(A,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5/tree/main"),f(A,"rel","nofollow"),f(ae,"href","/docs/diffusers/v0.17.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline.from_ckpt"),f(I,"id","convert-to-safetensors"),f(I,"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"),f(I,"href","#convert-to-safetensors"),f(G,"class","relative group"),f(Q,"href","https://huggingface.co/spaces/diffusers/convert"),f(Q,"rel","nofollow"),f(X,"href","https://huggingface.co/docs/hub/security-pickle#hubs-security-scanner"),f(X,"rel","nofollow"),f(q,"href","https://huggingface.co/spaces/diffusers/check_pr"),f(q,"rel","nofollow"),f(N,"id","why-use-safetensors"),f(N,"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"),f(N,"href","#why-use-safetensors"),f(J,"class","relative group"),f(oe,"href","https://huggingface.co/bigscience/bloom"),f(oe,"rel","nofollow")},m(t,n){e(document.head,Z),c(t,Le,n),c(t,B,n),e(B,D),e(D,de),C(O,de,null),e(B,ut),e(B,he),e(he,mt),c(t,Ye,n),c(t,m,n),e(m,x),e(x,yt),e(m,wt),e(m,pe),e(pe,vt),e(m,gt),e(m,ue),e(ue,bt),e(m,Et),e(m,z),e(z,me),e(me,_t),e(m,kt),e(m,ye),e(ye,Mt),e(m,$t),e(m,we),e(we,Tt),e(m,Zt),c(t,Qe,n),c(t,E,n),e(E,Bt),e(E,ve),e(ve,Gt),e(E,Jt),e(E,ge),e(ge,Pt),e(E,Ut),c(t,Xe,n),C(R,t,n),c(t,qe,n),c(t,p,n),e(p,Ct),e(p,A),e(A,be),e(be,Wt),e(p,St),e(p,Ee),e(Ee,jt),e(p,Dt),e(p,_e),e(_e,It),e(p,Nt),e(p,ke),e(ke,Ot),e(p,xt),e(p,Me),e(Me,zt),e(p,Rt),e(p,$e),e($e,At),e(p,Vt),c(t,He,n),c(t,_,n),e(_,Lt),e(_,Te),e(Te,Yt),e(_,Qt),e(_,Ze),e(Ze,Xt),e(_,qt),c(t,Fe,n),C(V,t,n),c(t,Ke,n),c(t,k,n),e(k,Ht),e(k,Be),e(Be,Ft),e(k,Kt),e(k,ae),e(ae,es),e(k,ts),c(t,et,n),C(L,t,n),c(t,tt,n),c(t,G,n),e(G,I),e(I,Ge),C(Y,Ge,null),e(G,ss),e(G,Je),e(Je,os),c(t,st,n),c(t,u,n),e(u,as),e(u,Pe),e(Pe,ls),e(u,rs),e(u,Ue),e(Ue,is),e(u,ns),e(u,Q),e(Q,fs),e(u,cs),e(u,Ce),e(Ce,ds),e(u,hs),e(u,We),e(We,ps),e(u,us),e(u,X),e(X,ms),e(u,ys),c(t,ot,n),c(t,y,n),e(y,ws),e(y,Se),e(Se,vs),e(y,gs),e(y,je),e(je,bs),e(y,Es),e(y,q),e(q,_s),e(y,ks),e(y,De),e(De,Ms),e(y,$s),c(t,at,n),C(H,t,n),c(t,lt,n),c(t,J,n),e(J,N),e(N,Ie),C(F,Ie,null),e(J,Ts),e(J,Ne),e(Ne,Zs),c(t,rt,n),c(t,le,n),e(le,Bs),c(t,it,n),c(t,M,n),e(M,Oe),e(Oe,xe),e(xe,Gs),e(M,Js),e(M,g),e(g,K),e(K,Ps),e(K,ze),e(ze,Us),e(K,Cs),e(g,Ws),e(g,Re),e(Re,Ss),e(g,js),C(ee,g,null),e(g,Ds),e(g,Ae),e(Ae,Is),e(g,Ns),C(te,g,null),e(M,Os),e(M,Ve),e(Ve,se),e(se,xs),e(se,oe),e(oe,zs),e(se,Rs),nt=!0},p:Ao,i(t){nt||(W(O.$$.fragment,t),W(R.$$.fragment,t),W(V.$$.fragment,t),W(L.$$.fragment,t),W(Y.$$.fragment,t),W(H.$$.fragment,t),W(F.$$.fragment,t),W(ee.$$.fragment,t),W(te.$$.fragment,t),nt=!0)},o(t){S(O.$$.fragment,t),S(R.$$.fragment,t),S(V.$$.fragment,t),S(L.$$.fragment,t),S(Y.$$.fragment,t),S(H.$$.fragment,t),S(F.$$.fragment,t),S(ee.$$.fragment,t),S(te.$$.fragment,t),nt=!1},d(t){s(Z),t&&s(Le),t&&s(B),j(O),t&&s(Ye),t&&s(m),t&&s(Qe),t&&s(E),t&&s(Xe),j(R,t),t&&s(qe),t&&s(p),t&&s(He),t&&s(_),t&&s(Fe),j(V,t),t&&s(Ke),t&&s(k),t&&s(et),j(L,t),t&&s(tt),t&&s(G),j(Y),t&&s(st),t&&s(u),t&&s(ot),t&&s(y),t&&s(at),j(H,t),t&&s(lt),t&&s(J),j(F),t&&s(rt),t&&s(le),t&&s(it),t&&s(M),j(ee),j(te)}}}const Yo={local:"load-safetensors",sections:[{local:"convert-to-safetensors",title:"Convert to safetensors"},{local:"why-use-safetensors",title:"Why use safetensors?"}],title:"Load safetensors"};function Qo(Vs){return Vo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fo extends Oo{constructor(Z){super();xo(this,Z,Qo,Lo,zo,{})}}export{Fo as default,Yo as metadata};
