Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -572,15 +572,15 @@ with gr.Blocks() as demo:
|
|
| 572 |
with gr.Tabs():
|
| 573 |
with gr.Tab("Merge to Base + Reshard Output"):
|
| 574 |
t1_token = gr.Textbox(label="Token", type="password")
|
| 575 |
-
t1_base = gr.Textbox(label="Base Repo", value="ostris/Z-Image-De-Turbo")
|
| 576 |
t1_sub = gr.Textbox(label="Subfolder", value="transformer")
|
| 577 |
-
t1_lora = gr.Textbox(label="LoRA")
|
| 578 |
with gr.Row():
|
| 579 |
t1_scale = gr.Slider(label="Scale", value=1.0, minimum=0, maximum=3.0, step=0.1)
|
| 580 |
t1_prec = gr.Radio(["bf16", "fp16", "float32"], value="bf16", label="Precision")
|
| 581 |
t1_shard = gr.Slider(label="Shard Size (GB)", value=2.0, minimum=0.1, maximum=10.0, step=0.1)
|
| 582 |
-
t1_out = gr.Textbox(label="Output")
|
| 583 |
-
t1_struct = gr.Textbox(label="Diffusers
|
| 584 |
t1_priv = gr.Checkbox(label="Private", value=True)
|
| 585 |
t1_btn = gr.Button("Merge")
|
| 586 |
t1_res = gr.Textbox(label="Result")
|
|
@@ -588,10 +588,10 @@ with gr.Blocks() as demo:
|
|
| 588 |
|
| 589 |
with gr.Tab("Extract Adapter"):
|
| 590 |
t2_token = gr.Textbox(label="Token", type="password")
|
| 591 |
-
t2_org = gr.Textbox(label="Original")
|
| 592 |
-
t2_tun = gr.Textbox(label="Tuned")
|
| 593 |
-
t2_rank = gr.Number(label="Rank", value=32, minimum=1, maximum=1024, step=1)
|
| 594 |
-
t2_out = gr.Textbox(label="Output")
|
| 595 |
t2_btn = gr.Button("Extract")
|
| 596 |
t2_res = gr.Textbox(label="Result")
|
| 597 |
t2_btn.click(task_extract, [t2_token, t2_org, t2_tun, t2_rank, t2_out], t2_res)
|
|
@@ -601,8 +601,8 @@ with gr.Blocks() as demo:
|
|
| 601 |
t3_urls = gr.Textbox(label="URLs")
|
| 602 |
with gr.Row():
|
| 603 |
t3_beta = gr.Slider(label="Beta", value=0.95, minimum=0.01, maximum=1.00, step=0.01)
|
| 604 |
-
t3_sigma = gr.Slider(label="Sigma Rel (Overrides Beta)", value=0.
|
| 605 |
-
t3_out = gr.Textbox(label="Output")
|
| 606 |
t3_btn = gr.Button("Merge")
|
| 607 |
t3_res = gr.Textbox(label="Result")
|
| 608 |
t3_btn.click(task_merge_adapters, [t3_token, t3_urls, t3_beta, t3_sigma, t3_out], t3_res)
|
|
@@ -611,7 +611,7 @@ with gr.Blocks() as demo:
|
|
| 611 |
t4_token = gr.Textbox(label="Token", type="password")
|
| 612 |
t4_in = gr.Textbox(label="LoRA")
|
| 613 |
with gr.Row():
|
| 614 |
-
t4_rank = gr.Number(label="Rank", value=8, minimum=1, maximum=256, step=1)
|
| 615 |
t4_method = gr.Dropdown(["None", "sv_ratio"], value="None", label="Dynamic Method")
|
| 616 |
t4_param = gr.Number(label="Dynamic Param", value=4.0)
|
| 617 |
t4_out = gr.Textbox(label="Output")
|
|
|
|
| 572 |
with gr.Tabs():
|
| 573 |
with gr.Tab("Merge to Base + Reshard Output"):
|
| 574 |
t1_token = gr.Textbox(label="Token", type="password")
|
| 575 |
+
t1_base = gr.Textbox(label="Base Repo (Diffusers)", value="ostris/Z-Image-De-Turbo")
|
| 576 |
t1_sub = gr.Textbox(label="Subfolder", value="transformer")
|
| 577 |
+
t1_lora = gr.Textbox(label="LoRA Direct Link", value="https://huggingface.co/GuangyuanSD/Z-Image-Re-Turbo-LoRA/resolve/main/Z-image_re_turbo_lora_8steps_rank_32_v1_fp16.safetensors")
|
| 578 |
with gr.Row():
|
| 579 |
t1_scale = gr.Slider(label="Scale", value=1.0, minimum=0, maximum=3.0, step=0.1)
|
| 580 |
t1_prec = gr.Radio(["bf16", "fp16", "float32"], value="bf16", label="Precision")
|
| 581 |
t1_shard = gr.Slider(label="Shard Size (GB)", value=2.0, minimum=0.1, maximum=10.0, step=0.1)
|
| 582 |
+
t1_out = gr.Textbox(label="Output Repo")
|
| 583 |
+
t1_struct = gr.Textbox(label="Diffusers Extras (Copies VAE/TextEnc/etc)", value="Tongyi-MAI/Z-Image-Turbo")
|
| 584 |
t1_priv = gr.Checkbox(label="Private", value=True)
|
| 585 |
t1_btn = gr.Button("Merge")
|
| 586 |
t1_res = gr.Textbox(label="Result")
|
|
|
|
| 588 |
|
| 589 |
with gr.Tab("Extract Adapter"):
|
| 590 |
t2_token = gr.Textbox(label="Token", type="password")
|
| 591 |
+
t2_org = gr.Textbox(label="Original Model")
|
| 592 |
+
t2_tun = gr.Textbox(label="Tuned Model")
|
| 593 |
+
t2_rank = gr.Number(label="Extract At Rank", value=32, minimum=1, maximum=1024, step=1)
|
| 594 |
+
t2_out = gr.Textbox(label="Output Repo")
|
| 595 |
t2_btn = gr.Button("Extract")
|
| 596 |
t2_res = gr.Textbox(label="Result")
|
| 597 |
t2_btn.click(task_extract, [t2_token, t2_org, t2_tun, t2_rank, t2_out], t2_res)
|
|
|
|
| 601 |
t3_urls = gr.Textbox(label="URLs")
|
| 602 |
with gr.Row():
|
| 603 |
t3_beta = gr.Slider(label="Beta", value=0.95, minimum=0.01, maximum=1.00, step=0.01)
|
| 604 |
+
t3_sigma = gr.Slider(label="Sigma Rel (Overrides Beta)", value=0.21, minimum=0.01, maximum=1.00, step=0.01)
|
| 605 |
+
t3_out = gr.Textbox(label="Output Repo")
|
| 606 |
t3_btn = gr.Button("Merge")
|
| 607 |
t3_res = gr.Textbox(label="Result")
|
| 608 |
t3_btn.click(task_merge_adapters, [t3_token, t3_urls, t3_beta, t3_sigma, t3_out], t3_res)
|
|
|
|
| 611 |
t4_token = gr.Textbox(label="Token", type="password")
|
| 612 |
t4_in = gr.Textbox(label="LoRA")
|
| 613 |
with gr.Row():
|
| 614 |
+
t4_rank = gr.Number(label="To Rank (Lower Only!)", value=8, minimum=1, maximum=256, step=1)
|
| 615 |
t4_method = gr.Dropdown(["None", "sv_ratio"], value="None", label="Dynamic Method")
|
| 616 |
t4_param = gr.Number(label="Dynamic Param", value=4.0)
|
| 617 |
t4_out = gr.Textbox(label="Output")
|