Spaces:
Paused
Paused
Commit
•
93b5f40
1
Parent(s):
81e06d6
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ if torch.cuda.is_available():
|
|
45 |
|
46 |
if PREVIEW_IMAGES:
|
47 |
previewer = Previewer()
|
48 |
-
|
49 |
def callback_prior(i, t, latents):
|
50 |
output = previewer(latents)
|
51 |
output = numpy_to_pil(output.clamp(0, 1).permute(0, 2, 3, 1).cpu().numpy())
|
@@ -97,8 +97,6 @@ def generate(
|
|
97 |
)
|
98 |
|
99 |
if PREVIEW_IMAGES:
|
100 |
-
previewer.load_state_dict(torch.load("previewer/previewer_v1_100k.pt")["state_dict"])
|
101 |
-
|
102 |
for _ in range(len(DEFAULT_STAGE_C_TIMESTEPS)):
|
103 |
r = next(prior_output)
|
104 |
if isinstance(r, list):
|
|
|
45 |
|
46 |
if PREVIEW_IMAGES:
|
47 |
previewer = Previewer()
|
48 |
+
previewer.load_state_dict(torch.load("previewer/previewer_v1_100k.pt")["state_dict"])
|
49 |
def callback_prior(i, t, latents):
|
50 |
output = previewer(latents)
|
51 |
output = numpy_to_pil(output.clamp(0, 1).permute(0, 2, 3, 1).cpu().numpy())
|
|
|
97 |
)
|
98 |
|
99 |
if PREVIEW_IMAGES:
|
|
|
|
|
100 |
for _ in range(len(DEFAULT_STAGE_C_TIMESTEPS)):
|
101 |
r = next(prior_output)
|
102 |
if isinstance(r, list):
|