Spaces:
Sleeping
Sleeping
fix error
Browse files- stylegan_generator.py +1 -1
stylegan_generator.py
CHANGED
|
@@ -28,6 +28,6 @@ def generate_stylegan():
|
|
| 28 |
image = (image * 0.5 + 0.5) * 255
|
| 29 |
image = image.astype(np.uint8)
|
| 30 |
image = np.transpose(image, (1, 2, 0))
|
| 31 |
-
|
| 32 |
|
| 33 |
return pil_img.resize((512, 512), Image.LANCZOS)
|
|
|
|
| 28 |
image = (image * 0.5 + 0.5) * 255
|
| 29 |
image = image.astype(np.uint8)
|
| 30 |
image = np.transpose(image, (1, 2, 0))
|
| 31 |
+
pil_img = Image.fromarray(image, 'RGB')
|
| 32 |
|
| 33 |
return pil_img.resize((512, 512), Image.LANCZOS)
|