Buckets:

download
raw
10.8 kB
import"../chunks/DsnmJJEf.js";import{i as y,h as k,C as O,H as c,D as t,E as N,s as q}from"../chunks/X8cAGukj.js";import{p as L,o as C,s as e,f as U,a as b,b as B,c as o,d as D,n as r,r as s}from"../chunks/CQ2f15a1.js";const G='{"title":"RFD4ProteinaScheduler","local":"rfd4proteinascheduler","sections":[{"title":"RFD4ProteinaScheduler","local":"diffusers.RFD4ProteinaScheduler","sections":[],"depth":2},{"title":"RFD4ProteinaSchedulerOutput","local":"diffusers.schedulers.scheduling_rfd4_proteina.RFD4ProteinaSchedulerOutput","sections":[],"depth":2}],"depth":1}';var H=D('<meta name="hf:doc:metadata"/>'),A=D(`<p></p> <!> <!> <p><code>RFD4ProteinaScheduler</code> is the temporal-score-rescaled flow sampler of RFD4-Proteína for one modality. The pipeline uses
two instances, one for the backbone (<code>bb_ca</code>, coordinates in nanometers) and one for the per-token local latents
(<code>local_latents</code>), each with its own time schedule, noise schedule and rescaling. See <a href="/docs/diffusers/pr_15212/en/api/pipelines/rfd4_proteina#diffusers.RFD4ProteinaPipeline">RFD4ProteinaPipeline</a> for the
sampling loop.</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>Temporal-score-rescaled flow sampler for one modality of RFD4-Proteína.</p> <p>The pipeline integrates two modalities, the backbone and the per-token local latents, with one scheduler each. They
differ in their time schedule, noise schedule and rescaling.</p> <p>Call <code>set_timesteps</code> before sampling. Times increase from noise toward clean data. A scheduler tracks the current
interval and should not be shared by concurrent generations.</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>Resolve the schedule and reset the integration cursor.</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>Sample the forward marginal <code>(1 - t) * noise + t * clean</code>.</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 integration interval and update <code>step_index</code>.</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>Updated state of one modality.</p></div> <!> <p></p>`,1);function z(P,R){L(R,!1),C(()=>{new URLSearchParams(window.location.search).get("fw")}),y();var l=A();k("cw7rw4",g=>{var v=H();q(v,"content",G),b(g,v)});var p=e(U(l),2);O(p,{containerStyle:"float: inline-end; margin-inline-start: 10px; display: inline-flex; position: relative; z-index: 10;"});var u=e(p,2);c(u,{title:"RFD4ProteinaScheduler",local:"rfd4proteinascheduler",headingTag:"h1"});var h=e(u,4);c(h,{title:"RFD4ProteinaScheduler",local:"diffusers.RFD4ProteinaScheduler",headingTag:"h2"});var n=e(h,2),m=o(n);t(m,{name:"class diffusers.RFD4ProteinaScheduler",anchor:"diffusers.RFD4ProteinaScheduler",source:"https://github.com/huggingface/diffusers/blob/vr_15212/src/diffusers/schedulers/scheduling_rfd4_proteina.py#L76",parameters:[{name:"schedule_mode",val:": str"},{name:"noise_mode",val:": str"},{name:"tsr_k",val:": float"},{name:"tsr_sigma",val:": float"},{name:"tail_steps",val:": int = 10"},{name:"tail_step_multiplier",val:": int = 2"},{name:"t_lim_ode",val:": float = 0.95"},{name:"t_lim_ode_below",val:": float = 0.02"}],parametersDescription:[{anchor:"diffusers.RFD4ProteinaScheduler.schedule_mode",description:`<strong>schedule_mode</strong> (<code>str</code>) &#x2014;
Spacing of the times between noise and data: <code>&quot;log&quot;</code> or <code>&quot;power&quot;</code>.`,name:"schedule_mode"},{anchor:"diffusers.RFD4ProteinaScheduler.noise_mode",description:`<strong>noise_mode</strong> (<code>str</code>) &#x2014;
Shape of the noise injected in the stochastic window: <code>&quot;1/t&quot;</code> or <code>&quot;tan&quot;</code>.`,name:"noise_mode"},{anchor:"diffusers.RFD4ProteinaScheduler.tsr_k",description:`<strong>tsr_k</strong> (<code>float</code>) &#x2014;
How low the sampling temperature goes; higher is lower.`,name:"tsr_k"},{anchor:"diffusers.RFD4ProteinaScheduler.tsr_sigma",description:`<strong>tsr_sigma</strong> (<code>float</code>) &#x2014;
How fast the low temperature is reached; higher is faster.`,name:"tsr_sigma"},{anchor:"diffusers.RFD4ProteinaScheduler.tail_steps",description:`<strong>tail_steps</strong> (<code>int</code>, defaults to <code>10</code>) &#x2014;
Number of final intervals that are finer than the rest by <code>tail_step_multiplier</code>.`,name:"tail_steps"},{anchor:"diffusers.RFD4ProteinaScheduler.tail_step_multiplier",description:`<strong>tail_step_multiplier</strong> (<code>int</code>, defaults to <code>2</code>) &#x2014;
How much finer the final intervals are.`,name:"tail_step_multiplier"},{anchor:"diffusers.RFD4ProteinaScheduler.t_lim_ode",description:`<strong>t_lim_ode</strong> (<code>float</code>, defaults to <code>0.95</code>) &#x2014;
Above this time the step is deterministic.`,name:"t_lim_ode"},{anchor:"diffusers.RFD4ProteinaScheduler.t_lim_ode_below",description:`<strong>t_lim_ode_below</strong> (<code>float</code>, defaults to <code>0.02</code>) &#x2014;
Below this time the step is deterministic.`,name:"t_lim_ode_below"}]});var a=e(m,8),S=o(a);t(S,{name:"set_timesteps",anchor:"diffusers.RFD4ProteinaScheduler.set_timesteps",source:"https://github.com/huggingface/diffusers/blob/vr_15212/src/diffusers/schedulers/scheduling_rfd4_proteina.py#L133",parameters:[{name:"num_inference_steps",val:": int"},{name:"device",val:": typing.Union[str, torch.device, NoneType] = None"},{name:"start_time",val:": float | None = None"}],parametersDescription:[{anchor:"diffusers.RFD4ProteinaScheduler.set_timesteps.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>) &#x2014;
Number of integration intervals.`,name:"num_inference_steps"},{anchor:"diffusers.RFD4ProteinaScheduler.set_timesteps.device",description:`<strong>device</strong> (<code>str</code> or <code>torch.device</code>, <em>optional</em>) &#x2014;
Device for <code>timesteps</code>. The interval lengths and noise coefficients stay on the CPU.`,name:"device"},{anchor:"diffusers.RFD4ProteinaScheduler.set_timesteps.start_time",description:`<strong>start_time</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Partial-diffusion start time in <code>[0, 1)</code>. Omit for full generation.`,name:"start_time"}]}),r(2),s(a);var i=e(a,2),F=o(i);t(F,{name:"add_noise",anchor:"diffusers.RFD4ProteinaScheduler.add_noise",source:"https://github.com/huggingface/diffusers/blob/vr_15212/src/diffusers/schedulers/scheduling_rfd4_proteina.py#L194",parameters:[{name:"original_samples",val:": Tensor"},{name:"noise",val:": Tensor"},{name:"timesteps",val:": typing.Union[float, torch.Tensor]"}],parametersDescription:[{anchor:"diffusers.RFD4ProteinaScheduler.add_noise.original_samples",description:"<strong>original_samples</strong> (<code>torch.Tensor</code>) &#x2014; Clean state <code>(batch, tokens, D)</code>.",name:"original_samples"},{anchor:"diffusers.RFD4ProteinaScheduler.add_noise.noise",description:"<strong>noise</strong> (<code>torch.Tensor</code>) &#x2014; Noise of the same shape, drawn by the caller.",name:"noise"},{anchor:"diffusers.RFD4ProteinaScheduler.add_noise.timesteps",description:"<strong>timesteps</strong> (<code>float</code> or <code>torch.Tensor</code>) &#x2014; Time in <code>[0, 1)</code>, a scalar or <code>(batch,)</code>.",name:"timesteps"}]}),r(2),s(i);var f=e(i,2),w=o(f);t(w,{name:"step",anchor:"diffusers.RFD4ProteinaScheduler.step",source:"https://github.com/huggingface/diffusers/blob/vr_15212/src/diffusers/schedulers/scheduling_rfd4_proteina.py#L212",parameters:[{name:"model_output",val:": Tensor"},{name:"timestep",val:": Tensor"},{name:"sample",val:": Tensor"},{name:"emit_mask",val:": Tensor"},{name:"generator",val:": typing.Union[torch.Generator, list[torch.Generator], NoneType] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.RFD4ProteinaScheduler.step.model_output",description:`<strong>model_output</strong> (<code>torch.Tensor</code>) &#x2014;
Predicted velocity, shaped like <code>sample</code>.`,name:"model_output"},{anchor:"diffusers.RFD4ProteinaScheduler.step.timestep",description:`<strong>timestep</strong> (<code>torch.Tensor</code>) &#x2014;
The next element of <code>timesteps</code>. Out-of-order steps are rejected.`,name:"timestep"},{anchor:"diffusers.RFD4ProteinaScheduler.step.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014;
Current state <code>(B, N, D)</code>.`,name:"sample"},{anchor:"diffusers.RFD4ProteinaScheduler.step.emit_mask",description:`<strong>emit_mask</strong> (<code>torch.Tensor</code>) &#x2014;
Boolean <code>(B, N)</code>, true for the tokens that are updated (not context or padding).`,name:"emit_mask"},{anchor:"diffusers.RFD4ProteinaScheduler.step.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>list[torch.Generator]</code>, <em>optional</em>) &#x2014;
A generator for a single row or distinct generators for each batch row. Omitting them uses the global
stream.`,name:"generator"},{anchor:"diffusers.RFD4ProteinaScheduler.step.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Return <code>RFD4ProteinaSchedulerOutput</code>; otherwise a one-item tuple holding the state.`,name:"return_dict"}],returnDescription:`
<p>The updated state.</p>
`,returnType:`
<p><code>RFD4ProteinaSchedulerOutput</code> or <code>tuple</code></p>
`}),r(2),s(f),s(n);var _=e(n,2);c(_,{title:"RFD4ProteinaSchedulerOutput",local:"diffusers.schedulers.scheduling_rfd4_proteina.RFD4ProteinaSchedulerOutput",headingTag:"h2"});var d=e(_,2),x=o(d);t(x,{name:"class diffusers.schedulers.scheduling_rfd4_proteina.RFD4ProteinaSchedulerOutput",anchor:"diffusers.schedulers.scheduling_rfd4_proteina.RFD4ProteinaSchedulerOutput",source:"https://github.com/huggingface/diffusers/blob/vr_15212/src/diffusers/schedulers/scheduling_rfd4_proteina.py#L19",parameters:[{name:"prev_sample",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.schedulers.scheduling_rfd4_proteina.RFD4ProteinaSchedulerOutput.prev_sample",description:`<strong>prev_sample</strong> (<code>torch.Tensor</code>) &#x2014;
The state after the step, shaped <code>(B, N, D)</code>: <code>D</code> is 3 for the backbone (coordinates in nanometers) and the
latent width for the local latents.`,name:"prev_sample"}]}),r(2),s(d);var T=e(d,2);N(T,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/schedulers/rfd4_proteina.md"}),r(2),b(P,l),B()}export{z as component};

Xet Storage Details

Size:
10.8 kB
·
Xet hash:
15f1b9ce246958accc4c04624e5534305646a7caddc3bef24c6c18179feae161

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.