mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-27 08:58:13 +00:00
change output dir param name
This commit is contained in:
@@ -150,7 +150,7 @@ def parse_args():
|
|||||||
|
|
||||||
# TODO FIX
|
# TODO FIX
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--output_dir",
|
"--frame_output_dir",
|
||||||
type=str,
|
type=str,
|
||||||
default=None,
|
default=None,
|
||||||
required=True
|
required=True
|
||||||
@@ -438,7 +438,7 @@ if __name__ == "__main__":
|
|||||||
face_encoder=face_encoder,
|
face_encoder=face_encoder,
|
||||||
).to(device='cuda', dtype=weight_dtype)
|
).to(device='cuda', dtype=weight_dtype)
|
||||||
|
|
||||||
os.makedirs(args.output_dir, exist_ok=True)
|
os.makedirs(args.frame_output_dir, exist_ok=True)
|
||||||
|
|
||||||
pose_images = prepare_pose_frames(args)
|
pose_images = prepare_pose_frames(args)
|
||||||
num_frames = len(pose_images)
|
num_frames = len(pose_images)
|
||||||
@@ -492,14 +492,14 @@ if __name__ == "__main__":
|
|||||||
).frames[0]
|
).frames[0]
|
||||||
|
|
||||||
out_file = os.path.join(
|
out_file = os.path.join(
|
||||||
args.output_dir,
|
args.frame_output_dir,
|
||||||
f"animation_video.mp4",
|
f"animation_video.mp4",
|
||||||
)
|
)
|
||||||
for i in range(num_frames):
|
for i in range(num_frames):
|
||||||
img = video_frames[i]
|
img = video_frames[i]
|
||||||
video_frames[i] = np.array(img)
|
video_frames[i] = np.array(img)
|
||||||
|
|
||||||
png_out_file = os.path.join(args.output_dir, "animated_images")
|
png_out_file = os.path.join(args.frame_output_dir, "animated_images")
|
||||||
os.makedirs(png_out_file, exist_ok=True)
|
os.makedirs(png_out_file, exist_ok=True)
|
||||||
export_to_gif(video_frames, out_file, 8)
|
export_to_gif(video_frames, out_file, 8)
|
||||||
save_frames_as_png(video_frames, png_out_file)
|
save_frames_as_png(video_frames, png_out_file)
|
||||||
|
|||||||
Reference in New Issue
Block a user