Spaces:
Running
Running
salomonsky
commited on
Commit
•
f02cbc6
1
Parent(s):
9e8f5e5
Update app.py
Browse files
app.py
CHANGED
@@ -64,12 +64,6 @@ def swap_faces(source_image, source_face_index, destination_image, destination_f
|
|
64 |
result = swapper.get(destination_image, res_face, source_face, paste_back=True)
|
65 |
return result
|
66 |
|
67 |
-
async def generate_image(prompt, width, height, seed, model_name):
|
68 |
-
if seed == -1:
|
69 |
-
seed = PREDEFINED_SEED
|
70 |
-
image = await client.text_to_image(prompt=prompt, height=height, width=width, model=model_name)
|
71 |
-
return image, seed
|
72 |
-
|
73 |
async def gen(prompt, width, height, model_name):
|
74 |
seed = PREDEFINED_SEED
|
75 |
image, seed = await generate_image(prompt, width, height, seed, model_name)
|
|
|
64 |
result = swapper.get(destination_image, res_face, source_face, paste_back=True)
|
65 |
return result
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
async def gen(prompt, width, height, model_name):
|
68 |
seed = PREDEFINED_SEED
|
69 |
image, seed = await generate_image(prompt, width, height, seed, model_name)
|