MCPcopy Create free account
hub / github.com/Sin3DM/Sin3DM / __call__

Method __call__

src/diffusion/respace.py:123–128  ·  view source on GitHub ↗
(self, x, ts, **kwargs)

Source from the content-addressed store, hash-verified

121 self.original_num_steps = original_num_steps
122
123 def __call__(self, x, ts, **kwargs):
124 map_tensor = th.tensor(self.timestep_map, device=ts.device, dtype=ts.dtype)
125 new_ts = map_tensor[ts]
126 if self.rescale_timesteps:
127 new_ts = new_ts.float() * (1000.0 / self.original_num_steps)
128 return self.model(x, new_ts, **kwargs)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected