Spaces:
Runtime error
Runtime error
Update model.py
Browse files
model.py
CHANGED
@@ -1100,7 +1100,7 @@ class StreamMultiDiffusion(nn.Module):
|
|
1100 |
self.stock_noise,
|
1101 |
torch.tensor(self.sub_timesteps_tensor, device=self.device),
|
1102 |
)
|
1103 |
-
print('111111111111111111111', bootstrap_steps)
|
1104 |
|
1105 |
x_t_latent = rearrange(x_t_latent, '(t p) c h w -> p t c h w', p=p)
|
1106 |
bootstrap_mask = (
|
@@ -1109,9 +1109,11 @@ class StreamMultiDiffusion(nn.Module):
|
|
1109 |
) # (p, t, c, h, w)
|
1110 |
x_t_latent = (1.0 - bootstrap_mask) * bootstrap_latent[None] + bootstrap_mask * x_t_latent
|
1111 |
x_t_latent = rearrange(x_t_latent, 'p t c h w -> (t p) c h w')
|
|
|
1112 |
|
1113 |
# Centering.
|
1114 |
x_t_latent = shift_to_mask_bbox_center(x_t_latent, rearrange(self.masks, 'p t c h w -> (t p) c h w'), reverse=True)
|
|
|
1115 |
|
1116 |
t_list = self.sub_timesteps_tensor_ # (T * p,)
|
1117 |
if self.guidance_scale > 1.0 and self.cfg_type == 'initialize':
|
|
|
1100 |
self.stock_noise,
|
1101 |
torch.tensor(self.sub_timesteps_tensor, device=self.device),
|
1102 |
)
|
1103 |
+
print('111111111111111111111', self.bootstrap_steps)
|
1104 |
|
1105 |
x_t_latent = rearrange(x_t_latent, '(t p) c h w -> p t c h w', p=p)
|
1106 |
bootstrap_mask = (
|
|
|
1109 |
) # (p, t, c, h, w)
|
1110 |
x_t_latent = (1.0 - bootstrap_mask) * bootstrap_latent[None] + bootstrap_mask * x_t_latent
|
1111 |
x_t_latent = rearrange(x_t_latent, 'p t c h w -> (t p) c h w')
|
1112 |
+
print('222222222222222222222')
|
1113 |
|
1114 |
# Centering.
|
1115 |
x_t_latent = shift_to_mask_bbox_center(x_t_latent, rearrange(self.masks, 'p t c h w -> (t p) c h w'), reverse=True)
|
1116 |
+
print('333333333333333333333')
|
1117 |
|
1118 |
t_list = self.sub_timesteps_tensor_ # (T * p,)
|
1119 |
if self.guidance_scale > 1.0 and self.cfg_type == 'initialize':
|