Upload export_all.py with huggingface_hub
Browse files- export_all.py +10 -4
export_all.py
CHANGED
|
@@ -35,6 +35,12 @@ def main():
|
|
| 35 |
default="onnx_models",
|
| 36 |
help="Output directory for ONNX models",
|
| 37 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
parser.add_argument(
|
| 39 |
"--verify",
|
| 40 |
action="store_true",
|
|
@@ -69,28 +75,28 @@ def main():
|
|
| 69 |
|
| 70 |
# Export DACVAE
|
| 71 |
if not args.skip_dacvae:
|
| 72 |
-
export_args = ["--output-dir", args.output_dir]
|
| 73 |
if args.verify:
|
| 74 |
export_args.append("--verify")
|
| 75 |
results["DACVAE"] = run_export("onnx_export.export_dacvae", export_args)
|
| 76 |
|
| 77 |
# Export T5
|
| 78 |
if not args.skip_t5:
|
| 79 |
-
export_args = ["--output-dir", args.output_dir]
|
| 80 |
if args.verify:
|
| 81 |
export_args.append("--verify")
|
| 82 |
results["T5"] = run_export("onnx_export.export_t5", export_args)
|
| 83 |
|
| 84 |
# Export DiT
|
| 85 |
if not args.skip_dit:
|
| 86 |
-
export_args = ["--output-dir", args.output_dir]
|
| 87 |
if args.verify:
|
| 88 |
export_args.append("--verify")
|
| 89 |
results["DiT"] = run_export("onnx_export.export_dit", export_args)
|
| 90 |
|
| 91 |
# Export Vision Encoder
|
| 92 |
if not args.skip_vision:
|
| 93 |
-
export_args = ["--output", args.output_dir]
|
| 94 |
results["Vision"] = run_export("onnx_export.export_vision", export_args)
|
| 95 |
|
| 96 |
# Print summary
|
|
|
|
| 35 |
default="onnx_models",
|
| 36 |
help="Output directory for ONNX models",
|
| 37 |
)
|
| 38 |
+
parser.add_argument(
|
| 39 |
+
"--model",
|
| 40 |
+
type=str,
|
| 41 |
+
default="facebook/sam-audio-small",
|
| 42 |
+
help="SAM-Audio model ID (e.g., facebook/sam-audio-small, facebook/sam-audio-large, facebook/sam-audio-base-tv)",
|
| 43 |
+
)
|
| 44 |
parser.add_argument(
|
| 45 |
"--verify",
|
| 46 |
action="store_true",
|
|
|
|
| 75 |
|
| 76 |
# Export DACVAE
|
| 77 |
if not args.skip_dacvae:
|
| 78 |
+
export_args = ["--output-dir", args.output_dir, "--model-id", args.model]
|
| 79 |
if args.verify:
|
| 80 |
export_args.append("--verify")
|
| 81 |
results["DACVAE"] = run_export("onnx_export.export_dacvae", export_args)
|
| 82 |
|
| 83 |
# Export T5
|
| 84 |
if not args.skip_t5:
|
| 85 |
+
export_args = ["--output-dir", args.output_dir, "--model-id", args.model]
|
| 86 |
if args.verify:
|
| 87 |
export_args.append("--verify")
|
| 88 |
results["T5"] = run_export("onnx_export.export_t5", export_args)
|
| 89 |
|
| 90 |
# Export DiT
|
| 91 |
if not args.skip_dit:
|
| 92 |
+
export_args = ["--output-dir", args.output_dir, "--model-id", args.model]
|
| 93 |
if args.verify:
|
| 94 |
export_args.append("--verify")
|
| 95 |
results["DiT"] = run_export("onnx_export.export_dit", export_args)
|
| 96 |
|
| 97 |
# Export Vision Encoder
|
| 98 |
if not args.skip_vision:
|
| 99 |
+
export_args = ["--output", args.output_dir, "--model", args.model]
|
| 100 |
results["Vision"] = run_export("onnx_export.export_vision", export_args)
|
| 101 |
|
| 102 |
# Print summary
|