MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / return_to_timestep

Method return_to_timestep

trainer/scheduler.py:199–205  ·  view source on GitHub ↗
(self, timestep, sample, sample_stablized)

Source from the content-addressed store, hash-verified

197
198
199 def return_to_timestep(self, timestep, sample, sample_stablized):
200 if isinstance(timestep, torch.Tensor):
201 timestep = timestep.cpu()
202 timestep_id = torch.argmin((self.timesteps - timestep).abs())
203 sigma = self.sigmas[timestep_id]
204 model_output = (sample - sample_stablized) / sigma
205 return model_output
206
207
208 def add_noise(self, original_samples, noise, timestep):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected