fearflixai / animation.py
LittleLirow's picture
Update video save path
7f53786
raw
history blame
550 Bytes
import os
import replicate
from urllib.request import urlretrieve
def story2video(story_text, story_frames, auth_replicate):
os.environ["REPLICATE_API_TOKEN"] = auth_replicate
output = replicate.run(
"deforum/deforum_stable_diffusion:e22e77495f2fb83c34d5fae2ad8ab63c0a87b6b573b6208e1535b23b89ea66d6",
input={"max_frames": story_frames,
"model_checkpoint": "Protogen_V2.2.ckpt","animation_prompts": story_text,
"fps": 10
}
)
urlretrieve(output, 'video_out.mp4')
return output