Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from torch.utils.data import Dataset, DataLoader
|
|
6 |
import gradio as gr
|
7 |
import sys
|
8 |
import uuid
|
9 |
-
import tqdm
|
10 |
sys.path.append(os.path.abspath(os.path.join("", "..")))
|
11 |
import gc
|
12 |
import warnings
|
@@ -191,7 +191,7 @@ def inference(net, prompt, negative_prompt, guidance_scale, ddim_steps, seed):
|
|
191 |
latents = noise_scheduler.step(noise_pred, t, latents).prev_sample
|
192 |
|
193 |
latents = 1 / 0.18215 * latents
|
194 |
-
image = vae.decode(latents
|
195 |
image = (image / 2 + 0.5).clamp(0, 1)
|
196 |
image = image.detach().cpu().float().permute(0, 2, 3, 1).numpy()[0]
|
197 |
|
|
|
6 |
import gradio as gr
|
7 |
import sys
|
8 |
import uuid
|
9 |
+
import tqdm
|
10 |
sys.path.append(os.path.abspath(os.path.join("", "..")))
|
11 |
import gc
|
12 |
import warnings
|
|
|
191 |
latents = noise_scheduler.step(noise_pred, t, latents).prev_sample
|
192 |
|
193 |
latents = 1 / 0.18215 * latents
|
194 |
+
image = vae.decode(latents).sample
|
195 |
image = (image / 2 + 0.5).clamp(0, 1)
|
196 |
image = image.detach().cpu().float().permute(0, 2, 3, 1).numpy()[0]
|
197 |
|