Spaces:
Running
on
Zero
Running
on
Zero
tight-inversion
commited on
Commit
·
96d6ca3
1
Parent(s):
fb46df5
Adjust maximum execution time
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ class FluxGenerator:
|
|
46 |
flux_generator = FluxGenerator()
|
47 |
|
48 |
|
49 |
-
@spaces.GPU(duration=
|
50 |
@torch.inference_mode()
|
51 |
def generate_image(
|
52 |
prompt: str,
|
@@ -306,6 +306,7 @@ _HEADER_ = '''
|
|
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 |
''' # noqa E501
|
310 |
_CITE_ = r"""
|
311 |
""" # noqa E501
|
@@ -325,7 +326,7 @@ def create_demo(args, model_name: str, device: str = "cuda" if torch.cuda.is_ava
|
|
325 |
|
326 |
width = gr.Slider(256, 1536, 1024, step=16, label="Width", visible=args.dev)
|
327 |
height = gr.Slider(256, 1536, 1024, step=16, label="Height", visible=args.dev)
|
328 |
-
num_steps = gr.Slider(1,
|
329 |
guidance = gr.Slider(1.0, 10.0, 3.5, step=0.1, label="Guidance")
|
330 |
|
331 |
with gr.Accordion("Advanced Options (True CFG, true_cfg_scale=1 means use fake CFG, >1 means use true CFG", open=False): # noqa E501
|
|
|
46 |
flux_generator = FluxGenerator()
|
47 |
|
48 |
|
49 |
+
@spaces.GPU(duration=120)
|
50 |
@torch.inference_mode()
|
51 |
def generate_image(
|
52 |
prompt: str,
|
|
|
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
|
|
|
326 |
|
327 |
width = gr.Slider(256, 1536, 1024, step=16, label="Width", visible=args.dev)
|
328 |
height = gr.Slider(256, 1536, 1024, step=16, label="Height", visible=args.dev)
|
329 |
+
num_steps = gr.Slider(1, 24, 16, step=1, label="Number of steps")
|
330 |
guidance = gr.Slider(1.0, 10.0, 3.5, step=0.1, label="Guidance")
|
331 |
|
332 |
with gr.Accordion("Advanced Options (True CFG, true_cfg_scale=1 means use fake CFG, >1 means use true CFG", open=False): # noqa E501
|