run
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title: Flux
|
3 |
emoji: 🔥
|
4 |
colorFrom: green
|
5 |
colorTo: yellow
|
|
|
1 |
---
|
2 |
+
title: Flux IP Face Adapter
|
3 |
emoji: 🔥
|
4 |
colorFrom: green
|
5 |
colorTo: yellow
|
app.py
CHANGED
@@ -102,7 +102,7 @@ pipe = FluxInpaintPipeline.from_pretrained(bfl_repo, torch_dtype=torch.bfloat16)
|
|
102 |
MAX_SEED = np.iinfo(np.int32).max
|
103 |
TRIGGER = "a photo of TOK"
|
104 |
|
105 |
-
@spaces.GPU()
|
106 |
def execute(image, prompt):
|
107 |
if not prompt :
|
108 |
gr.Info("Please enter a text prompt.")
|
@@ -146,15 +146,13 @@ def execute(image, prompt):
|
|
146 |
max_sequence_length=256,
|
147 |
joint_attention_kwargs={"scale": 0.9},
|
148 |
).images[0]
|
149 |
-
response.append(mask)
|
150 |
-
response.append(im)
|
151 |
response.append(result)
|
152 |
|
153 |
return response
|
154 |
|
155 |
# Created by Fountai
|
156 |
# https://x.com/EuFountai
|
157 |
-
description = "This is an unofficial implementation of the ip face adapter for FLUX DEV and does not explicitly follow the ip face model, I created a wrapper with inpaint and mediapipe, I like
|
158 |
title = "Flux IP Face Adapter"
|
159 |
iface = gr.Interface(
|
160 |
fn=execute,
|
|
|
102 |
MAX_SEED = np.iinfo(np.int32).max
|
103 |
TRIGGER = "a photo of TOK"
|
104 |
|
105 |
+
@spaces.GPU(duration=100)
|
106 |
def execute(image, prompt):
|
107 |
if not prompt :
|
108 |
gr.Info("Please enter a text prompt.")
|
|
|
146 |
max_sequence_length=256,
|
147 |
joint_attention_kwargs={"scale": 0.9},
|
148 |
).images[0]
|
|
|
|
|
149 |
response.append(result)
|
150 |
|
151 |
return response
|
152 |
|
153 |
# Created by Fountai
|
154 |
# https://x.com/EuFountai
|
155 |
+
description = "This is an unofficial implementation of the ip face adapter for FLUX DEV and does not explicitly follow the ip face model, I created a wrapper with inpaint and mediapipe, I like to call Fake IP Adapter"
|
156 |
title = "Flux IP Face Adapter"
|
157 |
iface = gr.Interface(
|
158 |
fn=execute,
|