File size: 476 Bytes
7fab996
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import os
import replicate

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
              }
    )
    return output