Huertas97 commited on
Commit
e8eb6cd
·
1 Parent(s): 7a37c2a

Test: check requirements, lower timesteps

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. requirements.txt +1 -2
app.py CHANGED
@@ -105,7 +105,7 @@ def generate_images(selected_class, num_images, progress=gr.Progress()):
105
  x = torch.randn(num_images, 1, 28, 28).to(device)
106
  y = torch.tensor([class_idx] * num_images).to(device)
107
 
108
- for t in progress.tqdm(noise_scheduler.timesteps, desc="Generating image", total=noise_scheduler.config.num_train_timesteps): #
109
  with torch.no_grad():
110
  residual = model_classcond_native(x, t, y)
111
  x = noise_scheduler.step(residual, t, x).prev_sample
 
105
  x = torch.randn(num_images, 1, 28, 28).to(device)
106
  y = torch.tensor([class_idx] * num_images).to(device)
107
 
108
+ for t in progress.tqdm(range(2), desc="Generating image", total=noise_scheduler.config.num_train_timesteps): #
109
  with torch.no_grad():
110
  residual = model_classcond_native(x, t, y)
111
  x = noise_scheduler.step(residual, t, x).prev_sample
requirements.txt CHANGED
@@ -4,5 +4,4 @@ diffusers==0.29.2
4
  safetensors==0.4.3
5
  huggingface_hub==0.23.4
6
  accelerate==0.32.1
7
- numpy==1.26.4
8
- json==2.0.9
 
4
  safetensors==0.4.3
5
  huggingface_hub==0.23.4
6
  accelerate==0.32.1
7
+ numpy==1.26.4