MCPcopy
hub / github.com/PixArt-alpha/PixArt-sigma / to

Method to

train_scripts/train_pixart_lcm.py:92–96  ·  view source on GitHub ↗
(self, device)

Source from the content-addressed store, hash-verified

90 self.ddim_alpha_cumprods_prev = torch.from_numpy(self.ddim_alpha_cumprods_prev)
91
92 def to(self, device):
93 self.ddim_timesteps = self.ddim_timesteps.to(device)
94 self.ddim_alpha_cumprods = self.ddim_alpha_cumprods.to(device)
95 self.ddim_alpha_cumprods_prev = self.ddim_alpha_cumprods_prev.to(device)
96 return self
97
98 def ddim_step(self, pred_x0, pred_noise, timestep_index):
99 alpha_cumprod_prev = extract_into_tensor(self.ddim_alpha_cumprods_prev, timestep_index, pred_x0.shape)

Callers 15

mainFunction · 0.80
generateFunction · 0.80
extract_caption_t5_jobFunction · 0.80
extract_caption_t5Function · 0.80
extract_img_vaeFunction · 0.80
_threshold_sampleMethod · 0.80
set_timestepsMethod · 0.80
stepMethod · 0.80
add_noiseMethod · 0.80
get_velocityMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected