1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import requests
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/tooncrafter"
# Prepare data and files
data = {}
files = {}
data['loop'] = False
data['seed'] = 42
data['prompt'] = "cartoon character animation"
# For parameter "image_1", you can send a raw file or a URI:
# files['image_1'] = open('IMAGE_PATH', 'rb') # To send a file
# data['image_1'] = 'IMAGE_URI' # To send a URI
# For parameter "image_2", you can send a raw file or a URI:
# files['image_2'] = open('IMAGE_PATH', 'rb') # To send a file
# data['image_2'] = 'IMAGE_URI' # To send a URI
# For parameter "image_3", you can send a raw file or a URI:
# files['image_3'] = open('IMAGE_PATH', 'rb') # To send a file
# data['image_3'] = 'IMAGE_URI' # To send a URI
# For parameter "image_4", you can send a raw file or a URI:
# files['image_4'] = open('IMAGE_PATH', 'rb') # To send a file
# data['image_4'] = 'IMAGE_URI' # To send a URI
# For parameter "image_5", you can send a raw file or a URI:
# files['image_5'] = open('IMAGE_PATH', 'rb') # To send a file
# data['image_5'] = 'IMAGE_URI' # To send a URI
# For parameter "image_6", you can send a raw file or a URI:
# files['image_6'] = open('IMAGE_PATH', 'rb') # To send a file
# data['image_6'] = 'IMAGE_URI' # To send a URI
# For parameter "image_7", you can send a raw file or a URI:
# files['image_7'] = open('IMAGE_PATH', 'rb') # To send a file
# data['image_7'] = 'IMAGE_URI' # To send a URI
# For parameter "image_8", you can send a raw file or a URI:
# files['image_8'] = open('IMAGE_PATH', 'rb') # To send a file
# data['image_8'] = 'IMAGE_URI' # To send a URI
# For parameter "image_9", you can send a raw file or a URI:
# files['image_9'] = open('IMAGE_PATH', 'rb') # To send a file
# data['image_9'] = 'IMAGE_URI' # To send a URI
# For parameter "image_10", you can send a raw file or a URI:
# files['image_10'] = open('IMAGE_PATH', 'rb') # To send a file
# data['image_10'] = 'IMAGE_URI' # To send a URI
data['max_width'] = 512
data['max_height'] = 512
data['interpolate'] = False
data['negative_prompt'] = "low quality"
data['color_correction'] = True
headers = {'x-api-key': api_key}
response = requests.post(url, data=data, files=files, headers=headers)
print(response.content) # The response is the generated image
Loop the video
Set a seed for reproducibility. Random by default.
Enter your prompt
First input image
Second input image
Third input image (optional)
Fourth input image (optional)
Fifth input image (optional)
Sixth input image (optional)
Seventh input image (optional)
Eighth input image (optional)
Ninth input image (optional)
Tenth input image (optional)
Maximum width of the video
Allowed values:
Maximum height of the video
Allowed values:
Enable 2x interpolation using FILM
Things you do not want to see in your video
If the colors are coming out strange, or if the colors between your input images are very different, disable this
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Tooncrafter leverages the cutting-edge world of image-to-video diffusion models. Imagine feeding it just a few keyframes – depicting the starting pose of your character and another showcasing the ending pose, Tooncrafter then seamlessly generating all the intermediate frames, bringing your characters to life with smooth, natural-looking animation.
Here's what sets Tooncrafter helps in effortless animation creation:
Animation from few Images: Tooncrafter requires just a few cartoon frames – a starting point and an ending point. The model then uses its magic to create all the intermediate frames, seamlessly transitioning between images.
Control the Motion: While Tooncrafter excels at generating natural movements, it also empowers you to exert control. Through a sketch-based interface, you can provide additional guidance to the model, influencing the movement of specific objects or characters within the animation.
Exceptional Handling of Non-Linear Motion: Complex actions with significant character movement or object disocclusion (objects appearing or disappearing) can be tricky for animation software. Tooncrafter tackles these challenges head-on, generating smooth and convincing transitions even in such scenarios.
This innovative technology is a game-changer for animators of all levels. For professional studios, ToonCrafter acts as a powerful time-saving asset, automating the in-betweening process and freeing up animators to focus on refining details and storytelling. Budding animators and hobbyists can use ToonCrafter to bring their creative visions to life without the need for years of painstaking frame-by-frame animation.