Buckets:
| import{s as Ce,n as Le,o as Oe}from"../chunks/scheduler.8c3d61f6.js";import{S as Pe,i as qe,g as o,s as n,r as f,A as ke,h as a,f as r,c as i,j as F,u as m,x as p,k as E,y as t,a as d,v as g,d as _,t as v,w as b}from"../chunks/index.da70eac4.js";import{D as G}from"../chunks/Docstring.6b390b9a.js";import{H as Te,E as He}from"../chunks/EditOnGithub.1e64e623.js";function Ie(be){let h,K,R,B,S,J,M,xe='<code>FlowMatchEulerDiscreteScheduler</code> is based on the flow-matching sampling introduced in <a href="https://arxiv.org/abs/2403.03206" rel="nofollow">Stable Diffusion 3</a>.',Q,y,Y,s,T,oe,H,we="Euler scheduler.",ae,I,$e=`This model inherits from <a href="/docs/diffusers/pr_10567/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a> and <a href="/docs/diffusers/pr_10567/en/api/configuration#diffusers.ConfigMixin">ConfigMixin</a>. Check the superclass documentation for the generic | |
| methods the library implements for all schedulers such as loading and saving.`,le,x,C,ce,V,De="Forward process in flow-matching",de,w,L,ue,N,Fe="Sets the begin index for the scheduler. This function should be run from pipeline before the inference.",he,$,O,fe,z,Ee="Sets the discrete timesteps used for the diffusion chain (to be run before inference).",me,D,P,pe,A,Se=`Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion | |
| process from the learned model outputs (most often the predicted noise).`,ge,u,q,_e,W,Me=`Stretches and shifts the timestep schedule to ensure it terminates at the configured <code>shift_terminal</code> config | |
| value.`,ve,j,ye=`Reference: | |
| <a href="https://github.com/Lightricks/LTX-Video/blob/a01a171f8fe3d99dce2728d60a73fecf4d4238ae/ltx_video/schedulers/rf.py#L51" rel="nofollow">https://github.com/Lightricks/LTX-Video/blob/a01a171f8fe3d99dce2728d60a73fecf4d4238ae/ltx_video/schedulers/rf.py#L51</a>`,Z,k,ee,X,te;return S=new Te({props:{title:"FlowMatchEulerDiscreteScheduler",local:"flowmatcheulerdiscretescheduler",headingTag:"h1"}}),y=new Te({props:{title:"FlowMatchEulerDiscreteScheduler",local:"diffusers.FlowMatchEulerDiscreteScheduler",headingTag:"h2"}}),T=new G({props:{name:"class diffusers.FlowMatchEulerDiscreteScheduler",anchor:"diffusers.FlowMatchEulerDiscreteScheduler",parameters:[{name:"num_train_timesteps",val:": int = 1000"},{name:"shift",val:": float = 1.0"},{name:"use_dynamic_shifting",val:" = False"},{name:"base_shift",val:": typing.Optional[float] = 0.5"},{name:"max_shift",val:": typing.Optional[float] = 1.15"},{name:"base_image_seq_len",val:": typing.Optional[int] = 256"},{name:"max_image_seq_len",val:": typing.Optional[int] = 4096"},{name:"invert_sigmas",val:": bool = False"},{name:"shift_terminal",val:": typing.Optional[float] = None"},{name:"use_karras_sigmas",val:": typing.Optional[bool] = False"},{name:"use_exponential_sigmas",val:": typing.Optional[bool] = False"},{name:"use_beta_sigmas",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.num_train_timesteps",description:`<strong>num_train_timesteps</strong> (<code>int</code>, defaults to 1000) — | |
| The number of diffusion steps to train the model.`,name:"num_train_timesteps"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.shift",description:`<strong>shift</strong> (<code>float</code>, defaults to 1.0) — | |
| The shift value for the timestep schedule.`,name:"shift"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.use_dynamic_shifting",description:`<strong>use_dynamic_shifting</strong> (<code>bool</code>, defaults to False) — | |
| Whether to apply timestep shifting on-the-fly based on the image resolution.`,name:"use_dynamic_shifting"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.base_shift",description:`<strong>base_shift</strong> (<code>float</code>, defaults to 0.5) — | |
| Value to stabilize image generation. Increasing <code>base_shift</code> reduces variation and image is more consistent | |
| with desired output.`,name:"base_shift"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.max_shift",description:`<strong>max_shift</strong> (<code>float</code>, defaults to 1.15) — | |
| Value change allowed to latent vectors. Increasing <code>max_shift</code> encourages more variation and image may be | |
| more exaggerated or stylized.`,name:"max_shift"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.base_image_seq_len",description:`<strong>base_image_seq_len</strong> (<code>int</code>, defaults to 256) — | |
| The base image sequence length.`,name:"base_image_seq_len"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.max_image_seq_len",description:`<strong>max_image_seq_len</strong> (<code>int</code>, defaults to 4096) — | |
| The maximum image sequence length.`,name:"max_image_seq_len"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.invert_sigmas",description:`<strong>invert_sigmas</strong> (<code>bool</code>, defaults to False) — | |
| Whether to invert the sigmas.`,name:"invert_sigmas"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.shift_terminal",description:`<strong>shift_terminal</strong> (<code>float</code>, defaults to None) — | |
| The end value of the shifted timestep schedule.`,name:"shift_terminal"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.use_karras_sigmas",description:`<strong>use_karras_sigmas</strong> (<code>bool</code>, defaults to False) — | |
| Whether to use Karras sigmas for step sizes in the noise schedule during sampling.`,name:"use_karras_sigmas"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.use_exponential_sigmas",description:`<strong>use_exponential_sigmas</strong> (<code>bool</code>, defaults to False) — | |
| Whether to use exponential sigmas for step sizes in the noise schedule during sampling.`,name:"use_exponential_sigmas"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.use_beta_sigmas",description:`<strong>use_beta_sigmas</strong> (<code>bool</code>, defaults to False) — | |
| Whether to use beta sigmas for step sizes in the noise schedule during sampling.`,name:"use_beta_sigmas"}],source:"https://github.com/huggingface/diffusers/blob/vr_10567/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L47"}}),C=new G({props:{name:"scale_noise",anchor:"diffusers.FlowMatchEulerDiscreteScheduler.scale_noise",parameters:[{name:"sample",val:": FloatTensor"},{name:"timestep",val:": typing.Union[float, torch.FloatTensor]"},{name:"noise",val:": typing.Optional[torch.FloatTensor] = None"}],parametersDescription:[{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.scale_noise.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) — | |
| The input sample.`,name:"sample"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.scale_noise.timestep",description:`<strong>timestep</strong> (<code>int</code>, <em>optional</em>) — | |
| The current timestep in the diffusion chain.`,name:"timestep"}],source:"https://github.com/huggingface/diffusers/blob/vr_10567/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L162",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A scaled input sample.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>torch.FloatTensor</code></p> | |
| `}}),L=new G({props:{name:"set_begin_index",anchor:"diffusers.FlowMatchEulerDiscreteScheduler.set_begin_index",parameters:[{name:"begin_index",val:": int = 0"}],parametersDescription:[{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.set_begin_index.begin_index",description:`<strong>begin_index</strong> (<code>int</code>) — | |
| The begin index for the scheduler.`,name:"begin_index"}],source:"https://github.com/huggingface/diffusers/blob/vr_10567/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L149"}}),O=new G({props:{name:"set_timesteps",anchor:"diffusers.FlowMatchEulerDiscreteScheduler.set_timesteps",parameters:[{name:"num_inference_steps",val:": int = None"},{name:"device",val:": typing.Union[str, torch.device] = None"},{name:"sigmas",val:": typing.Optional[typing.List[float]] = None"},{name:"mu",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.set_timesteps.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>) — | |
| The number of diffusion steps used when generating samples with a pre-trained model.`,name:"num_inference_steps"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.set_timesteps.device",description:`<strong>device</strong> (<code>str</code> or <code>torch.device</code>, <em>optional</em>) — | |
| The device to which the timesteps should be moved to. If <code>None</code>, the timesteps are not moved.`,name:"device"}],source:"https://github.com/huggingface/diffusers/blob/vr_10567/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L237"}}),P=new G({props:{name:"step",anchor:"diffusers.FlowMatchEulerDiscreteScheduler.step",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": typing.Union[float, torch.FloatTensor]"},{name:"sample",val:": FloatTensor"},{name:"s_churn",val:": float = 0.0"},{name:"s_tmin",val:": float = 0.0"},{name:"s_tmax",val:": float = inf"},{name:"s_noise",val:": float = 1.0"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.step.model_output",description:`<strong>model_output</strong> (<code>torch.FloatTensor</code>) — | |
| The direct output from learned diffusion model.`,name:"model_output"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.step.timestep",description:`<strong>timestep</strong> (<code>float</code>) — | |
| The current discrete timestep in the diffusion chain.`,name:"timestep"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.step.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code>) — | |
| A current instance of a sample created by the diffusion process.`,name:"sample"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.step.s_churn",description:"<strong>s_churn</strong> (<code>float</code>) —",name:"s_churn"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.step.s_tmin",description:"<strong>s_tmin</strong> (<code>float</code>) —",name:"s_tmin"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.step.s_tmax",description:"<strong>s_tmax</strong> (<code>float</code>) —",name:"s_tmax"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.step.s_noise",description:`<strong>s_noise</strong> (<code>float</code>, defaults to 1.0) — | |
| Scaling factor for noise added to the sample.`,name:"s_noise"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.step.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) — | |
| A random number generator.`,name:"generator"},{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.step.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>) — | |
| Whether or not to return a <a href="/docs/diffusers/pr_10567/en/api/schedulers/euler#diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteSchedulerOutput">EulerDiscreteSchedulerOutput</a> or | |
| tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_10567/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L321",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If return_dict is <code>True</code>, <a | |
| href="/docs/diffusers/pr_10567/en/api/schedulers/euler#diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteSchedulerOutput" | |
| >EulerDiscreteSchedulerOutput</a> is | |
| returned, otherwise a tuple is returned where the first element is the sample tensor.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/diffusers/pr_10567/en/api/schedulers/euler#diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteSchedulerOutput" | |
| >EulerDiscreteSchedulerOutput</a> or <code>tuple</code></p> | |
| `}}),q=new G({props:{name:"stretch_shift_to_terminal",anchor:"diffusers.FlowMatchEulerDiscreteScheduler.stretch_shift_to_terminal",parameters:[{name:"t",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.FlowMatchEulerDiscreteScheduler.stretch_shift_to_terminal.t",description:`<strong>t</strong> (<code>torch.Tensor</code>) — | |
| A tensor of timesteps to be stretched and shifted.`,name:"t"}],source:"https://github.com/huggingface/diffusers/blob/vr_10567/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py#L216",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A tensor of adjusted timesteps such that the final value equals <code>self.config.shift_terminal</code>.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>torch.Tensor</code></p> | |
| `}}),k=new He({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/schedulers/flow_match_euler_discrete.md"}}),{c(){h=o("meta"),K=n(),R=o("p"),B=n(),f(S.$$.fragment),J=n(),M=o("p"),M.innerHTML=xe,Q=n(),f(y.$$.fragment),Y=n(),s=o("div"),f(T.$$.fragment),oe=n(),H=o("p"),H.textContent=we,ae=n(),I=o("p"),I.innerHTML=$e,le=n(),x=o("div"),f(C.$$.fragment),ce=n(),V=o("p"),V.textContent=De,de=n(),w=o("div"),f(L.$$.fragment),ue=n(),N=o("p"),N.textContent=Fe,he=n(),$=o("div"),f(O.$$.fragment),fe=n(),z=o("p"),z.textContent=Ee,me=n(),D=o("div"),f(P.$$.fragment),pe=n(),A=o("p"),A.textContent=Se,ge=n(),u=o("div"),f(q.$$.fragment),_e=n(),W=o("p"),W.innerHTML=Me,ve=n(),j=o("p"),j.innerHTML=ye,Z=n(),f(k.$$.fragment),ee=n(),X=o("p"),this.h()},l(e){const l=ke("svelte-u9bgzb",document.head);h=a(l,"META",{name:!0,content:!0}),l.forEach(r),K=i(e),R=a(e,"P",{}),F(R).forEach(r),B=i(e),m(S.$$.fragment,e),J=i(e),M=a(e,"P",{"data-svelte-h":!0}),p(M)!=="svelte-j7byiu"&&(M.innerHTML=xe),Q=i(e),m(y.$$.fragment,e),Y=i(e),s=a(e,"DIV",{class:!0});var c=F(s);m(T.$$.fragment,c),oe=i(c),H=a(c,"P",{"data-svelte-h":!0}),p(H)!=="svelte-rqsn3u"&&(H.textContent=we),ae=i(c),I=a(c,"P",{"data-svelte-h":!0}),p(I)!=="svelte-1lnhhyf"&&(I.innerHTML=$e),le=i(c),x=a(c,"DIV",{class:!0});var se=F(x);m(C.$$.fragment,se),ce=i(se),V=a(se,"P",{"data-svelte-h":!0}),p(V)!=="svelte-1nqwaax"&&(V.textContent=De),se.forEach(r),de=i(c),w=a(c,"DIV",{class:!0});var re=F(w);m(L.$$.fragment,re),ue=i(re),N=a(re,"P",{"data-svelte-h":!0}),p(N)!=="svelte-1k141rk"&&(N.textContent=Fe),re.forEach(r),he=i(c),$=a(c,"DIV",{class:!0});var ne=F($);m(O.$$.fragment,ne),fe=i(ne),z=a(ne,"P",{"data-svelte-h":!0}),p(z)!=="svelte-1vzm9q"&&(z.textContent=Ee),ne.forEach(r),me=i(c),D=a(c,"DIV",{class:!0});var ie=F(D);m(P.$$.fragment,ie),pe=i(ie),A=a(ie,"P",{"data-svelte-h":!0}),p(A)!=="svelte-hi84tp"&&(A.textContent=Se),ie.forEach(r),ge=i(c),u=a(c,"DIV",{class:!0});var U=F(u);m(q.$$.fragment,U),_e=i(U),W=a(U,"P",{"data-svelte-h":!0}),p(W)!=="svelte-1mirmbz"&&(W.innerHTML=Me),ve=i(U),j=a(U,"P",{"data-svelte-h":!0}),p(j)!=="svelte-1sj7udg"&&(j.innerHTML=ye),U.forEach(r),c.forEach(r),Z=i(e),m(k.$$.fragment,e),ee=i(e),X=a(e,"P",{}),F(X).forEach(r),this.h()},h(){E(h,"name","hf:doc:metadata"),E(h,"content",Ve),E(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),E(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),E($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),E(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),E(u,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),E(s,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,l){t(document.head,h),d(e,K,l),d(e,R,l),d(e,B,l),g(S,e,l),d(e,J,l),d(e,M,l),d(e,Q,l),g(y,e,l),d(e,Y,l),d(e,s,l),g(T,s,null),t(s,oe),t(s,H),t(s,ae),t(s,I),t(s,le),t(s,x),g(C,x,null),t(x,ce),t(x,V),t(s,de),t(s,w),g(L,w,null),t(w,ue),t(w,N),t(s,he),t(s,$),g(O,$,null),t($,fe),t($,z),t(s,me),t(s,D),g(P,D,null),t(D,pe),t(D,A),t(s,ge),t(s,u),g(q,u,null),t(u,_e),t(u,W),t(u,ve),t(u,j),d(e,Z,l),g(k,e,l),d(e,ee,l),d(e,X,l),te=!0},p:Le,i(e){te||(_(S.$$.fragment,e),_(y.$$.fragment,e),_(T.$$.fragment,e),_(C.$$.fragment,e),_(L.$$.fragment,e),_(O.$$.fragment,e),_(P.$$.fragment,e),_(q.$$.fragment,e),_(k.$$.fragment,e),te=!0)},o(e){v(S.$$.fragment,e),v(y.$$.fragment,e),v(T.$$.fragment,e),v(C.$$.fragment,e),v(L.$$.fragment,e),v(O.$$.fragment,e),v(P.$$.fragment,e),v(q.$$.fragment,e),v(k.$$.fragment,e),te=!1},d(e){e&&(r(K),r(R),r(B),r(J),r(M),r(Q),r(Y),r(s),r(Z),r(ee),r(X)),r(h),b(S,e),b(y,e),b(T),b(C),b(L),b(O),b(P),b(q),b(k,e)}}}const Ve='{"title":"FlowMatchEulerDiscreteScheduler","local":"flowmatcheulerdiscretescheduler","sections":[{"title":"FlowMatchEulerDiscreteScheduler","local":"diffusers.FlowMatchEulerDiscreteScheduler","sections":[],"depth":2}],"depth":1}';function Ne(be){return Oe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ue extends Pe{constructor(h){super(),qe(this,h,Ne,Ie,Ce,{})}}export{Ue as component}; | |
Xet Storage Details
- Size:
- 17.2 kB
- Xet hash:
- 700169cee7fd45f2e663dd86a372ae71d05f61467253a013ea539d69eb3bc8c2
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.