Spaces:
Sleeping
Sleeping
Test: check requirements, lower timesteps
Browse files- app.py +1 -1
- 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(
|
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
|
|