Buckets:
hf-doc-build/doc / diffusers /main /en /_app /pages /using-diffusers /reproducibility.mdx-hf-doc-builder.js
| import{S as Il,i as $l,s as Pl,e as a,k as c,w as g,t as i,M as Vl,c as n,d as s,m as u,a as r,x as J,h as o,b as m,G as t,g as p,y as T,q as U,o as Z,B as _,v as Cl}from"../../chunks/vendor-hf-doc-builder.js";import{T as zt}from"../../chunks/Tip-hf-doc-builder.js";import{I as ss}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as ke}from"../../chunks/CodeBlock-hf-doc-builder.js";import{D as Rl}from"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function Xl(Q){let d,v,h,y,B,M,E,j,G;return{c(){d=a("p"),v=i("\u{1F4A1} We strongly recommend reading PyTorch\u2019s "),h=a("a"),y=i("statement about reproducibility"),B=i(":"),M=c(),E=a("blockquote"),j=a("p"),G=i("Completely reproducible results are not guaranteed across PyTorch releases, individual commits, or different platforms. Furthermore, results may not be reproducible between CPU and GPU executions, even when using identical seeds."),this.h()},l(b){d=n(b,"P",{});var w=r(d);v=o(w,"\u{1F4A1} We strongly recommend reading PyTorch\u2019s "),h=n(w,"A",{href:!0,rel:!0});var k=r(h);y=o(k,"statement about reproducibility"),k.forEach(s),B=o(w,":"),w.forEach(s),M=u(b),E=n(b,"BLOCKQUOTE",{});var f=r(E);j=n(f,"P",{});var C=r(j);G=o(C,"Completely reproducible results are not guaranteed across PyTorch releases, individual commits, or different platforms. Furthermore, results may not be reproducible between CPU and GPU executions, even when using identical seeds."),C.forEach(s),f.forEach(s),this.h()},h(){m(h,"href","https://pytorch.org/docs/stable/notes/randomness.html"),m(h,"rel","nofollow")},m(b,w){p(b,d,w),t(d,v),t(d,h),t(h,y),t(d,B),p(b,M,w),p(b,E,w),t(E,j),t(j,G)},d(b){b&&s(d),b&&s(M),b&&s(E)}}}function Sl(Q){let d,v,h,y,B,M,E,j,G,b,w;return{c(){d=a("p"),v=i("\u{1F4A1} It might be a bit unintuitive at first to pass "),h=a("code"),y=i("Generator"),B=i(` objects to the pipeline instead of | |
| just integer values representing the seed, but this is the recommended design when dealing with | |
| probabilistic models in PyTorch as `),M=a("code"),E=i("Generator"),j=i("\u2019s are "),G=a("em"),b=i("random states"),w=i(` that can be | |
| passed to multiple pipelines in a sequence.`)},l(k){d=n(k,"P",{});var f=r(d);v=o(f,"\u{1F4A1} It might be a bit unintuitive at first to pass "),h=n(f,"CODE",{});var C=r(h);y=o(C,"Generator"),C.forEach(s),B=o(f,` objects to the pipeline instead of | |
| just integer values representing the seed, but this is the recommended design when dealing with | |
| probabilistic models in PyTorch as `),M=n(f,"CODE",{});var R=r(M);E=o(R,"Generator"),R.forEach(s),j=o(f,"\u2019s are "),G=n(f,"EM",{});var ye=r(G);b=o(ye,"random states"),ye.forEach(s),w=o(f,` that can be | |
| passed to multiple pipelines in a sequence.`),f.forEach(s)},m(k,f){p(k,d,f),t(d,v),t(d,h),t(h,y),t(d,B),t(d,M),t(M,E),t(d,j),t(d,G),t(G,b),t(d,w)},d(k){k&&s(d)}}}function Fl(Q){let d,v;return{c(){d=a("p"),v=i(`\u{1F4A1} If reproducibility is important, we recommend always passing a CPU generator. | |
| The performance loss is often neglectable, and you\u2019ll generate much more similar | |
| values than if the pipeline had been run on a GPU.`)},l(h){d=n(h,"P",{});var y=r(d);v=o(y,`\u{1F4A1} If reproducibility is important, we recommend always passing a CPU generator. | |
| The performance loss is often neglectable, and you\u2019ll generate much more similar | |
| values than if the pipeline had been run on a GPU.`),y.forEach(s)},m(h,y){p(h,d,y),t(d,v)},d(h){h&&s(d)}}}function Nl(Q){let d,v,h,y,B,M,E,j,G,b,w,k,f,C,R,ye,Qs,ts,be,zs,ls,z,as,X,D,Ie,se,Ds,$e,Hs,ns,we,As,rs,H,xs,Me,qs,Ys,is,te,os,ve,Ls,ps,A,Ks,le,Pe,Os,et,cs,je,st,us,S,x,Ve,ae,tt,Ce,lt,ds,q,at,ne,Re,nt,rt,ms,re,hs,I,it,Xe,ot,pt,Se,ct,ut,fs,ge,dt,ys,Y,bs,F,L,Fe,ie,mt,Ne,ht,ws,Je,ft,Ms,oe,vs,Te,yt,js,W,bt,Qe,wt,Mt,ze,vt,jt,De,gt,Jt,He,Tt,Ut,gs,Ue,Zt,Js,pe,Ts,K,Us,O,_t,Ze,Et,Wt,Zs,N,ee,Ae,ce,Bt,xe,Gt,_s,_e,kt,Es,$,It,ue,qe,$t,Pt,Ye,Vt,Ct,Ws,P,Rt,Le,Xt,St,de,Ke,Ft,Nt,Bs,me,Gs,Ee,Qt,ks,he,Is;return M=new ss({}),w=new Rl({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/reproducibility.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/pytorch/reproducibility.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/en/tensorflow/reproducibility.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/reproducibility.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/pytorch/reproducibility.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/en/tensorflow/reproducibility.ipynb"}]}}),z=new zt({props:{$$slots:{default:[Xl]},$$scope:{ctx:Q}}}),se=new ss({}),te=new ke({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERESU1QaXBlbGluZSUwQWltcG9ydCUyMG51bXB5JTIwYXMlMjBucCUwQSUwQW1vZGVsX2lkJTIwJTNEJTIwJTIyZ29vZ2xlJTJGZGRwbS1jaWZhcjEwLTMyJTIyJTBBJTBBJTIzJTIwbG9hZCUyMG1vZGVsJTIwYW5kJTIwc2NoZWR1bGVyJTBBZGRpbSUyMCUzRCUyMERESU1QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlKSUwQSUwQSUyMyUyMHJ1biUyMHBpcGVsaW5lJTIwZm9yJTIwanVzdCUyMHR3byUyMHN0ZXBzJTIwYW5kJTIwcmV0dXJuJTIwbnVtcHklMjB0ZW5zb3IlMEFpbWFnZSUyMCUzRCUyMGRkaW0obnVtX2luZmVyZW5jZV9zdGVwcyUzRDIlMkMlMjBvdXRwdXRfdHlwZSUzRCUyMm5wJTIyKS5pbWFnZXMlMEFwcmludChucC5hYnMoaW1hZ2UpLnN1bSgpKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DDIMPipeline | |
| <span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np | |
| model_id = <span class="hljs-string">"google/ddpm-cifar10-32"</span> | |
| <span class="hljs-comment"># load model and scheduler</span> | |
| ddim = DDIMPipeline.from_pretrained(model_id, use_safetensors=<span class="hljs-literal">True</span>) | |
| <span class="hljs-comment"># run pipeline for just two steps and return numpy tensor</span> | |
| image = ddim(num_inference_steps=<span class="hljs-number">2</span>, output_type=<span class="hljs-string">"np"</span>).images | |
| <span class="hljs-built_in">print</span>(np.<span class="hljs-built_in">abs</span>(image).<span class="hljs-built_in">sum</span>())`}}),ae=new ss({}),re=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRERJTVBpcGVsaW5lJTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJnb29nbGUlMkZkZHBtLWNpZmFyMTAtMzIlMjIlMEElMEElMjMlMjBsb2FkJTIwbW9kZWwlMjBhbmQlMjBzY2hlZHVsZXIlMEFkZGltJTIwJTNEJTIwRERJTVBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUpJTBBJTBBJTIzJTIwY3JlYXRlJTIwYSUyMGdlbmVyYXRvciUyMGZvciUyMHJlcHJvZHVjaWJpbGl0eSUwQWdlbmVyYXRvciUyMCUzRCUyMHRvcmNoLkdlbmVyYXRvcihkZXZpY2UlM0QlMjJjcHUlMjIpLm1hbnVhbF9zZWVkKDApJTBBJTBBJTIzJTIwcnVuJTIwcGlwZWxpbmUlMjBmb3IlMjBqdXN0JTIwdHdvJTIwc3RlcHMlMjBhbmQlMjByZXR1cm4lMjBudW1weSUyMHRlbnNvciUwQWltYWdlJTIwJTNEJTIwZGRpbShudW1faW5mZXJlbmNlX3N0ZXBzJTNEMiUyQyUyMG91dHB1dF90eXBlJTNEJTIybnAlMjIlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IpLmltYWdlcyUwQXByaW50KG5wLmFicyhpbWFnZSkuc3VtKCkp",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DDIMPipeline | |
| <span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np | |
| model_id = <span class="hljs-string">"google/ddpm-cifar10-32"</span> | |
| <span class="hljs-comment"># load model and scheduler</span> | |
| ddim = DDIMPipeline.from_pretrained(model_id, use_safetensors=<span class="hljs-literal">True</span>) | |
| <span class="hljs-comment"># create a generator for reproducibility</span> | |
| generator = torch.Generator(device=<span class="hljs-string">"cpu"</span>).manual_seed(<span class="hljs-number">0</span>) | |
| <span class="hljs-comment"># run pipeline for just two steps and return numpy tensor</span> | |
| image = ddim(num_inference_steps=<span class="hljs-number">2</span>, output_type=<span class="hljs-string">"np"</span>, generator=generator).images | |
| <span class="hljs-built_in">print</span>(np.<span class="hljs-built_in">abs</span>(image).<span class="hljs-built_in">sum</span>())`}}),Y=new zt({props:{$$slots:{default:[Sl]},$$scope:{ctx:Q}}}),ie=new ss({}),oe=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRERJTVBpcGVsaW5lJTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJnb29nbGUlMkZkZHBtLWNpZmFyMTAtMzIlMjIlMEElMEElMjMlMjBsb2FkJTIwbW9kZWwlMjBhbmQlMjBzY2hlZHVsZXIlMEFkZGltJTIwJTNEJTIwRERJTVBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUpJTBBZGRpbS50byglMjJjdWRhJTIyKSUwQSUwQSUyMyUyMGNyZWF0ZSUyMGElMjBnZW5lcmF0b3IlMjBmb3IlMjByZXByb2R1Y2liaWxpdHklMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoZGV2aWNlJTNEJTIyY3VkYSUyMikubWFudWFsX3NlZWQoMCklMEElMEElMjMlMjBydW4lMjBwaXBlbGluZSUyMGZvciUyMGp1c3QlMjB0d28lMjBzdGVwcyUyMGFuZCUyMHJldHVybiUyMG51bXB5JTIwdGVuc29yJTBBaW1hZ2UlMjAlM0QlMjBkZGltKG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QyJTJDJTIwb3V0cHV0X3R5cGUlM0QlMjJucCUyMiUyQyUyMGdlbmVyYXRvciUzRGdlbmVyYXRvcikuaW1hZ2VzJTBBcHJpbnQobnAuYWJzKGltYWdlKS5zdW0oKSk=",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DDIMPipeline | |
| <span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np | |
| model_id = <span class="hljs-string">"google/ddpm-cifar10-32"</span> | |
| <span class="hljs-comment"># load model and scheduler</span> | |
| ddim = DDIMPipeline.from_pretrained(model_id, use_safetensors=<span class="hljs-literal">True</span>) | |
| ddim.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-comment"># create a generator for reproducibility</span> | |
| generator = torch.Generator(device=<span class="hljs-string">"cuda"</span>).manual_seed(<span class="hljs-number">0</span>) | |
| <span class="hljs-comment"># run pipeline for just two steps and return numpy tensor</span> | |
| image = ddim(num_inference_steps=<span class="hljs-number">2</span>, output_type=<span class="hljs-string">"np"</span>, generator=generator).images | |
| <span class="hljs-built_in">print</span>(np.<span class="hljs-built_in">abs</span>(image).<span class="hljs-built_in">sum</span>())`}}),pe=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRERJTVBpcGVsaW5lJTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJnb29nbGUlMkZkZHBtLWNpZmFyMTAtMzIlMjIlMEElMEElMjMlMjBsb2FkJTIwbW9kZWwlMjBhbmQlMjBzY2hlZHVsZXIlMEFkZGltJTIwJTNEJTIwRERJTVBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUpJTBBZGRpbS50byglMjJjdWRhJTIyKSUwQSUwQSUyMyUyMGNyZWF0ZSUyMGElMjBnZW5lcmF0b3IlMjBmb3IlMjByZXByb2R1Y2liaWxpdHklM0IlMjBub3RpY2UlMjB5b3UlMjBkb24ndCUyMHBsYWNlJTIwaXQlMjBvbiUyMHRoZSUyMEdQVSElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5tYW51YWxfc2VlZCgwKSUwQSUwQSUyMyUyMHJ1biUyMHBpcGVsaW5lJTIwZm9yJTIwanVzdCUyMHR3byUyMHN0ZXBzJTIwYW5kJTIwcmV0dXJuJTIwbnVtcHklMjB0ZW5zb3IlMEFpbWFnZSUyMCUzRCUyMGRkaW0obnVtX2luZmVyZW5jZV9zdGVwcyUzRDIlMkMlMjBvdXRwdXRfdHlwZSUzRCUyMm5wJTIyJTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yKS5pbWFnZXMlMEFwcmludChucC5hYnMoaW1hZ2UpLnN1bSgpKQ==",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DDIMPipeline | |
| <span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np | |
| model_id = <span class="hljs-string">"google/ddpm-cifar10-32"</span> | |
| <span class="hljs-comment"># load model and scheduler</span> | |
| ddim = DDIMPipeline.from_pretrained(model_id, use_safetensors=<span class="hljs-literal">True</span>) | |
| ddim.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-comment"># create a generator for reproducibility; notice you don't place it on the GPU!</span> | |
| generator = torch.manual_seed(<span class="hljs-number">0</span>) | |
| <span class="hljs-comment"># run pipeline for just two steps and return numpy tensor</span> | |
| image = ddim(num_inference_steps=<span class="hljs-number">2</span>, output_type=<span class="hljs-string">"np"</span>, generator=generator).images | |
| <span class="hljs-built_in">print</span>(np.<span class="hljs-built_in">abs</span>(image).<span class="hljs-built_in">sum</span>())`}}),K=new zt({props:{$$slots:{default:[Fl]},$$scope:{ctx:Q}}}),ce=new ss({}),me=new ke({props:{code:"aW1wb3J0JTIwb3MlMEElMEFvcy5lbnZpcm9uJTVCJTIyQ1VCTEFTX1dPUktTUEFDRV9DT05GSUclMjIlNUQlMjAlM0QlMjAlMjIlM0ExNiUzQTglMjIlMEElMEF0b3JjaC5iYWNrZW5kcy5jdWRubi5iZW5jaG1hcmslMjAlM0QlMjBGYWxzZSUwQXRvcmNoLnVzZV9kZXRlcm1pbmlzdGljX2FsZ29yaXRobXMoVHJ1ZSk=",highlighted:`<span class="hljs-keyword">import</span> os | |
| os.environ[<span class="hljs-string">"CUBLAS_WORKSPACE_CONFIG"</span>] = <span class="hljs-string">":16:8"</span> | |
| torch.backends.cudnn.benchmark = <span class="hljs-literal">False</span> | |
| torch.use_deterministic_algorithms(<span class="hljs-literal">True</span>)`}}),he=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRERJTVNjaGVkdWxlciUyQyUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUwQXBpcGUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlKS50byglMjJjdWRhJTIyKSUwQXBpcGUuc2NoZWR1bGVyJTIwJTNEJTIwRERJTVNjaGVkdWxlci5mcm9tX2NvbmZpZyhwaXBlLnNjaGVkdWxlci5jb25maWcpJTBBZyUyMCUzRCUyMHRvcmNoLkdlbmVyYXRvcihkZXZpY2UlM0QlMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkElMjBiZWFyJTIwaXMlMjBwbGF5aW5nJTIwYSUyMGd1aXRhciUyMG9uJTIwVGltZXMlMjBTcXVhcmUlMjIlMEElMEFnLm1hbnVhbF9zZWVkKDApJTBBcmVzdWx0MSUyMCUzRCUyMHBpcGUocHJvbXB0JTNEcHJvbXB0JTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDUwJTJDJTIwZ2VuZXJhdG9yJTNEZyUyQyUyMG91dHB1dF90eXBlJTNEJTIybGF0ZW50JTIyKS5pbWFnZXMlMEElMEFnLm1hbnVhbF9zZWVkKDApJTBBcmVzdWx0MiUyMCUzRCUyMHBpcGUocHJvbXB0JTNEcHJvbXB0JTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDUwJTJDJTIwZ2VuZXJhdG9yJTNEZyUyQyUyMG91dHB1dF90eXBlJTNEJTIybGF0ZW50JTIyKS5pbWFnZXMlMEElMEFwcmludCglMjJMX2luZiUyMGRpc3QlMjAlM0QlMjAlMjIlMkMlMjBhYnMocmVzdWx0MSUyMC0lMjByZXN1bHQyKS5tYXgoKSklMEElMjJMX2luZiUyMGRpc3QlMjAlM0QlMjAlMjB0ZW5zb3IoMC4lMkMlMjBkZXZpY2UlM0QnY3VkYSUzQTAnKSUyMg==",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DDIMScheduler, StableDiffusionPipeline | |
| <span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np | |
| model_id = <span class="hljs-string">"runwayml/stable-diffusion-v1-5"</span> | |
| pipe = StableDiffusionPipeline.from_pretrained(model_id, use_safetensors=<span class="hljs-literal">True</span>).to(<span class="hljs-string">"cuda"</span>) | |
| pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config) | |
| g = torch.Generator(device=<span class="hljs-string">"cuda"</span>) | |
| prompt = <span class="hljs-string">"A bear is playing a guitar on Times Square"</span> | |
| g.manual_seed(<span class="hljs-number">0</span>) | |
| result1 = pipe(prompt=prompt, num_inference_steps=<span class="hljs-number">50</span>, generator=g, output_type=<span class="hljs-string">"latent"</span>).images | |
| g.manual_seed(<span class="hljs-number">0</span>) | |
| result2 = pipe(prompt=prompt, num_inference_steps=<span class="hljs-number">50</span>, generator=g, output_type=<span class="hljs-string">"latent"</span>).images | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">"L_inf dist = "</span>, <span class="hljs-built_in">abs</span>(result1 - result2).<span class="hljs-built_in">max</span>()) | |
| <span class="hljs-string">"L_inf dist = tensor(0., device='cuda:0')"</span>`}}),{c(){d=a("meta"),v=c(),h=a("h1"),y=a("a"),B=a("span"),g(M.$$.fragment),E=c(),j=a("span"),G=i("Create reproducible pipelines"),b=c(),g(w.$$.fragment),k=c(),f=a("p"),C=i("Reproducibility is important for testing, replicating results, and can even be used to "),R=a("a"),ye=i("improve image quality"),Qs=i(". However, the randomness in diffusion models is a desired property because it allows the pipeline to generate different images every time it is run. While you can\u2019t expect to get the exact same results across platforms, you can expect results to be reproducible across releases and platforms within a certain tolerance range. Even then, tolerance varies depending on the diffusion pipeline and checkpoint."),ts=c(),be=a("p"),zs=i("This is why it\u2019s important to understand how to control sources of randomness in diffusion models or use deterministic algorithms."),ls=c(),g(z.$$.fragment),as=c(),X=a("h2"),D=a("a"),Ie=a("span"),g(se.$$.fragment),Ds=c(),$e=a("span"),Hs=i("Control randomness"),ns=c(),we=a("p"),As=i(`During inference, pipelines rely heavily on random sampling operations which include creating the | |
| Gaussian noise tensors to denoise and adding noise to the scheduling step.`),rs=c(),H=a("p"),xs=i("Take a look at the tensor values in the "),Me=a("a"),qs=i("DDIMPipeline"),Ys=i(" after two inference steps:"),is=c(),g(te.$$.fragment),os=c(),ve=a("p"),Ls=i("Running the code above prints one value, but if you run it again you get a different value. What is going on here?"),ps=c(),A=a("p"),Ks=i("Every time the pipeline is run, "),le=a("a"),Pe=a("code"),Os=i("torch.randn"),et=i(" uses a different random seed to create Gaussian noise which is denoised stepwise. This leads to a different result each time it is run, which is great for diffusion pipelines since it generates a different random image each time."),cs=c(),je=a("p"),st=i("But if you need to reliably generate the same image, that\u2019ll depend on whether you\u2019re running the pipeline on a CPU or GPU."),us=c(),S=a("h3"),x=a("a"),Ve=a("span"),g(ae.$$.fragment),tt=c(),Ce=a("span"),lt=i("CPU"),ds=c(),q=a("p"),at=i("To generate reproducible results on a CPU, you\u2019ll need to use a PyTorch "),ne=a("a"),Re=a("code"),nt=i("Generator"),rt=i(" and set a seed:"),ms=c(),g(re.$$.fragment),hs=c(),I=a("p"),it=i("Now when you run the code above, it always prints a value of "),Xe=a("code"),ot=i("1491.1711"),pt=i(" no matter what because the "),Se=a("code"),ct=i("Generator"),ut=i(" object with the seed is passed to all the random functions of the pipeline."),fs=c(),ge=a("p"),dt=i("If you run this code example on your specific hardware and PyTorch version, you should get a similar, if not the same, result."),ys=c(),g(Y.$$.fragment),bs=c(),F=a("h3"),L=a("a"),Fe=a("span"),g(ie.$$.fragment),mt=c(),Ne=a("span"),ht=i("GPU"),ws=c(),Je=a("p"),ft=i("Writing a reproducible pipeline on a GPU is a bit trickier, and full reproducibility across different hardware is not guaranteed because matrix multiplication - which diffusion pipelines require a lot of - is less deterministic on a GPU than a CPU. For example, if you run the same code example above on a GPU:"),Ms=c(),g(oe.$$.fragment),vs=c(),Te=a("p"),yt=i("The result is not the same even though you\u2019re using an identical seed because the GPU uses a different random number generator than the CPU."),js=c(),W=a("p"),bt=i("To circumvent this problem, \u{1F9E8} Diffusers has a "),Qe=a("code"),wt=i("randn_tensor()"),Mt=i(" function for creating random noise on the CPU, and then moving the tensor to a GPU if necessary. The "),ze=a("code"),vt=i("randn_tensor"),jt=i(" function is used everywhere inside the pipeline, allowing the user to "),De=a("strong"),gt=i("always"),Jt=i(" pass a CPU "),He=a("code"),Tt=i("Generator"),Ut=i(" even if the pipeline is run on a GPU."),gs=c(),Ue=a("p"),Zt=i("You\u2019ll see the results are much closer now!"),Js=c(),g(pe.$$.fragment),Ts=c(),g(K.$$.fragment),Us=c(),O=a("p"),_t=i("Finally, for more complex pipelines such as "),Ze=a("a"),Et=i("UnCLIPPipeline"),Wt=i(`, these are often extremely | |
| susceptible to precision error propagation. Don\u2019t expect similar results across | |
| different GPU hardware or PyTorch versions. In this case, you\u2019ll need to run | |
| exactly the same hardware and PyTorch version for full reproducibility.`),Zs=c(),N=a("h2"),ee=a("a"),Ae=a("span"),g(ce.$$.fragment),Bt=c(),xe=a("span"),Gt=i("Deterministic algorithms"),_s=c(),_e=a("p"),kt=i("You can also configure PyTorch to use deterministic algorithms to create a reproducible pipeline. However, you should be aware that deterministic algorithms may be slower than nondeterministic ones and you may observe a decrease in performance. But if reproducibility is important to you, then this is the way to go!"),Es=c(),$=a("p"),It=i("Nondeterministic behavior occurs when operations are launched in more than one CUDA stream. To avoid this, set the environment varibale "),ue=a("a"),qe=a("code"),$t=i("CUBLAS_WORKSPACE_CONFIG"),Pt=i(" to "),Ye=a("code"),Vt=i(":16:8"),Ct=i(" to only use one buffer size during runtime."),Ws=c(),P=a("p"),Rt=i("PyTorch typically benchmarks multiple algorithms to select the fastest one, but if you want reproducibility, you should disable this feature because the benchmark may select different algorithms each time. Lastly, pass "),Le=a("code"),Xt=i("True"),St=i(" to "),de=a("a"),Ke=a("code"),Ft=i("torch.use_deterministic_algorithms"),Nt=i(" to enable deterministic algorithms."),Bs=c(),g(me.$$.fragment),Gs=c(),Ee=a("p"),Qt=i("Now when you run the same pipeline twice, you\u2019ll get identical results."),ks=c(),g(he.$$.fragment),this.h()},l(e){const l=Vl('[data-svelte="svelte-1phssyn"]',document.head);d=n(l,"META",{name:!0,content:!0}),l.forEach(s),v=u(e),h=n(e,"H1",{class:!0});var fe=r(h);y=n(fe,"A",{id:!0,class:!0,href:!0});var Oe=r(y);B=n(Oe,"SPAN",{});var es=r(B);J(M.$$.fragment,es),es.forEach(s),Oe.forEach(s),E=u(fe),j=n(fe,"SPAN",{});var Dt=r(j);G=o(Dt,"Create reproducible pipelines"),Dt.forEach(s),fe.forEach(s),b=u(e),J(w.$$.fragment,e),k=u(e),f=n(e,"P",{});var $s=r(f);C=o($s,"Reproducibility is important for testing, replicating results, and can even be used to "),R=n($s,"A",{href:!0});var Ht=r(R);ye=o(Ht,"improve image quality"),Ht.forEach(s),Qs=o($s,". However, the randomness in diffusion models is a desired property because it allows the pipeline to generate different images every time it is run. While you can\u2019t expect to get the exact same results across platforms, you can expect results to be reproducible across releases and platforms within a certain tolerance range. Even then, tolerance varies depending on the diffusion pipeline and checkpoint."),$s.forEach(s),ts=u(e),be=n(e,"P",{});var At=r(be);zs=o(At,"This is why it\u2019s important to understand how to control sources of randomness in diffusion models or use deterministic algorithms."),At.forEach(s),ls=u(e),J(z.$$.fragment,e),as=u(e),X=n(e,"H2",{class:!0});var Ps=r(X);D=n(Ps,"A",{id:!0,class:!0,href:!0});var xt=r(D);Ie=n(xt,"SPAN",{});var qt=r(Ie);J(se.$$.fragment,qt),qt.forEach(s),xt.forEach(s),Ds=u(Ps),$e=n(Ps,"SPAN",{});var Yt=r($e);Hs=o(Yt,"Control randomness"),Yt.forEach(s),Ps.forEach(s),ns=u(e),we=n(e,"P",{});var Lt=r(we);As=o(Lt,`During inference, pipelines rely heavily on random sampling operations which include creating the | |
| Gaussian noise tensors to denoise and adding noise to the scheduling step.`),Lt.forEach(s),rs=u(e),H=n(e,"P",{});var Vs=r(H);xs=o(Vs,"Take a look at the tensor values in the "),Me=n(Vs,"A",{href:!0});var Kt=r(Me);qs=o(Kt,"DDIMPipeline"),Kt.forEach(s),Ys=o(Vs," after two inference steps:"),Vs.forEach(s),is=u(e),J(te.$$.fragment,e),os=u(e),ve=n(e,"P",{});var Ot=r(ve);Ls=o(Ot,"Running the code above prints one value, but if you run it again you get a different value. What is going on here?"),Ot.forEach(s),ps=u(e),A=n(e,"P",{});var Cs=r(A);Ks=o(Cs,"Every time the pipeline is run, "),le=n(Cs,"A",{href:!0,rel:!0});var el=r(le);Pe=n(el,"CODE",{});var sl=r(Pe);Os=o(sl,"torch.randn"),sl.forEach(s),el.forEach(s),et=o(Cs," uses a different random seed to create Gaussian noise which is denoised stepwise. This leads to a different result each time it is run, which is great for diffusion pipelines since it generates a different random image each time."),Cs.forEach(s),cs=u(e),je=n(e,"P",{});var tl=r(je);st=o(tl,"But if you need to reliably generate the same image, that\u2019ll depend on whether you\u2019re running the pipeline on a CPU or GPU."),tl.forEach(s),us=u(e),S=n(e,"H3",{class:!0});var Rs=r(S);x=n(Rs,"A",{id:!0,class:!0,href:!0});var ll=r(x);Ve=n(ll,"SPAN",{});var al=r(Ve);J(ae.$$.fragment,al),al.forEach(s),ll.forEach(s),tt=u(Rs),Ce=n(Rs,"SPAN",{});var nl=r(Ce);lt=o(nl,"CPU"),nl.forEach(s),Rs.forEach(s),ds=u(e),q=n(e,"P",{});var Xs=r(q);at=o(Xs,"To generate reproducible results on a CPU, you\u2019ll need to use a PyTorch "),ne=n(Xs,"A",{href:!0,rel:!0});var rl=r(ne);Re=n(rl,"CODE",{});var il=r(Re);nt=o(il,"Generator"),il.forEach(s),rl.forEach(s),rt=o(Xs," and set a seed:"),Xs.forEach(s),ms=u(e),J(re.$$.fragment,e),hs=u(e),I=n(e,"P",{});var We=r(I);it=o(We,"Now when you run the code above, it always prints a value of "),Xe=n(We,"CODE",{});var ol=r(Xe);ot=o(ol,"1491.1711"),ol.forEach(s),pt=o(We," no matter what because the "),Se=n(We,"CODE",{});var pl=r(Se);ct=o(pl,"Generator"),pl.forEach(s),ut=o(We," object with the seed is passed to all the random functions of the pipeline."),We.forEach(s),fs=u(e),ge=n(e,"P",{});var cl=r(ge);dt=o(cl,"If you run this code example on your specific hardware and PyTorch version, you should get a similar, if not the same, result."),cl.forEach(s),ys=u(e),J(Y.$$.fragment,e),bs=u(e),F=n(e,"H3",{class:!0});var Ss=r(F);L=n(Ss,"A",{id:!0,class:!0,href:!0});var ul=r(L);Fe=n(ul,"SPAN",{});var dl=r(Fe);J(ie.$$.fragment,dl),dl.forEach(s),ul.forEach(s),mt=u(Ss),Ne=n(Ss,"SPAN",{});var ml=r(Ne);ht=o(ml,"GPU"),ml.forEach(s),Ss.forEach(s),ws=u(e),Je=n(e,"P",{});var hl=r(Je);ft=o(hl,"Writing a reproducible pipeline on a GPU is a bit trickier, and full reproducibility across different hardware is not guaranteed because matrix multiplication - which diffusion pipelines require a lot of - is less deterministic on a GPU than a CPU. For example, if you run the same code example above on a GPU:"),hl.forEach(s),Ms=u(e),J(oe.$$.fragment,e),vs=u(e),Te=n(e,"P",{});var fl=r(Te);yt=o(fl,"The result is not the same even though you\u2019re using an identical seed because the GPU uses a different random number generator than the CPU."),fl.forEach(s),js=u(e),W=n(e,"P",{});var V=r(W);bt=o(V,"To circumvent this problem, \u{1F9E8} Diffusers has a "),Qe=n(V,"CODE",{});var yl=r(Qe);wt=o(yl,"randn_tensor()"),yl.forEach(s),Mt=o(V," function for creating random noise on the CPU, and then moving the tensor to a GPU if necessary. The "),ze=n(V,"CODE",{});var bl=r(ze);vt=o(bl,"randn_tensor"),bl.forEach(s),jt=o(V," function is used everywhere inside the pipeline, allowing the user to "),De=n(V,"STRONG",{});var wl=r(De);gt=o(wl,"always"),wl.forEach(s),Jt=o(V," pass a CPU "),He=n(V,"CODE",{});var Ml=r(He);Tt=o(Ml,"Generator"),Ml.forEach(s),Ut=o(V," even if the pipeline is run on a GPU."),V.forEach(s),gs=u(e),Ue=n(e,"P",{});var vl=r(Ue);Zt=o(vl,"You\u2019ll see the results are much closer now!"),vl.forEach(s),Js=u(e),J(pe.$$.fragment,e),Ts=u(e),J(K.$$.fragment,e),Us=u(e),O=n(e,"P",{});var Fs=r(O);_t=o(Fs,"Finally, for more complex pipelines such as "),Ze=n(Fs,"A",{href:!0});var jl=r(Ze);Et=o(jl,"UnCLIPPipeline"),jl.forEach(s),Wt=o(Fs,`, these are often extremely | |
| susceptible to precision error propagation. Don\u2019t expect similar results across | |
| different GPU hardware or PyTorch versions. In this case, you\u2019ll need to run | |
| exactly the same hardware and PyTorch version for full reproducibility.`),Fs.forEach(s),Zs=u(e),N=n(e,"H2",{class:!0});var Ns=r(N);ee=n(Ns,"A",{id:!0,class:!0,href:!0});var gl=r(ee);Ae=n(gl,"SPAN",{});var Jl=r(Ae);J(ce.$$.fragment,Jl),Jl.forEach(s),gl.forEach(s),Bt=u(Ns),xe=n(Ns,"SPAN",{});var Tl=r(xe);Gt=o(Tl,"Deterministic algorithms"),Tl.forEach(s),Ns.forEach(s),_s=u(e),_e=n(e,"P",{});var Ul=r(_e);kt=o(Ul,"You can also configure PyTorch to use deterministic algorithms to create a reproducible pipeline. However, you should be aware that deterministic algorithms may be slower than nondeterministic ones and you may observe a decrease in performance. But if reproducibility is important to you, then this is the way to go!"),Ul.forEach(s),Es=u(e),$=n(e,"P",{});var Be=r($);It=o(Be,"Nondeterministic behavior occurs when operations are launched in more than one CUDA stream. To avoid this, set the environment varibale "),ue=n(Be,"A",{href:!0,rel:!0});var Zl=r(ue);qe=n(Zl,"CODE",{});var _l=r(qe);$t=o(_l,"CUBLAS_WORKSPACE_CONFIG"),_l.forEach(s),Zl.forEach(s),Pt=o(Be," to "),Ye=n(Be,"CODE",{});var El=r(Ye);Vt=o(El,":16:8"),El.forEach(s),Ct=o(Be," to only use one buffer size during runtime."),Be.forEach(s),Ws=u(e),P=n(e,"P",{});var Ge=r(P);Rt=o(Ge,"PyTorch typically benchmarks multiple algorithms to select the fastest one, but if you want reproducibility, you should disable this feature because the benchmark may select different algorithms each time. Lastly, pass "),Le=n(Ge,"CODE",{});var Wl=r(Le);Xt=o(Wl,"True"),Wl.forEach(s),St=o(Ge," to "),de=n(Ge,"A",{href:!0,rel:!0});var Bl=r(de);Ke=n(Bl,"CODE",{});var Gl=r(Ke);Ft=o(Gl,"torch.use_deterministic_algorithms"),Gl.forEach(s),Bl.forEach(s),Nt=o(Ge," to enable deterministic algorithms."),Ge.forEach(s),Bs=u(e),J(me.$$.fragment,e),Gs=u(e),Ee=n(e,"P",{});var kl=r(Ee);Qt=o(kl,"Now when you run the same pipeline twice, you\u2019ll get identical results."),kl.forEach(s),ks=u(e),J(he.$$.fragment,e),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(Ql)),m(y,"id","create-reproducible-pipelines"),m(y,"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"),m(y,"href","#create-reproducible-pipelines"),m(h,"class","relative group"),m(R,"href","reusing_seeds"),m(D,"id","control-randomness"),m(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"),m(D,"href","#control-randomness"),m(X,"class","relative group"),m(Me,"href","/docs/diffusers/main/en/api/pipelines/ddim#diffusers.DDIMPipeline"),m(le,"href","https://pytorch.org/docs/stable/generated/torch.randn.html"),m(le,"rel","nofollow"),m(x,"id","cpu"),m(x,"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"),m(x,"href","#cpu"),m(S,"class","relative group"),m(ne,"href","https://pytorch.org/docs/stable/generated/torch.randn.html"),m(ne,"rel","nofollow"),m(L,"id","gpu"),m(L,"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"),m(L,"href","#gpu"),m(F,"class","relative group"),m(Ze,"href","/docs/diffusers/main/en/api/pipelines/unclip#diffusers.UnCLIPPipeline"),m(ee,"id","deterministic-algorithms"),m(ee,"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"),m(ee,"href","#deterministic-algorithms"),m(N,"class","relative group"),m(ue,"href","https://docs.nvidia.com/cuda/cublas/index.html#results-reproducibility"),m(ue,"rel","nofollow"),m(de,"href","https://pytorch.org/docs/stable/generated/torch.use_deterministic_algorithms.html"),m(de,"rel","nofollow")},m(e,l){t(document.head,d),p(e,v,l),p(e,h,l),t(h,y),t(y,B),T(M,B,null),t(h,E),t(h,j),t(j,G),p(e,b,l),T(w,e,l),p(e,k,l),p(e,f,l),t(f,C),t(f,R),t(R,ye),t(f,Qs),p(e,ts,l),p(e,be,l),t(be,zs),p(e,ls,l),T(z,e,l),p(e,as,l),p(e,X,l),t(X,D),t(D,Ie),T(se,Ie,null),t(X,Ds),t(X,$e),t($e,Hs),p(e,ns,l),p(e,we,l),t(we,As),p(e,rs,l),p(e,H,l),t(H,xs),t(H,Me),t(Me,qs),t(H,Ys),p(e,is,l),T(te,e,l),p(e,os,l),p(e,ve,l),t(ve,Ls),p(e,ps,l),p(e,A,l),t(A,Ks),t(A,le),t(le,Pe),t(Pe,Os),t(A,et),p(e,cs,l),p(e,je,l),t(je,st),p(e,us,l),p(e,S,l),t(S,x),t(x,Ve),T(ae,Ve,null),t(S,tt),t(S,Ce),t(Ce,lt),p(e,ds,l),p(e,q,l),t(q,at),t(q,ne),t(ne,Re),t(Re,nt),t(q,rt),p(e,ms,l),T(re,e,l),p(e,hs,l),p(e,I,l),t(I,it),t(I,Xe),t(Xe,ot),t(I,pt),t(I,Se),t(Se,ct),t(I,ut),p(e,fs,l),p(e,ge,l),t(ge,dt),p(e,ys,l),T(Y,e,l),p(e,bs,l),p(e,F,l),t(F,L),t(L,Fe),T(ie,Fe,null),t(F,mt),t(F,Ne),t(Ne,ht),p(e,ws,l),p(e,Je,l),t(Je,ft),p(e,Ms,l),T(oe,e,l),p(e,vs,l),p(e,Te,l),t(Te,yt),p(e,js,l),p(e,W,l),t(W,bt),t(W,Qe),t(Qe,wt),t(W,Mt),t(W,ze),t(ze,vt),t(W,jt),t(W,De),t(De,gt),t(W,Jt),t(W,He),t(He,Tt),t(W,Ut),p(e,gs,l),p(e,Ue,l),t(Ue,Zt),p(e,Js,l),T(pe,e,l),p(e,Ts,l),T(K,e,l),p(e,Us,l),p(e,O,l),t(O,_t),t(O,Ze),t(Ze,Et),t(O,Wt),p(e,Zs,l),p(e,N,l),t(N,ee),t(ee,Ae),T(ce,Ae,null),t(N,Bt),t(N,xe),t(xe,Gt),p(e,_s,l),p(e,_e,l),t(_e,kt),p(e,Es,l),p(e,$,l),t($,It),t($,ue),t(ue,qe),t(qe,$t),t($,Pt),t($,Ye),t(Ye,Vt),t($,Ct),p(e,Ws,l),p(e,P,l),t(P,Rt),t(P,Le),t(Le,Xt),t(P,St),t(P,de),t(de,Ke),t(Ke,Ft),t(P,Nt),p(e,Bs,l),T(me,e,l),p(e,Gs,l),p(e,Ee,l),t(Ee,Qt),p(e,ks,l),T(he,e,l),Is=!0},p(e,[l]){const fe={};l&2&&(fe.$$scope={dirty:l,ctx:e}),z.$set(fe);const Oe={};l&2&&(Oe.$$scope={dirty:l,ctx:e}),Y.$set(Oe);const es={};l&2&&(es.$$scope={dirty:l,ctx:e}),K.$set(es)},i(e){Is||(U(M.$$.fragment,e),U(w.$$.fragment,e),U(z.$$.fragment,e),U(se.$$.fragment,e),U(te.$$.fragment,e),U(ae.$$.fragment,e),U(re.$$.fragment,e),U(Y.$$.fragment,e),U(ie.$$.fragment,e),U(oe.$$.fragment,e),U(pe.$$.fragment,e),U(K.$$.fragment,e),U(ce.$$.fragment,e),U(me.$$.fragment,e),U(he.$$.fragment,e),Is=!0)},o(e){Z(M.$$.fragment,e),Z(w.$$.fragment,e),Z(z.$$.fragment,e),Z(se.$$.fragment,e),Z(te.$$.fragment,e),Z(ae.$$.fragment,e),Z(re.$$.fragment,e),Z(Y.$$.fragment,e),Z(ie.$$.fragment,e),Z(oe.$$.fragment,e),Z(pe.$$.fragment,e),Z(K.$$.fragment,e),Z(ce.$$.fragment,e),Z(me.$$.fragment,e),Z(he.$$.fragment,e),Is=!1},d(e){s(d),e&&s(v),e&&s(h),_(M),e&&s(b),_(w,e),e&&s(k),e&&s(f),e&&s(ts),e&&s(be),e&&s(ls),_(z,e),e&&s(as),e&&s(X),_(se),e&&s(ns),e&&s(we),e&&s(rs),e&&s(H),e&&s(is),_(te,e),e&&s(os),e&&s(ve),e&&s(ps),e&&s(A),e&&s(cs),e&&s(je),e&&s(us),e&&s(S),_(ae),e&&s(ds),e&&s(q),e&&s(ms),_(re,e),e&&s(hs),e&&s(I),e&&s(fs),e&&s(ge),e&&s(ys),_(Y,e),e&&s(bs),e&&s(F),_(ie),e&&s(ws),e&&s(Je),e&&s(Ms),_(oe,e),e&&s(vs),e&&s(Te),e&&s(js),e&&s(W),e&&s(gs),e&&s(Ue),e&&s(Js),_(pe,e),e&&s(Ts),_(K,e),e&&s(Us),e&&s(O),e&&s(Zs),e&&s(N),_(ce),e&&s(_s),e&&s(_e),e&&s(Es),e&&s($),e&&s(Ws),e&&s(P),e&&s(Bs),_(me,e),e&&s(Gs),e&&s(Ee),e&&s(ks),_(he,e)}}}const Ql={local:"create-reproducible-pipelines",sections:[{local:"control-randomness",sections:[{local:"cpu",title:"CPU"},{local:"gpu",title:"GPU"}],title:"Control randomness"},{local:"deterministic-algorithms",title:"Deterministic algorithms"}],title:"Create reproducible pipelines"};function zl(Q){return Cl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yl extends Il{constructor(d){super();$l(this,d,zl,Nl,Pl,{})}}export{Yl as default,Ql as metadata}; | |
Xet Storage Details
- Size:
- 35.1 kB
- Xet hash:
- 3b7306fa0d4fee04bba41e04ba3f0643cd3a4ba08f873d034fad10e4a2a0e8e1
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.