Spaces:
Runtime error
Runtime error
Commit
β’
544fa37
1
Parent(s):
8340be4
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,6 @@ from insightface.app import FaceAnalysis
|
|
7 |
|
8 |
|
9 |
app = FaceAnalysis(name="buffalo_l", providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
|
10 |
-
app.prepare(ctx_id=0, det_size=(640, 640))
|
11 |
|
12 |
base_model_path = "SG161222/Realistic_Vision_V4.0_noVAE"
|
13 |
vae_model_path = "stabilityai/sd-vae-ft-mse"
|
@@ -44,6 +43,7 @@ def generate_faceid_embeddings(image):
|
|
44 |
|
45 |
@spaces.GPU
|
46 |
def generate_image(image, prompt, negative_prompt):
|
|
|
47 |
pipe.to(device)
|
48 |
faceid_embeds = generate_faceid_embeddings(image)
|
49 |
images = ip_model.generate(
|
|
|
7 |
|
8 |
|
9 |
app = FaceAnalysis(name="buffalo_l", providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
|
|
|
10 |
|
11 |
base_model_path = "SG161222/Realistic_Vision_V4.0_noVAE"
|
12 |
vae_model_path = "stabilityai/sd-vae-ft-mse"
|
|
|
43 |
|
44 |
@spaces.GPU
|
45 |
def generate_image(image, prompt, negative_prompt):
|
46 |
+
app.prepare(ctx_id=0, det_size=(640, 640))
|
47 |
pipe.to(device)
|
48 |
faceid_embeds = generate_faceid_embeddings(image)
|
49 |
images = ip_model.generate(
|