Because the windows file name cannot have an *, replace the * with an x

This commit is contained in:
zhizhen man 2025-03-07 00:06:18 +08:00
parent 9e47cce40f
commit 929dbc135e

View File

@ -384,7 +384,7 @@ def generate(args):
formatted_prompt = args.prompt.replace(" ", "_").replace("/",
"_")[:50]
suffix = '.png' if "t2i" in args.task else '.mp4'
safe_size = args.size.replace("*", "x")
safe_size = args.size.replace("*", "x") if os.name == 'nt' else args.size
args.save_file = f"{args.task}_{safe_size}_{args.ulysses_size}_{args.ring_size}_{formatted_prompt}_{formatted_time}" + suffix
if "t2i" in args.task: