Upload 2 files
Browse files- app.py +4 -9
- requirements.txt +1 -0
app.py
CHANGED
@@ -196,20 +196,15 @@ with gr.Blocks(title="PTH to ONNX Converter") as demo:
|
|
196 |
install()
|
197 |
spandrel_extra_arches.install()
|
198 |
|
199 |
-
gr.Textbox(value="This tool is still in development. Outputs may be incorrect.", label="Notice")
|
200 |
-
# with gr.Accordion("Model Cheat Sheet", open=False):
|
201 |
-
# gr.Markdown("""
|
202 |
-
# After converting a model, be sure to click the log button above to check the output for any errors or warnings.
|
203 |
-
# """)
|
204 |
-
|
205 |
file_upload = gr.File(label="Upload a PyTorch model", file_types=['.pth', '.pt', '.safetensors'])
|
206 |
metadata = gr.Textbox(value="Ready", label="File Information")
|
207 |
|
208 |
dropdown_opset = gr.Dropdown(choices=[17, 18, 19, 20], value=20, label="Opset")
|
209 |
-
radio_fp16 = gr.Radio(choices=["True", "False"], value="False", label="FP16 -
|
210 |
-
radio_static = gr.Radio(choices=["True", "False"], value="False", label="Static Shapes -
|
211 |
-
radio_slim = gr.Radio(choices=["True", "False"], value="False", label="OnnxSlim - Can
|
212 |
|
|
|
213 |
process_button = gr.Button("Convert", interactive=True)
|
214 |
file_output = gr.DownloadButton(label="💾 Download Converted Model", visible=False)
|
215 |
|
|
|
196 |
install()
|
197 |
spandrel_extra_arches.install()
|
198 |
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
file_upload = gr.File(label="Upload a PyTorch model", file_types=['.pth', '.pt', '.safetensors'])
|
200 |
metadata = gr.Textbox(value="Ready", label="File Information")
|
201 |
|
202 |
dropdown_opset = gr.Dropdown(choices=[17, 18, 19, 20], value=20, label="Opset")
|
203 |
+
radio_fp16 = gr.Radio(choices=["True", "False"], value="False", label="FP16 - Not supported by all models. Not very useful because FP16 TRT engines can still be built from FP32 ONNX models.")
|
204 |
+
radio_static = gr.Radio(choices=["True", "False"], value="False", label="Static Shapes - Might be required by some models, but can cause slower performance.")
|
205 |
+
radio_slim = gr.Radio(choices=["True", "False"], value="False", label="OnnxSlim - Can cause issues in some models. I have not yet found any cases where it helps. May remove in the future.")
|
206 |
|
207 |
+
gr.Markdown("After converting, click the logs button at the top to check for any errors or warnings.")
|
208 |
process_button = gr.Button("Convert", interactive=True)
|
209 |
file_output = gr.DownloadButton(label="💾 Download Converted Model", visible=False)
|
210 |
|
requirements.txt
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
spandrel>=0.4.1
|
2 |
spandrel-extra-arches>=0.2.0
|
3 |
torch>=2.7.1
|
|
|
4 |
gradio
|
5 |
onnx
|
6 |
onnxruntime
|
|
|
1 |
spandrel>=0.4.1
|
2 |
spandrel-extra-arches>=0.2.0
|
3 |
torch>=2.7.1
|
4 |
+
numpy==2.2.6
|
5 |
gradio
|
6 |
onnx
|
7 |
onnxruntime
|