Richard Neuschulz
commited on
Commit
·
62becae
1
Parent(s):
33b4cdb
change image size
Browse files
app.py
CHANGED
|
@@ -53,7 +53,7 @@ def generate_image(images, prompt, negative_prompt, preserve_face_structure, fac
|
|
| 53 |
faceid_embed = torch.from_numpy(faces[0].normed_embedding).unsqueeze(0)
|
| 54 |
faceid_all_embeds.append(faceid_embed)
|
| 55 |
if(first_iteration and preserve_face_structure):
|
| 56 |
-
face_image = face_align.norm_crop(face, landmark=faces[0].kps, image_size=
|
| 57 |
first_iteration = False
|
| 58 |
|
| 59 |
average_embedding = torch.mean(torch.stack(faceid_all_embeds, dim=0), dim=0)
|
|
|
|
| 53 |
faceid_embed = torch.from_numpy(faces[0].normed_embedding).unsqueeze(0)
|
| 54 |
faceid_all_embeds.append(faceid_embed)
|
| 55 |
if(first_iteration and preserve_face_structure):
|
| 56 |
+
face_image = face_align.norm_crop(face, landmark=faces[0].kps, image_size=640) # you can also segment the face
|
| 57 |
first_iteration = False
|
| 58 |
|
| 59 |
average_embedding = torch.mean(torch.stack(faceid_all_embeds, dim=0), dim=0)
|