Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -298,25 +298,13 @@ def generate_image(
|
|
298 |
|
299 |
return edited, str(opts.seed), flux_generator.pulid_model.debug_img_list
|
300 |
|
301 |
-
# <p style="font-size: 1rem; margin-bottom: 1.5rem;">Paper: <a href='https://arxiv.org/abs/2404.16022' target='_blank'>PuLID: Pure and Lightning ID Customization via Contrastive Alignment</a> | Codes: <a href='https://github.com/ToTheBeginning/PuLID' target='_blank'>GitHub</a></p>
|
302 |
-
_HEADER_ = '''
|
303 |
-
<div style="text-align: center; max-width: 650px; margin: 0 auto;">
|
304 |
-
<h1 style="font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; display: contents;">Tight Inversion for Portrait Editing with FLUX</h1>
|
305 |
-
</div>
|
306 |
|
307 |
-
Provide a portrait image and an edit prompt. You can try the examples below or upload your own image.
|
308 |
-
Adjust the id weight to control the faithfulness of the generated image to the input image.
|
309 |
-
Reduce the id weight and increase guidance/true CFG scale to increase prompt adherence.
|
310 |
-
''' # noqa E501
|
311 |
-
_CITE_ = r"""
|
312 |
-
""" # noqa E501
|
313 |
|
314 |
|
315 |
def create_demo(args, model_name: str, device: str = "cuda" if torch.cuda.is_available() else "cpu",
|
316 |
offload: bool = False, aggressive_offload: bool = False):
|
317 |
|
318 |
-
with gr.Blocks() as demo:
|
319 |
-
gr.Markdown(_HEADER_)
|
320 |
|
321 |
with gr.Row():
|
322 |
with gr.Column():
|
|
|
298 |
|
299 |
return edited, str(opts.seed), flux_generator.pulid_model.debug_img_list
|
300 |
|
|
|
|
|
|
|
|
|
|
|
301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
|
303 |
|
304 |
def create_demo(args, model_name: str, device: str = "cuda" if torch.cuda.is_available() else "cpu",
|
305 |
offload: bool = False, aggressive_offload: bool = False):
|
306 |
|
307 |
+
with gr.Blocks(theme = "apriel") as demo:
|
|
|
308 |
|
309 |
with gr.Row():
|
310 |
with gr.Column():
|