Buckets:
| import"../chunks/DsnmJJEf.js";import{i as k,h as F,C as L,H as d,D as t,E as N,s as O}from"../chunks/X8cAGukj.js";import{p as M,o as C,s as e,f as D,a as v,b as U,c as s,d as w,n as o,r as i}from"../chunks/CQ2f15a1.js";const z='{"title":"PiflowScheduler","local":"piflowscheduler","sections":[{"title":"PiflowScheduler","local":"diffusers.PiflowScheduler","sections":[],"depth":2},{"title":"PiflowSchedulerOutput","local":"diffusers.schedulers.scheduling_piflow.PiflowSchedulerOutput","sections":[],"depth":2}],"depth":1}';var K=w('<meta name="hf:doc:metadata"/>'),E=w(`<p></p> <!> <!> <p><code>PiflowScheduler</code> is the few-step scheduler of the distilled Kandinsky 6 checkpoints, both the | |
| text/image-to-video-and-audio model and the video super-resolution model, and of the distilled Kandinsky S2V 1.0 | |
| checkpoints. It implements <a href="https://huggingface.co/papers/2510.14974" rel="nofollow">π-Flow</a>: the transformer predicts <code>n_grid</code> denoised estimates per latent | |
| channel at a small number of grid points, and the scheduler integrates a network-free policy between them.</p> <p>The reference implementation can be found at <a href="https://github.com/Lakonik/LakonLab" rel="nofollow">Lakonik/LakonLab</a>.</p> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Few-step PiFlow scheduler for widened-output diffusion transformers.</p> <p>PiFlow evaluates the denoising model at a small number of grid points and integrates a network-free policy between | |
| those evaluations. The scheduler is intended for distilled Kandinsky 6 checkpoints, including the main video/audio | |
| model and the video super-resolution model. Their model output contains <code>n_grid</code> predictions per sample channel.</p> <p>This scheduler inherits from <a href="/docs/diffusers/pr_15212/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a> and <a href="/docs/diffusers/pr_15212/en/api/configuration#diffusers.ConfigMixin">ConfigMixin</a>. Check the superclass documentation for the | |
| generic methods implemented for all schedulers (loading, saving, etc.).</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Set the distilled PiFlow timestep schedule.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Advance one step by integrating the PiFlow policy.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Output class for the scheduler’s <code>step</code> function output.</p></div> <!> <p></p>`,1);function A(b,P){M(P,!1),C(()=>{new URLSearchParams(window.location.search).get("fw")}),k();var l=E();F("ncbl0k",g=>{var _=K();O(_,"content",z),v(g,_)});var c=e(D(l),2);L(c,{containerStyle:"float: inline-end; margin-inline-start: 10px; display: inline-flex; position: relative; z-index: 10;"});var p=e(c,2);d(p,{title:"PiflowScheduler",local:"piflowscheduler",headingTag:"h1"});var u=e(p,6);d(u,{title:"PiflowScheduler",local:"diffusers.PiflowScheduler",headingTag:"h2"});var n=e(u,2),m=s(n);t(m,{name:"class diffusers.PiflowScheduler",anchor:"diffusers.PiflowScheduler",source:"https://github.com/huggingface/diffusers/blob/vr_15212/src/diffusers/schedulers/scheduling_piflow.py#L144",parameters:[{name:"num_train_timesteps",val:": int = 1000"},{name:"shift",val:": float = 5.0"},{name:"n_grid",val:": int = 10"},{name:"eps",val:": float = 1e-06"},{name:"final_step_size_scale",val:": float = 0.5"},{name:"num_policy_substeps",val:": int = 128"}],parametersDescription:[{anchor:"diffusers.PiflowScheduler.num_train_timesteps",description:`<strong>num_train_timesteps</strong> (<code>int</code>, <em>optional</em>, defaults to 1000) — Number of | |
| training diffusion steps.`,name:"num_train_timesteps"},{anchor:"diffusers.PiflowScheduler.shift",description:"<strong>shift</strong> (<code>float</code>, <em>optional</em>, defaults to 5.0) — Flow-matching timestep shift.",name:"shift"},{anchor:"diffusers.PiflowScheduler.n_grid",description:`<strong>n_grid</strong> (<code>int</code>, <em>optional</em>, defaults to 10) — Number of predictions in the | |
| widened model output.`,name:"n_grid"},{anchor:"diffusers.PiflowScheduler.eps",description:"<strong>eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-6) — Minimum timestep and policy denominator.",name:"eps"},{anchor:"diffusers.PiflowScheduler.final_step_size_scale",description:`<strong>final_step_size_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) — Relative | |
| size of the final raw-timestep segment.`,name:"final_step_size_scale"},{anchor:"diffusers.PiflowScheduler.num_policy_substeps",description:`<strong>num_policy_substeps</strong> (<code>int</code>, <em>optional</em>, defaults to 128) — Maximum policy | |
| integration substeps per raw-timestep unit.`,name:"num_policy_substeps"}]});var r=e(m,8),S=s(r);t(S,{name:"set_timesteps",anchor:"diffusers.PiflowScheduler.set_timesteps",source:"https://github.com/huggingface/diffusers/blob/vr_15212/src/diffusers/schedulers/scheduling_piflow.py#L224",parameters:[{name:"num_inference_steps",val:": int | None = None"},{name:"device",val:": typing.Union[str, torch.device, NoneType] = None"},{name:"sigmas",val:": list[float] | None = None"},{name:"mu",val:": float | None = None"},{name:"timesteps",val:": list[float] | None = None"}],parametersDescription:[{anchor:"diffusers.PiflowScheduler.set_timesteps.num_inference_steps",description:"<strong>num_inference_steps</strong> (<code>int</code>) — Number of model evaluations.",name:"num_inference_steps"},{anchor:"diffusers.PiflowScheduler.set_timesteps.device",description:"<strong>device</strong> (<code>str</code> or <code>torch.device</code>, <em>optional</em>) — Device for the schedule.",name:"device"},{anchor:"diffusers.PiflowScheduler.set_timesteps.sigmas",description:"<strong>sigmas</strong> (<code>list[float]</code>, <em>optional</em>) — Unsupported custom sigma schedule.",name:"sigmas"},{anchor:"diffusers.PiflowScheduler.set_timesteps.mu",description:"<strong>mu</strong> (<code>float</code>, <em>optional</em>) — Unsupported dynamic-shift parameter.",name:"mu"},{anchor:"diffusers.PiflowScheduler.set_timesteps.timesteps",description:"<strong>timesteps</strong> (<code>list[float]</code>, <em>optional</em>) — Unsupported custom timestep schedule.",name:"timesteps"}]}),o(2),i(r);var f=e(r,2),x=s(f);t(x,{name:"step",anchor:"diffusers.PiflowScheduler.step",source:"https://github.com/huggingface/diffusers/blob/vr_15212/src/diffusers/schedulers/scheduling_piflow.py#L331",parameters:[{name:"model_output",val:": FloatTensor"},{name:"timestep",val:": typing.Union[float, torch.FloatTensor]"},{name:"sample",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.PiflowScheduler.step.model_output",description:`<strong>model_output</strong> (<em>torch.FloatTensor</em>) — Widened model output containing | |
| <code>n_grid</code> predictions per sample channel.`,name:"model_output"},{anchor:"diffusers.PiflowScheduler.step.timestep",description:"<strong>timestep</strong> (<em>float</em> or <em>torch.FloatTensor</em>) — Current scheduler timestep.",name:"timestep"},{anchor:"diffusers.PiflowScheduler.step.sample",description:"<strong>sample</strong> (<em>torch.FloatTensor</em>) — Current noisy sample.",name:"sample"},{anchor:"diffusers.PiflowScheduler.step.return_dict",description:`<strong>return_dict</strong> (<em>bool</em>, <em>optional</em>, defaults to True) — Whether to return | |
| a [<em>PiflowSchedulerOutput</em>].`,name:"return_dict"}],returnDescription:` | |
| <p>Updated sample.</p> | |
| `,returnType:` | |
| <p>[<em>PiflowSchedulerOutput</em>] or <em>tuple</em></p> | |
| `}),o(2),i(f),i(n);var h=e(n,2);d(h,{title:"PiflowSchedulerOutput",local:"diffusers.schedulers.scheduling_piflow.PiflowSchedulerOutput",headingTag:"h2"});var a=e(h,2),y=s(a);t(y,{name:"class diffusers.schedulers.scheduling_piflow.PiflowSchedulerOutput",anchor:"diffusers.schedulers.scheduling_piflow.PiflowSchedulerOutput",source:"https://github.com/huggingface/diffusers/blob/vr_15212/src/diffusers/schedulers/scheduling_piflow.py#L30",parameters:[{name:"prev_sample",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.schedulers.scheduling_piflow.PiflowSchedulerOutput.prev_sample",description:`<strong>prev_sample</strong> (<code>torch.Tensor</code>) — | |
| Computed sample at the next PiFlow grid point. Should be used as the next denoising input.`,name:"prev_sample"}]}),o(2),i(a);var T=e(a,2);N(T,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/schedulers/piflow.md"}),o(2),v(b,l),U()}export{A as component}; | |
Xet Storage Details
- Size:
- 8.84 kB
- Xet hash:
- b722940f45484846ac037dddeb768ff59a64b84514c36b0b507272f25f4e1d79
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.