Vedansh-7 commited on
Commit
3aca900
·
1 Parent(s): 21dbdf0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -134,7 +134,7 @@ class DiffusionModel(nn.Module):
134
  self.alphas = 1. - self.betas
135
  self.register_buffer('alpha_bars', torch.cumprod(self.alphas, dim=0))
136
 
137
- @torch.no_grad()
138
  def sample(model, num_images, timesteps, img_size, num_classes, labels, device, progress_callback=None):
139
  # Initialize with properly scaled noise
140
  x_t = torch.randn((num_images, 3, img_size, img_size), device=device) * 0.5 # Reduced initial noise scale
 
134
  self.alphas = 1. - self.betas
135
  self.register_buffer('alpha_bars', torch.cumprod(self.alphas, dim=0))
136
 
137
+ @torch.no_grad()
138
  def sample(model, num_images, timesteps, img_size, num_classes, labels, device, progress_callback=None):
139
  # Initialize with properly scaled noise
140
  x_t = torch.randn((num_images, 3, img_size, img_size), device=device) * 0.5 # Reduced initial noise scale