Buckets:
| import{S as Ft,i as Bt,s as Ht,e as a,k as f,w as k,t,M as Yt,c as s,d as o,m as h,a as i,x as S,h as n,b as c,G as e,g as E,y as T,q as D,o as N,B as j,v as qt,L as zt}from"../../chunks/vendor-hf-doc-builder.js";import{T as Qt}from"../../chunks/Tip-hf-doc-builder.js";import{D as be}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Xt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Vt}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Kt}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function en(ie){let l,$,g,m,b,d,y,A;return{c(){l=a("p"),$=t("To use private or "),g=a("a"),m=t("gated"),b=t(" models, log-in with "),d=a("code"),y=t("huggingface-cli login"),A=t("."),this.h()},l(R){l=s(R,"P",{});var w=i(l);$=n(w,"To use private or "),g=s(w,"A",{href:!0,rel:!0});var v=i(g);m=n(v,"gated"),v.forEach(o),b=n(w," models, log-in with "),d=s(w,"CODE",{});var de=i(d);y=n(de,"huggingface-cli login"),de.forEach(o),A=n(w,"."),w.forEach(o),this.h()},h(){c(g,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),c(g,"rel","nofollow")},m(R,w){E(R,l,w),e(l,$),e(l,g),e(g,m),e(l,b),e(l,d),e(d,y),e(l,A)},d(R){R&&o(l)}}}function on(ie){let l,$,g,m,b;return m=new Xt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEREUE1TY2hlZHVsZXIlMkMlMjBERElNU2NoZWR1bGVyJTJDJTIwUE5ETVNjaGVkdWxlciUwQSUwQSUyMyUyMERvd25sb2FkJTIwc2NoZWR1bGVyJTIwZnJvbSUyMGh1Z2dpbmdmYWNlLmNvJTIwYW5kJTIwY2FjaGUuJTBBc2NoZWR1bGVyJTIwJTNEJTIwRERQTVNjaGVkdWxlci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZGRwbS1jaWZhcjEwLTMyJTIyKSUwQSUwQSUyMyUyMEluc3RhbnRpYXRlJTIwRERJTSUyMHNjaGVkdWxlciUyMGNsYXNzJTIwd2l0aCUyMHNhbWUlMjBjb25maWclMjBhcyUyMEREUE0lMEFzY2hlZHVsZXIlMjAlM0QlMjBERElNU2NoZWR1bGVyLmZyb21fY29uZmlnKHNjaGVkdWxlci5jb25maWcpJTBBJTBBJTIzJTIwSW5zdGFudGlhdGUlMjBQTkRNJTIwc2NoZWR1bGVyJTIwY2xhc3MlMjB3aXRoJTIwc2FtZSUyMGNvbmZpZyUyMGFzJTIwRERQTSUwQXNjaGVkdWxlciUyMCUzRCUyMFBORE1TY2hlZHVsZXIuZnJvbV9jb25maWcoc2NoZWR1bGVyLmNvbmZpZyk=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DDPMScheduler, DDIMScheduler, PNDMScheduler | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Download scheduler from huggingface.co and cache.</span> | |
| <span class="hljs-meta">>>> </span>scheduler = DDPMScheduler.from_pretrained(<span class="hljs-string">"google/ddpm-cifar10-32"</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Instantiate DDIM scheduler class with same config as DDPM</span> | |
| <span class="hljs-meta">>>> </span>scheduler = DDIMScheduler.from_config(scheduler.config) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Instantiate PNDM scheduler class with same config as DDPM</span> | |
| <span class="hljs-meta">>>> </span>scheduler = PNDMScheduler.from_config(scheduler.config)`}}),{c(){l=a("p"),$=t("Examples:"),g=f(),k(m.$$.fragment)},l(d){l=s(d,"P",{});var y=i(l);$=n(y,"Examples:"),y.forEach(o),g=h(d),S(m.$$.fragment,d)},m(d,y){E(d,l,y),e(l,$),E(d,g,y),T(m,d,y),b=!0},p:zt,i(d){b||(D(m.$$.fragment,d),b=!0)},o(d){N(m.$$.fragment,d),b=!1},d(d){d&&o(l),d&&o(g),j(m,d)}}}function tn(ie){let l,$,g,m,b,d,y,A,R,w,v,de,le,Xe,Ke,ce,eo,oo,fe,to,no,ye,ro,ao,Oe,G,Ve,L,O,we,X,so,xe,io,Fe,u,K,lo,x,co,$e,fo,ho,he,uo,go,ue,mo,po,ge,_o,vo,bo,Me,yo,wo,C,I,Ee,xo,$o,Ce,Mo,Eo,me,Co,ko,So,V,ke,To,Do,Se,No,jo,Io,F,Te,Jo,Po,De,Uo,Ao,Ro,M,Ne,Lo,Wo,je,Zo,Go,Ie,Oo,Vo,Je,Fo,Bo,Ho,B,ee,Yo,Pe,qo,zo,J,oe,Qo,Ue,Xo,Ko,H,et,Y,te,ot,W,tt,Ae,nt,rt,pe,at,st,it,q,ne,dt,Re,lt,ct,z,re,ft,Le,ht,Be;return d=new Vt({}),G=new Qt({props:{$$slots:{default:[en]},$$scope:{ctx:ie}}}),X=new Vt({}),K=new be({props:{name:"class diffusers.ConfigMixin",anchor:"diffusers.ConfigMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/configuration_utils.py#L82"}}),ee=new be({props:{name:"load_config",anchor:"diffusers.ConfigMixin.load_config",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"return_unused_kwargs",val:" = False"},{name:"return_commit_hash",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.ConfigMixin.load_config.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) — | |
| Can be either:</p> | |
| <ul> | |
| <li>A string, the <em>model id</em> (for example <code>google/ddpm-celebahq-256</code>) of a pretrained model hosted on | |
| the Hub.</li> | |
| <li>A path to a <em>directory</em> (for example <code>./my_model_directory</code>) containing model weights saved with | |
| <a href="/docs/diffusers/main/en/api/configuration#diffusers.ConfigMixin.save_config">save_config()</a>.</li> | |
| </ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.ConfigMixin.load_config.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) — | |
| Path to a directory where a downloaded pretrained model configuration is cached if the standard cache | |
| is not used.`,name:"cache_dir"},{anchor:"diffusers.ConfigMixin.load_config.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether or not to force the (re-)download of the model weights and configuration files, overriding the | |
| cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.ConfigMixin.load_config.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any | |
| incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.ConfigMixin.load_config.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) — | |
| A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.ConfigMixin.load_config.output_loading_info(bool,",description:`<strong>output_loading_info(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) — | |
| Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.`,name:"output_loading_info(bool,"},{anchor:"diffusers.ConfigMixin.load_config.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model | |
| won’t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.ConfigMixin.load_config.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) — | |
| The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from | |
| <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.ConfigMixin.load_config.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"main"</code>) — | |
| The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier | |
| allowed by Git.`,name:"revision"},{anchor:"diffusers.ConfigMixin.load_config.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>""</code>) — | |
| The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.ConfigMixin.load_config.return_unused_kwargs",description:"<strong>return_unused_kwargs</strong> (<code>bool</code>, <em>optional</em>, defaults to `False) —\nWhether unused keyword arguments of the config are returned.",name:"return_unused_kwargs"},{anchor:"diffusers.ConfigMixin.load_config.return_commit_hash",description:"<strong>return_commit_hash</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False) -- Whether the </code>commit_hash` of the loaded configuration are returned.",name:"return_commit_hash"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/configuration_utils.py#L276",returnDescription:` | |
| <p>A dictionary of all the parameters stored in a JSON configuration file.</p> | |
| `,returnType:` | |
| <p><code>dict</code></p> | |
| `}}),oe=new be({props:{name:"from_config",anchor:"diffusers.ConfigMixin.from_config",parameters:[{name:"config",val:": typing.Union[diffusers.configuration_utils.FrozenDict, typing.Dict[str, typing.Any]] = None"},{name:"return_unused_kwargs",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.ConfigMixin.from_config.config",description:`<strong>config</strong> (<code>Dict[str, Any]</code>) — | |
| A config dictionary from which the Python class is instantiated. Make sure to only load configuration | |
| files of compatible classes.`,name:"config"},{anchor:"diffusers.ConfigMixin.from_config.return_unused_kwargs",description:`<strong>return_unused_kwargs</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether kwargs that are not consumed by the Python class should be returned or not.`,name:"return_unused_kwargs"},{anchor:"diffusers.ConfigMixin.from_config.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) — | |
| Can be used to update the configuration object (after it is loaded) and initiate the Python class. | |
| <code>**kwargs</code> are passed directly to the underlying scheduler/model’s <code>__init__</code> method and eventually | |
| overwrite the same named arguments in <code>config</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/configuration_utils.py#L181",returnDescription:` | |
| <p>A model or scheduler object instantiated from a config dictionary.</p> | |
| `,returnType:` | |
| <p><a | |
| href="/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin" | |
| >ModelMixin</a> or <a | |
| href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin" | |
| >SchedulerMixin</a></p> | |
| `}}),H=new Kt({props:{anchor:"diffusers.ConfigMixin.from_config.example",$$slots:{default:[on]},$$scope:{ctx:ie}}}),te=new be({props:{name:"save_config",anchor:"diffusers.ConfigMixin.save_config",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.ConfigMixin.save_config.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) — | |
| Directory where the configuration JSON file is saved (will be created if it does not exist).`,name:"save_directory"},{anchor:"diffusers.ConfigMixin.save_config.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether or not to push your model to the Hugging Face Hub after saving it. You can specify the | |
| repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your | |
| namespace).`,name:"push_to_hub"},{anchor:"diffusers.ConfigMixin.save_config.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) — | |
| Additional keyword arguments passed along to the <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/configuration_utils.py#L139"}}),ne=new be({props:{name:"to_json_file",anchor:"diffusers.ConfigMixin.to_json_file",parameters:[{name:"json_file_path",val:": typing.Union[str, os.PathLike]"}],parametersDescription:[{anchor:"diffusers.ConfigMixin.to_json_file.json_file_path",description:`<strong>json_file_path</strong> (<code>str</code> or <code>os.PathLike</code>) — | |
| Path to the JSON file to save a configuration instance’s parameters.`,name:"json_file_path"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/configuration_utils.py#L579"}}),re=new be({props:{name:"to_json_string",anchor:"diffusers.ConfigMixin.to_json_string",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/configuration_utils.py#L553",returnDescription:` | |
| <p>String containing all the attributes that make up the configuration instance in JSON format.</p> | |
| `,returnType:` | |
| <p><code>str</code></p> | |
| `}}),{c(){l=a("meta"),$=f(),g=a("h1"),m=a("a"),b=a("span"),k(d.$$.fragment),y=f(),A=a("span"),R=t("Configuration"),w=f(),v=a("p"),de=t("Schedulers from "),le=a("a"),Xe=t("SchedulerMixin"),Ke=t(" and models from "),ce=a("a"),eo=t("ModelMixin"),oo=t(" inherit from "),fe=a("a"),to=t("ConfigMixin"),no=t(" which stores all the parameters that are passed to their respective "),ye=a("code"),ro=t("__init__"),ao=t(" methods in a JSON-configuration file."),Oe=f(),k(G.$$.fragment),Ve=f(),L=a("h2"),O=a("a"),we=a("span"),k(X.$$.fragment),so=f(),xe=a("span"),io=t("ConfigMixin"),Fe=f(),u=a("div"),k(K.$$.fragment),lo=f(),x=a("p"),co=t("Base class for all configuration classes. All configuration parameters are stored under "),$e=a("code"),fo=t("self.config"),ho=t(`. Also | |
| provides the `),he=a("a"),uo=t("from_config()"),go=t(" and "),ue=a("a"),mo=t("save_config()"),po=t(` methods for loading, downloading, and | |
| saving classes that inherit from `),ge=a("a"),_o=t("ConfigMixin"),vo=t("."),bo=f(),Me=a("p"),yo=t("Class attributes:"),wo=f(),C=a("ul"),I=a("li"),Ee=a("strong"),xo=t("config_name"),$o=t(" ("),Ce=a("code"),Mo=t("str"),Eo=t(`) \u2014 A filename under which the config should stored when calling | |
| `),me=a("a"),Co=t("save_config()"),ko=t(" (should be overridden by parent class)."),So=f(),V=a("li"),ke=a("strong"),To=t("ignore_for_config"),Do=t(" ("),Se=a("code"),No=t("List[str]"),jo=t(`) \u2014 A list of attributes that should not be saved in the config (should be | |
| overridden by subclass).`),Io=f(),F=a("li"),Te=a("strong"),Jo=t("has_compatibles"),Po=t(" ("),De=a("code"),Uo=t("bool"),Ao=t(") \u2014 Whether the class has compatible classes (should be overridden by subclass)."),Ro=f(),M=a("li"),Ne=a("strong"),Lo=t("_deprecated_kwargs"),Wo=t(" ("),je=a("code"),Zo=t("List[str]"),Go=t(") \u2014 Keyword arguments that are deprecated. Note that the "),Ie=a("code"),Oo=t("init"),Vo=t(` function | |
| should only have a `),Je=a("code"),Fo=t("kwargs"),Bo=t(` argument if at least one argument is deprecated (should be overridden by | |
| subclass).`),Ho=f(),B=a("div"),k(ee.$$.fragment),Yo=f(),Pe=a("p"),qo=t("Load a model or scheduler configuration."),zo=f(),J=a("div"),k(oe.$$.fragment),Qo=f(),Ue=a("p"),Xo=t("Instantiate a Python class from a config dictionary."),Ko=f(),k(H.$$.fragment),et=f(),Y=a("div"),k(te.$$.fragment),ot=f(),W=a("p"),tt=t("Save a configuration object to the directory specified in "),Ae=a("code"),nt=t("save_directory"),rt=t(` so that it can be reloaded using the | |
| `),pe=a("a"),at=t("from_config()"),st=t(" class method."),it=f(),q=a("div"),k(ne.$$.fragment),dt=f(),Re=a("p"),lt=t("Save the configuration instance\u2019s parameters to a JSON file."),ct=f(),z=a("div"),k(re.$$.fragment),ft=f(),Le=a("p"),ht=t("Serializes the configuration instance to a JSON string."),this.h()},l(r){const p=Yt('[data-svelte="svelte-1phssyn"]',document.head);l=s(p,"META",{name:!0,content:!0}),p.forEach(o),$=h(r),g=s(r,"H1",{class:!0});var ae=i(g);m=s(ae,"A",{id:!0,class:!0,href:!0});var We=i(m);b=s(We,"SPAN",{});var ut=i(b);S(d.$$.fragment,ut),ut.forEach(o),We.forEach(o),y=h(ae),A=s(ae,"SPAN",{});var gt=i(A);R=n(gt,"Configuration"),gt.forEach(o),ae.forEach(o),w=h(r),v=s(r,"P",{});var P=i(v);de=n(P,"Schedulers from "),le=s(P,"A",{href:!0});var mt=i(le);Xe=n(mt,"SchedulerMixin"),mt.forEach(o),Ke=n(P," and models from "),ce=s(P,"A",{href:!0});var pt=i(ce);eo=n(pt,"ModelMixin"),pt.forEach(o),oo=n(P," inherit from "),fe=s(P,"A",{href:!0});var _t=i(fe);to=n(_t,"ConfigMixin"),_t.forEach(o),no=n(P," which stores all the parameters that are passed to their respective "),ye=s(P,"CODE",{});var vt=i(ye);ro=n(vt,"__init__"),vt.forEach(o),ao=n(P," methods in a JSON-configuration file."),P.forEach(o),Oe=h(r),S(G.$$.fragment,r),Ve=h(r),L=s(r,"H2",{class:!0});var He=i(L);O=s(He,"A",{id:!0,class:!0,href:!0});var bt=i(O);we=s(bt,"SPAN",{});var yt=i(we);S(X.$$.fragment,yt),yt.forEach(o),bt.forEach(o),so=h(He),xe=s(He,"SPAN",{});var wt=i(xe);io=n(wt,"ConfigMixin"),wt.forEach(o),He.forEach(o),Fe=h(r),u=s(r,"DIV",{class:!0});var _=i(u);S(K.$$.fragment,_),lo=h(_),x=s(_,"P",{});var U=i(x);co=n(U,"Base class for all configuration classes. All configuration parameters are stored under "),$e=s(U,"CODE",{});var xt=i($e);fo=n(xt,"self.config"),xt.forEach(o),ho=n(U,`. Also | |
| provides the `),he=s(U,"A",{href:!0});var $t=i(he);uo=n($t,"from_config()"),$t.forEach(o),go=n(U," and "),ue=s(U,"A",{href:!0});var Mt=i(ue);mo=n(Mt,"save_config()"),Mt.forEach(o),po=n(U,` methods for loading, downloading, and | |
| saving classes that inherit from `),ge=s(U,"A",{href:!0});var Et=i(ge);_o=n(Et,"ConfigMixin"),Et.forEach(o),vo=n(U,"."),U.forEach(o),bo=h(_),Me=s(_,"P",{});var Ct=i(Me);yo=n(Ct,"Class attributes:"),Ct.forEach(o),wo=h(_),C=s(_,"UL",{});var Q=i(C);I=s(Q,"LI",{});var se=i(I);Ee=s(se,"STRONG",{});var kt=i(Ee);xo=n(kt,"config_name"),kt.forEach(o),$o=n(se," ("),Ce=s(se,"CODE",{});var St=i(Ce);Mo=n(St,"str"),St.forEach(o),Eo=n(se,`) \u2014 A filename under which the config should stored when calling | |
| `),me=s(se,"A",{href:!0});var Tt=i(me);Co=n(Tt,"save_config()"),Tt.forEach(o),ko=n(se," (should be overridden by parent class)."),se.forEach(o),So=h(Q),V=s(Q,"LI",{});var Ze=i(V);ke=s(Ze,"STRONG",{});var Dt=i(ke);To=n(Dt,"ignore_for_config"),Dt.forEach(o),Do=n(Ze," ("),Se=s(Ze,"CODE",{});var Nt=i(Se);No=n(Nt,"List[str]"),Nt.forEach(o),jo=n(Ze,`) \u2014 A list of attributes that should not be saved in the config (should be | |
| overridden by subclass).`),Ze.forEach(o),Io=h(Q),F=s(Q,"LI",{});var Ge=i(F);Te=s(Ge,"STRONG",{});var jt=i(Te);Jo=n(jt,"has_compatibles"),jt.forEach(o),Po=n(Ge," ("),De=s(Ge,"CODE",{});var It=i(De);Uo=n(It,"bool"),It.forEach(o),Ao=n(Ge,") \u2014 Whether the class has compatible classes (should be overridden by subclass)."),Ge.forEach(o),Ro=h(Q),M=s(Q,"LI",{});var Z=i(M);Ne=s(Z,"STRONG",{});var Jt=i(Ne);Lo=n(Jt,"_deprecated_kwargs"),Jt.forEach(o),Wo=n(Z," ("),je=s(Z,"CODE",{});var Pt=i(je);Zo=n(Pt,"List[str]"),Pt.forEach(o),Go=n(Z,") \u2014 Keyword arguments that are deprecated. Note that the "),Ie=s(Z,"CODE",{});var Ut=i(Ie);Oo=n(Ut,"init"),Ut.forEach(o),Vo=n(Z,` function | |
| should only have a `),Je=s(Z,"CODE",{});var At=i(Je);Fo=n(At,"kwargs"),At.forEach(o),Bo=n(Z,` argument if at least one argument is deprecated (should be overridden by | |
| subclass).`),Z.forEach(o),Q.forEach(o),Ho=h(_),B=s(_,"DIV",{class:!0});var Ye=i(B);S(ee.$$.fragment,Ye),Yo=h(Ye),Pe=s(Ye,"P",{});var Rt=i(Pe);qo=n(Rt,"Load a model or scheduler configuration."),Rt.forEach(o),Ye.forEach(o),zo=h(_),J=s(_,"DIV",{class:!0});var _e=i(J);S(oe.$$.fragment,_e),Qo=h(_e),Ue=s(_e,"P",{});var Lt=i(Ue);Xo=n(Lt,"Instantiate a Python class from a config dictionary."),Lt.forEach(o),Ko=h(_e),S(H.$$.fragment,_e),_e.forEach(o),et=h(_),Y=s(_,"DIV",{class:!0});var qe=i(Y);S(te.$$.fragment,qe),ot=h(qe),W=s(qe,"P",{});var ve=i(W);tt=n(ve,"Save a configuration object to the directory specified in "),Ae=s(ve,"CODE",{});var Wt=i(Ae);nt=n(Wt,"save_directory"),Wt.forEach(o),rt=n(ve,` so that it can be reloaded using the | |
| `),pe=s(ve,"A",{href:!0});var Zt=i(pe);at=n(Zt,"from_config()"),Zt.forEach(o),st=n(ve," class method."),ve.forEach(o),qe.forEach(o),it=h(_),q=s(_,"DIV",{class:!0});var ze=i(q);S(ne.$$.fragment,ze),dt=h(ze),Re=s(ze,"P",{});var Gt=i(Re);lt=n(Gt,"Save the configuration instance\u2019s parameters to a JSON file."),Gt.forEach(o),ze.forEach(o),ct=h(_),z=s(_,"DIV",{class:!0});var Qe=i(z);S(re.$$.fragment,Qe),ft=h(Qe),Le=s(Qe,"P",{});var Ot=i(Le);ht=n(Ot,"Serializes the configuration instance to a JSON string."),Ot.forEach(o),Qe.forEach(o),_.forEach(o),this.h()},h(){c(l,"name","hf:doc:metadata"),c(l,"content",JSON.stringify(nn)),c(m,"id","configuration"),c(m,"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"),c(m,"href","#configuration"),c(g,"class","relative group"),c(le,"href","/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin"),c(ce,"href","/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin"),c(fe,"href","/docs/diffusers/main/en/api/configuration#diffusers.ConfigMixin"),c(O,"id","diffusers.ConfigMixin"),c(O,"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"),c(O,"href","#diffusers.ConfigMixin"),c(L,"class","relative group"),c(he,"href","/docs/diffusers/main/en/api/configuration#diffusers.ConfigMixin.from_config"),c(ue,"href","/docs/diffusers/main/en/api/configuration#diffusers.ConfigMixin.save_config"),c(ge,"href","/docs/diffusers/main/en/api/configuration#diffusers.ConfigMixin"),c(me,"href","/docs/diffusers/main/en/api/configuration#diffusers.ConfigMixin.save_config"),c(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(pe,"href","/docs/diffusers/main/en/api/configuration#diffusers.ConfigMixin.from_config"),c(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(u,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(r,p){e(document.head,l),E(r,$,p),E(r,g,p),e(g,m),e(m,b),T(d,b,null),e(g,y),e(g,A),e(A,R),E(r,w,p),E(r,v,p),e(v,de),e(v,le),e(le,Xe),e(v,Ke),e(v,ce),e(ce,eo),e(v,oo),e(v,fe),e(fe,to),e(v,no),e(v,ye),e(ye,ro),e(v,ao),E(r,Oe,p),T(G,r,p),E(r,Ve,p),E(r,L,p),e(L,O),e(O,we),T(X,we,null),e(L,so),e(L,xe),e(xe,io),E(r,Fe,p),E(r,u,p),T(K,u,null),e(u,lo),e(u,x),e(x,co),e(x,$e),e($e,fo),e(x,ho),e(x,he),e(he,uo),e(x,go),e(x,ue),e(ue,mo),e(x,po),e(x,ge),e(ge,_o),e(x,vo),e(u,bo),e(u,Me),e(Me,yo),e(u,wo),e(u,C),e(C,I),e(I,Ee),e(Ee,xo),e(I,$o),e(I,Ce),e(Ce,Mo),e(I,Eo),e(I,me),e(me,Co),e(I,ko),e(C,So),e(C,V),e(V,ke),e(ke,To),e(V,Do),e(V,Se),e(Se,No),e(V,jo),e(C,Io),e(C,F),e(F,Te),e(Te,Jo),e(F,Po),e(F,De),e(De,Uo),e(F,Ao),e(C,Ro),e(C,M),e(M,Ne),e(Ne,Lo),e(M,Wo),e(M,je),e(je,Zo),e(M,Go),e(M,Ie),e(Ie,Oo),e(M,Vo),e(M,Je),e(Je,Fo),e(M,Bo),e(u,Ho),e(u,B),T(ee,B,null),e(B,Yo),e(B,Pe),e(Pe,qo),e(u,zo),e(u,J),T(oe,J,null),e(J,Qo),e(J,Ue),e(Ue,Xo),e(J,Ko),T(H,J,null),e(u,et),e(u,Y),T(te,Y,null),e(Y,ot),e(Y,W),e(W,tt),e(W,Ae),e(Ae,nt),e(W,rt),e(W,pe),e(pe,at),e(W,st),e(u,it),e(u,q),T(ne,q,null),e(q,dt),e(q,Re),e(Re,lt),e(u,ct),e(u,z),T(re,z,null),e(z,ft),e(z,Le),e(Le,ht),Be=!0},p(r,[p]){const ae={};p&2&&(ae.$$scope={dirty:p,ctx:r}),G.$set(ae);const We={};p&2&&(We.$$scope={dirty:p,ctx:r}),H.$set(We)},i(r){Be||(D(d.$$.fragment,r),D(G.$$.fragment,r),D(X.$$.fragment,r),D(K.$$.fragment,r),D(ee.$$.fragment,r),D(oe.$$.fragment,r),D(H.$$.fragment,r),D(te.$$.fragment,r),D(ne.$$.fragment,r),D(re.$$.fragment,r),Be=!0)},o(r){N(d.$$.fragment,r),N(G.$$.fragment,r),N(X.$$.fragment,r),N(K.$$.fragment,r),N(ee.$$.fragment,r),N(oe.$$.fragment,r),N(H.$$.fragment,r),N(te.$$.fragment,r),N(ne.$$.fragment,r),N(re.$$.fragment,r),Be=!1},d(r){o(l),r&&o($),r&&o(g),j(d),r&&o(w),r&&o(v),r&&o(Oe),j(G,r),r&&o(Ve),r&&o(L),j(X),r&&o(Fe),r&&o(u),j(K),j(ee),j(oe),j(H),j(te),j(ne),j(re)}}}const nn={local:"configuration",sections:[{local:"diffusers.ConfigMixin",title:"ConfigMixin"}],title:"Configuration"};function rn(ie){return qt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class hn extends Ft{constructor(l){super();Bt(this,l,rn,tn,Ht,{})}}export{hn as default,nn as metadata}; | |
Xet Storage Details
- Size:
- 24.5 kB
- Xet hash:
- b1a2aca7dd44b6399a586bfb62836b3ecbf422f1d5a2cefcf6ffb0ec558122b0
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.