Spaces:
Paused
Paused
Update inference.py
Browse files- inference.py +3 -2
inference.py
CHANGED
@@ -50,6 +50,7 @@ def get_args():
|
|
50 |
parser.add_argument("--video_path", type=str, required=True, help="Path to a source video")
|
51 |
parser.add_argument("--output_path", type=str, default="./outputs", help="Directory of output")
|
52 |
parser.add_argument("--condition", type=str, default="depth", help="Condition of structure sequence")
|
|
|
53 |
parser.add_argument("--video_length", type=int, default=15, help="Length of synthesized video")
|
54 |
parser.add_argument("--height", type=int, default=512, help="Height of synthesized video, and should be a multiple of 32")
|
55 |
parser.add_argument("--width", type=int, default=512, help="Width of synthesized video, and should be a multiple of 32")
|
@@ -122,13 +123,13 @@ if __name__ == "__main__":
|
|
122 |
if args.is_long_video:
|
123 |
window_size = int(np.sqrt(args.video_length))
|
124 |
sample = pipe.generate_long_video(args.prompt + POS_PROMPT, video_length=args.video_length, frames=pil_annotation,
|
125 |
-
num_inference_steps=
|
126 |
generator=generator, guidance_scale=12.5, negative_prompt=NEG_PROMPT,
|
127 |
width=args.width, height=args.height
|
128 |
).videos
|
129 |
else:
|
130 |
sample = pipe(args.prompt + POS_PROMPT, video_length=args.video_length, frames=pil_annotation,
|
131 |
-
num_inference_steps=
|
132 |
generator=generator, guidance_scale=12.5, negative_prompt=NEG_PROMPT,
|
133 |
width=args.width, height=args.height
|
134 |
).videos
|
|
|
50 |
parser.add_argument("--video_path", type=str, required=True, help="Path to a source video")
|
51 |
parser.add_argument("--output_path", type=str, default="./outputs", help="Directory of output")
|
52 |
parser.add_argument("--condition", type=str, default="depth", help="Condition of structure sequence")
|
53 |
+
parser.add_argument("--inference_steps", type=int, default=25, help="Number of inference steps")
|
54 |
parser.add_argument("--video_length", type=int, default=15, help="Length of synthesized video")
|
55 |
parser.add_argument("--height", type=int, default=512, help="Height of synthesized video, and should be a multiple of 32")
|
56 |
parser.add_argument("--width", type=int, default=512, help="Width of synthesized video, and should be a multiple of 32")
|
|
|
123 |
if args.is_long_video:
|
124 |
window_size = int(np.sqrt(args.video_length))
|
125 |
sample = pipe.generate_long_video(args.prompt + POS_PROMPT, video_length=args.video_length, frames=pil_annotation,
|
126 |
+
num_inference_steps=args.inference_steps, smooth_steps=args.smoother_steps, window_size=window_size,
|
127 |
generator=generator, guidance_scale=12.5, negative_prompt=NEG_PROMPT,
|
128 |
width=args.width, height=args.height
|
129 |
).videos
|
130 |
else:
|
131 |
sample = pipe(args.prompt + POS_PROMPT, video_length=args.video_length, frames=pil_annotation,
|
132 |
+
num_inference_steps=args.inference_steps, smooth_steps=args.smoother_steps,
|
133 |
generator=generator, guidance_scale=12.5, negative_prompt=NEG_PROMPT,
|
134 |
width=args.width, height=args.height
|
135 |
).videos
|