support MODEL_TYPE from ENV
This commit is contained in:
3
main.py
3
main.py
@@ -103,8 +103,9 @@ def main():
|
|||||||
parser.add_argument("--outdir", required=True, help="图片输出目录")
|
parser.add_argument("--outdir", required=True, help="图片输出目录")
|
||||||
parser.add_argument("--device", default="cuda", help="推理设备")
|
parser.add_argument("--device", default="cuda", help="推理设备")
|
||||||
parser.add_argument("--dtype", default="fp16", choices=["fp16", "fp32"], help="推理精度")
|
parser.add_argument("--dtype", default="fp16", choices=["fp16", "fp32"], help="推理精度")
|
||||||
parser.add_argument("--model_type", default="text-to-video-synthesis", choices=["text-to-video-synthesis", "text-to-video-ms"], help="模型类型")
|
parser.add_argument("--model_type", default=os.getenv("MODEL_TYPE", "text-to-video-synthesis"), choices=["text-to-video-synthesis", "text-to-video-ms"], help="模型类型")
|
||||||
args, _ = parser.parse_known_args()
|
args, _ = parser.parse_known_args()
|
||||||
|
print("参数:", args)
|
||||||
|
|
||||||
model_path = args.model
|
model_path = args.model
|
||||||
json_path = Path(args.json)
|
json_path = Path(args.json)
|
||||||
|
|||||||
Reference in New Issue
Block a user