Spaces:
Running
on
L40S
Running
on
L40S
Rishi Desai
commited on
Commit
·
1964f63
1
Parent(s):
7f4e1be
caching images with hash
Browse files- .gitignore +2 -1
- README.md +4 -4
- main.py +0 -7
.gitignore
CHANGED
@@ -3,4 +3,5 @@ venv
|
|
3 |
.idea/
|
4 |
.gradio/
|
5 |
__pycache__/
|
6 |
-
ComfyUI/
|
|
|
|
3 |
.idea/
|
4 |
.gradio/
|
5 |
__pycache__/
|
6 |
+
ComfyUI/
|
7 |
+
cache/
|
README.md
CHANGED
@@ -42,9 +42,9 @@ A tool for improving facial consistency and quality in AI-generated images. Dram
|
|
42 |
|
43 |
4. Run inference on one example:
|
44 |
|
45 |
-
```
|
46 |
-
python main.py --input examples/dany_gpt_1.png --ref examples/dany_face.jpg --out examples/dany_enhanced.png
|
47 |
-
```
|
48 |
|
49 |
## Running on ComfyUI
|
50 |
|
@@ -74,7 +74,7 @@ A simple web interface for the face enhancement workflow.
|
|
74 |
### Notes
|
75 |
- The script and demo run a ComfyUI server ephemerally
|
76 |
- Gradio demo is faster than the script because models remain loaded in memory
|
77 |
-
- All images are saved in
|
78 |
- Temporary files are created during processing and cleaned up afterward
|
79 |
|
80 |
### Troubleshooting
|
|
|
42 |
|
43 |
4. Run inference on one example:
|
44 |
|
45 |
+
```
|
46 |
+
python main.py --input examples/dany_gpt_1.png --ref examples/dany_face.jpg --out examples/dany_enhanced.png
|
47 |
+
```
|
48 |
|
49 |
## Running on ComfyUI
|
50 |
|
|
|
74 |
### Notes
|
75 |
- The script and demo run a ComfyUI server ephemerally
|
76 |
- Gradio demo is faster than the script because models remain loaded in memory
|
77 |
+
- All images are saved in `./ComfyUI/input/scratch/`
|
78 |
- Temporary files are created during processing and cleaned up afterward
|
79 |
|
80 |
### Troubleshooting
|
main.py
CHANGED
@@ -50,13 +50,6 @@ def create_scratch_dir():
|
|
50 |
def process_face(input_path, ref_path, crop=False, upscale=False, output_path=None, id_weight=0.75):
|
51 |
"""
|
52 |
Process a face image using the given parameters.
|
53 |
-
|
54 |
-
Args:
|
55 |
-
input_path (str): Path to the input image
|
56 |
-
ref_path (str): Path to the reference image
|
57 |
-
crop (bool): Whether to crop the image
|
58 |
-
upscale (bool): Whether to upscale the image
|
59 |
-
output_path (str): Path to save the output image
|
60 |
|
61 |
Returns:
|
62 |
str: Path to the scratch directory used for processing
|
|
|
50 |
def process_face(input_path, ref_path, crop=False, upscale=False, output_path=None, id_weight=0.75):
|
51 |
"""
|
52 |
Process a face image using the given parameters.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
Returns:
|
55 |
str: Path to the scratch directory used for processing
|