Spaces:
Running
on
Zero
Running
on
Zero
Rishi Desai
commited on
Commit
·
32c3b40
1
Parent(s):
9f37da3
updated req + spaces
Browse files- face_enhance.py +2 -2
- requirements.txt +2 -1
face_enhance.py
CHANGED
@@ -3,7 +3,7 @@ import random
|
|
3 |
import sys
|
4 |
from typing import Sequence, Mapping, Any, Union
|
5 |
import torch
|
6 |
-
|
7 |
COMFYUI_PATH = "./ComfyUI"
|
8 |
|
9 |
"""
|
@@ -313,7 +313,7 @@ def save_comfy_images(images, output_dirs):
|
|
313 |
pil_image = Image.fromarray(numpy_image)
|
314 |
pil_image.save(output_dirs[idx])
|
315 |
|
316 |
-
|
317 |
def face_enhance(face_image: str, input_image: str, output_image: str, dist_image: str = None, positive_prompt: str = "", id_weight: float = 0.75):
|
318 |
initialize_models() # Ensure models are loaded
|
319 |
main(face_image, input_image, output_image, dist_image, positive_prompt, id_weight)
|
|
|
3 |
import sys
|
4 |
from typing import Sequence, Mapping, Any, Union
|
5 |
import torch
|
6 |
+
import spaces
|
7 |
COMFYUI_PATH = "./ComfyUI"
|
8 |
|
9 |
"""
|
|
|
313 |
pil_image = Image.fromarray(numpy_image)
|
314 |
pil_image.save(output_dirs[idx])
|
315 |
|
316 |
+
@spaces.GPU
|
317 |
def face_enhance(face_image: str, input_image: str, output_image: str, dist_image: str = None, positive_prompt: str = "", id_weight: float = 0.75):
|
318 |
initialize_models() # Ensure models are loaded
|
319 |
main(face_image, input_image, output_image, dist_image, positive_prompt, id_weight)
|
requirements.txt
CHANGED
@@ -17,7 +17,8 @@ charset-normalizer==3.4.1
|
|
17 |
click==8.1.8
|
18 |
coloredlogs==15.0.1
|
19 |
comfy-cli==1.3.8
|
20 |
-
comfyui_frontend_package==1.
|
|
|
21 |
contourpy==1.3.2
|
22 |
cookiecutter==2.6.0
|
23 |
cryptography==44.0.2
|
|
|
17 |
click==8.1.8
|
18 |
coloredlogs==15.0.1
|
19 |
comfy-cli==1.3.8
|
20 |
+
comfyui_frontend_package==1.17.11
|
21 |
+
comfyui_workflow_templates==0.1.3
|
22 |
contourpy==1.3.2
|
23 |
cookiecutter==2.6.0
|
24 |
cryptography==44.0.2
|