Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,6 +18,10 @@ from withanyone.flux.pipeline import WithAnyonePipeline
|
|
| 18 |
from util import extract_moref, face_preserving_resize
|
| 19 |
import insightface
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
token = os.getenv("HF_KEY")
|
| 22 |
|
| 23 |
import subprocess
|
|
@@ -291,6 +295,7 @@ def create_demo(
|
|
| 291 |
|
| 292 |
return ref_imgs, arcface_embeddings, bboxes, viz_image
|
| 293 |
|
|
|
|
| 294 |
def process_and_generate(
|
| 295 |
prompt,
|
| 296 |
width, height,
|
|
|
|
| 18 |
from util import extract_moref, face_preserving_resize
|
| 19 |
import insightface
|
| 20 |
|
| 21 |
+
import spaces
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
|
| 25 |
token = os.getenv("HF_KEY")
|
| 26 |
|
| 27 |
import subprocess
|
|
|
|
| 295 |
|
| 296 |
return ref_imgs, arcface_embeddings, bboxes, viz_image
|
| 297 |
|
| 298 |
+
@spaces.GPU
|
| 299 |
def process_and_generate(
|
| 300 |
prompt,
|
| 301 |
width, height,
|