Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions demo/animate.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def __init__(self, config="configs/prompts/animation.yaml") -> None:

print("Initialization Done!")

def __call__(self, source_image, motion_sequence, random_seed, step, guidance_scale, size=512):
def __call__(self, source_image, motion_sequence, random_seed, step, guidance_scale, size=512, savedir = f"demo/outputs"):
prompt = n_prompt = ""
random_seed = int(random_seed)
step = int(step)
Expand Down Expand Up @@ -185,11 +185,10 @@ def __call__(self, source_image, motion_sequence, random_seed, step, guidance_sc
samples_per_video = torch.cat(samples_per_video)

time_str = datetime.datetime.now().strftime("%Y-%m-%dT%H-%M-%S")
savedir = f"demo/outputs"
animation_path = f"{savedir}/{time_str}.mp4"

os.makedirs(savedir, exist_ok=True)
save_videos_grid(samples_per_video, animation_path)

return animation_path