Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,12 +47,9 @@ if torch.cuda.is_available():
|
|
| 47 |
previewer = Previewer()
|
| 48 |
previewer_state_dict = torch.load("previewer/previewer_v1_100k.pt", map_location=torch.device('cpu'))["state_dict"]
|
| 49 |
previewer.load_state_dict(previewer_state_dict)
|
| 50 |
-
def callback_prior(i, t,
|
| 51 |
-
|
| 52 |
-
print(
|
| 53 |
-
print("latents", latents)
|
| 54 |
-
print("kwargs", kwargs)
|
| 55 |
-
print(i, t, latents, kwargs)
|
| 56 |
output = previewer(latents)
|
| 57 |
output = numpy_to_pil(output.clamp(0, 1).permute(0, 2, 3, 1).float().cpu().numpy())
|
| 58 |
return output
|
|
|
|
| 47 |
previewer = Previewer()
|
| 48 |
previewer_state_dict = torch.load("previewer/previewer_v1_100k.pt", map_location=torch.device('cpu'))["state_dict"]
|
| 49 |
previewer.load_state_dict(previewer_state_dict)
|
| 50 |
+
def callback_prior(self_remote, i, t, kwargs):
|
| 51 |
+
latents = kwargs["latents"]
|
| 52 |
+
print(latents)
|
|
|
|
|
|
|
|
|
|
| 53 |
output = previewer(latents)
|
| 54 |
output = numpy_to_pil(output.clamp(0, 1).permute(0, 2, 3, 1).float().cpu().numpy())
|
| 55 |
return output
|