Spaces:
Runtime error
Runtime error
Мясников Филипп Сергеевич
commited on
Commit
·
b3de1a8
1
Parent(s):
025efa1
fix
Browse files
app.py
CHANGED
|
@@ -126,8 +126,8 @@ def gen_im(model_type='ffhq'):
|
|
| 126 |
def inference(img):
|
| 127 |
img.save('out.jpg')
|
| 128 |
#aligned_face = align_face('out.jpg')
|
| 129 |
-
|
| 130 |
-
|
| 131 |
|
| 132 |
ffhq_codes = ffhq_encoder(transformed_image.unsqueeze(0).to(device).float())
|
| 133 |
ffhq_codes = ffhq_codes + ffhq_latent_avg.repeat(ffhq_codes.shape[0], 1, 1)
|
|
|
|
| 126 |
def inference(img):
|
| 127 |
img.save('out.jpg')
|
| 128 |
#aligned_face = align_face('out.jpg')
|
| 129 |
+
input_image = run_alignment(image_path)
|
| 130 |
+
transformed_image = transform(input_image)
|
| 131 |
|
| 132 |
ffhq_codes = ffhq_encoder(transformed_image.unsqueeze(0).to(device).float())
|
| 133 |
ffhq_codes = ffhq_codes + ffhq_latent_avg.repeat(ffhq_codes.shape[0], 1, 1)
|