Spaces:
Running on Zero
Running on Zero
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -69,11 +69,12 @@ def run_quantization(
|
|
| 69 |
elif layer_filter == "Radiance": quant_args["nerf_large"] = True; quant_args["radiance"] = True
|
| 70 |
elif layer_filter == "WAN": quant_args["wan"] = True
|
| 71 |
elif layer_filter == "LTX-2.x": quant_args["ltxv2"] = True
|
| 72 |
-
elif layer_filter == "Qwen Image":
|
| 73 |
-
quant_args["qwen"] = True
|
| 74 |
-
if full_precision_matrix_mult: quant_args["full_precision_matrix_mult"] = True
|
| 75 |
elif layer_filter == "Z-Image": quant_args["zimage"] = True; quant_args["zimage_refiner"] = True
|
| 76 |
|
|
|
|
|
|
|
|
|
|
| 77 |
if exclude_layers_regex:
|
| 78 |
quant_args["exclude-layers"] = exclude_layers_regex
|
| 79 |
|
|
@@ -131,11 +132,7 @@ with gr.Blocks() as demo:
|
|
| 131 |
["None", "Anima", "Microsoft Lens", "Flux2", "Chroma", "Radiance", "WAN", "LTX-2.x", "Qwen Image", "Z-Image"],
|
| 132 |
value="None", label="Model Layer Filter"
|
| 133 |
)
|
| 134 |
-
full_precision = gr.Checkbox(label="
|
| 135 |
-
|
| 136 |
-
def update_qwen_visibility(selection):
|
| 137 |
-
return gr.update(visible=selection == "Qwen Image")
|
| 138 |
-
layer_filter.change(fn=update_qwen_visibility, inputs=layer_filter, outputs=full_precision)
|
| 139 |
|
| 140 |
exclude_layers = gr.Textbox(label="Exclude Layers Regex (Optional)", placeholder="(substring_1|substring_2)")
|
| 141 |
|
|
|
|
| 69 |
elif layer_filter == "Radiance": quant_args["nerf_large"] = True; quant_args["radiance"] = True
|
| 70 |
elif layer_filter == "WAN": quant_args["wan"] = True
|
| 71 |
elif layer_filter == "LTX-2.x": quant_args["ltxv2"] = True
|
| 72 |
+
elif layer_filter == "Qwen Image": quant_args["qwen"] = True
|
|
|
|
|
|
|
| 73 |
elif layer_filter == "Z-Image": quant_args["zimage"] = True; quant_args["zimage_refiner"] = True
|
| 74 |
|
| 75 |
+
if full_precision_matrix_mult:
|
| 76 |
+
quant_args["full_precision_matrix_mult"] = True
|
| 77 |
+
|
| 78 |
if exclude_layers_regex:
|
| 79 |
quant_args["exclude-layers"] = exclude_layers_regex
|
| 80 |
|
|
|
|
| 132 |
["None", "Anima", "Microsoft Lens", "Flux2", "Chroma", "Radiance", "WAN", "LTX-2.x", "Qwen Image", "Z-Image"],
|
| 133 |
value="None", label="Model Layer Filter"
|
| 134 |
)
|
| 135 |
+
full_precision = gr.Checkbox(label="Full precision matrix multiplication", value=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
|
| 137 |
exclude_layers = gr.Textbox(label="Exclude Layers Regex (Optional)", placeholder="(substring_1|substring_2)")
|
| 138 |
|