Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,7 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
| 36 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 37 |
dtype = torch.float16 if str(device).__contains__("cuda") else torch.float32
|
| 38 |
STYLE_NAMES = list(styles.keys())
|
| 39 |
-
DEFAULT_STYLE_NAME = "
|
| 40 |
enable_lcm_arg = False
|
| 41 |
|
| 42 |
# download checkpoints
|
|
@@ -498,10 +498,11 @@ with gr.Blocks(css=css) as demo:
|
|
| 498 |
)
|
| 499 |
|
| 500 |
submit = gr.Button("Submit", variant="primary")
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
|
|
|
| 505 |
style = gr.Dropdown(
|
| 506 |
label="Style template",
|
| 507 |
choices=STYLE_NAMES,
|
|
@@ -509,20 +510,20 @@ with gr.Blocks(css=css) as demo:
|
|
| 509 |
)
|
| 510 |
|
| 511 |
# strength
|
| 512 |
-
identitynet_strength_ratio = gr.Slider(
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
| 517 |
-
|
| 518 |
-
)
|
| 519 |
-
adapter_strength_ratio = gr.Slider(
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
)
|
| 526 |
with gr.Accordion("Controlnet"):
|
| 527 |
controlnet_selection = gr.CheckboxGroup(
|
| 528 |
["pose", "canny", "depth"], label="Controlnet", value=["pose"],
|
|
|
|
| 36 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 37 |
dtype = torch.float16 if str(device).__contains__("cuda") else torch.float32
|
| 38 |
STYLE_NAMES = list(styles.keys())
|
| 39 |
+
DEFAULT_STYLE_NAME = "(No Style)"
|
| 40 |
enable_lcm_arg = False
|
| 41 |
|
| 42 |
# download checkpoints
|
|
|
|
| 498 |
)
|
| 499 |
|
| 500 |
submit = gr.Button("Submit", variant="primary")
|
| 501 |
+
|
| 502 |
+
# enable_LCM = gr.Checkbox(
|
| 503 |
+
# label="Enable Fast Inference with LCM", value=enable_lcm_arg,
|
| 504 |
+
# info="LCM speeds up the inference step, the trade-off is the quality of the generated image. It performs better with portrait face images rather than distant faces",
|
| 505 |
+
# )
|
| 506 |
style = gr.Dropdown(
|
| 507 |
label="Style template",
|
| 508 |
choices=STYLE_NAMES,
|
|
|
|
| 510 |
)
|
| 511 |
|
| 512 |
# strength
|
| 513 |
+
# identitynet_strength_ratio = gr.Slider(
|
| 514 |
+
# label="IdentityNet strength (for fidelity)",
|
| 515 |
+
# minimum=0,
|
| 516 |
+
# maximum=1.5,
|
| 517 |
+
# step=0.05,
|
| 518 |
+
# value=0.80,
|
| 519 |
+
# )
|
| 520 |
+
# adapter_strength_ratio = gr.Slider(
|
| 521 |
+
# label="Image adapter strength (for detail)",
|
| 522 |
+
# minimum=0,
|
| 523 |
+
# maximum=1.5,
|
| 524 |
+
# step=0.05,
|
| 525 |
+
# value=0.80,
|
| 526 |
+
# )
|
| 527 |
with gr.Accordion("Controlnet"):
|
| 528 |
controlnet_selection = gr.CheckboxGroup(
|
| 529 |
["pose", "canny", "depth"], label="Controlnet", value=["pose"],
|