Spaces:
Running
Running
app.py
CHANGED
@@ -163,8 +163,11 @@ def sample_ddim(n_sample, n=20):
|
|
163 |
|
164 |
def greet(input):
|
165 |
samples, intermediate = sample_ddim(32, n=1)
|
166 |
-
response = transform2(transform(np.moveaxis(samples.detach().cpu().numpy(),1,3)[-1]))
|
167 |
-
response2 = transform2(transform(np.moveaxis(samples.detach().cpu().numpy(),1,3)[1]))
|
|
|
|
|
|
|
168 |
return response, response2
|
169 |
|
170 |
transform2 = transforms.ToPILImage()
|
|
|
163 |
|
164 |
def greet(input):
|
165 |
samples, intermediate = sample_ddim(32, n=1)
|
166 |
+
#response = transform2(transform(np.moveaxis(samples.detach().cpu().numpy(),1,3)[-1]))
|
167 |
+
#response2 = transform2(transform(np.moveaxis(samples.detach().cpu().numpy(),1,3)[1]))
|
168 |
+
#response = im.fromarray(intermediate[24][0][1]).convert("RGB")
|
169 |
+
response = transform2(transform(np.moveaxis(intermediate,2,4)[-1][-1]))
|
170 |
+
response2 = transform2(transform(np.moveaxis(intermediate,2,4)[-1][1]))
|
171 |
return response, response2
|
172 |
|
173 |
transform2 = transforms.ToPILImage()
|