Spaces:
Running
on
Zero
Running
on
Zero
刘虹雨
commited on
Commit
·
626d0b4
1
Parent(s):
2b28eee
update code
Browse files
app.py
CHANGED
|
@@ -153,7 +153,7 @@ def get_args():
|
|
| 153 |
parser.add_argument("--sampling_algo", type=str, default="dpm-solver",
|
| 154 |
choices=["iddpm", "dpm-solver"],
|
| 155 |
help="Sampling algorithm to be used.")
|
| 156 |
-
parser.add_argument("--seed", type=int, default=
|
| 157 |
help="Random seed for reproducibility.")
|
| 158 |
# parser.add_argument("--select_img", type=str, default=None,
|
| 159 |
# help="Optional: Select a specific image.")
|
|
@@ -358,8 +358,6 @@ def launch_pretrained():
|
|
| 358 |
)
|
| 359 |
logging.info("delete models.")
|
| 360 |
|
| 361 |
-
os.remove('./pretrained_model/sd21/v2-1_512-ema-pruned.ckpt')
|
| 362 |
-
os.remove('./pretrained_model/sd21/v2-1_512-nonema-pruned.ckpt')
|
| 363 |
|
| 364 |
# 下载 CrucibleAI/ControlNetMediaPipeFace 的所有文件
|
| 365 |
snapshot_download(
|
|
@@ -852,7 +850,6 @@ def launch_gradio_app():
|
|
| 852 |
is_styled = gr.State(value=False)
|
| 853 |
working_dir = gr.State()
|
| 854 |
image_name_true = gr.State()
|
| 855 |
-
error_box = gr.Textbox(label="error hint", lines=3, interactive=False, visible=True)
|
| 856 |
|
| 857 |
|
| 858 |
with gr.Row():
|
|
|
|
| 153 |
parser.add_argument("--sampling_algo", type=str, default="dpm-solver",
|
| 154 |
choices=["iddpm", "dpm-solver"],
|
| 155 |
help="Sampling algorithm to be used.")
|
| 156 |
+
parser.add_argument("--seed", type=int, default=42,
|
| 157 |
help="Random seed for reproducibility.")
|
| 158 |
# parser.add_argument("--select_img", type=str, default=None,
|
| 159 |
# help="Optional: Select a specific image.")
|
|
|
|
| 358 |
)
|
| 359 |
logging.info("delete models.")
|
| 360 |
|
|
|
|
|
|
|
| 361 |
|
| 362 |
# 下载 CrucibleAI/ControlNetMediaPipeFace 的所有文件
|
| 363 |
snapshot_download(
|
|
|
|
| 850 |
is_styled = gr.State(value=False)
|
| 851 |
working_dir = gr.State()
|
| 852 |
image_name_true = gr.State()
|
|
|
|
| 853 |
|
| 854 |
|
| 855 |
with gr.Row():
|