adnovamedya/deforum-sd
stable diffusion deforum model
Run adnovamedya/deforum-sd with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
Field | Type | Default value | Description |
---|---|---|---|
model_checkpoint |
None
|
Protogen_V2.2.ckpt
|
Choose stable diffusion model.
|
max_frames |
integer
|
200
|
Number of frames for animation
|
animation_prompts |
string
|
0: a beautiful apple, trending on Artstation | 50: a beautiful banana, trending on Artstation | 100: a beautiful coconut, trending on Artstation | 150: a beautiful durian, trending on Artstation
|
Prompt for animation. Provide 'frame number : prompt at this frame', separate different prompts with '|'. Make sure the frame number does not exceed the max_frames.
|
negative_prompts |
string
|
0: mountain
|
Prompt for negative. Provide 'frame number : prompt at this frame', separate different prompts with '|'. Make sure the frame number does not exceed the max_frames.
|
width |
None
|
360
|
Width of output video. Reduce if out of memory.
|
height |
None
|
640
|
Height of output image. Reduce if out of memory.
|
num_inference_steps |
integer
|
50
Min: 1 Max: 500 |
Number of denoising steps
|
guidance_scale |
number
|
7
Min: 1 Max: 20 |
Scale for classifier-free guidance
|
sampler |
None
|
euler_ancestral
|
None
|
seed |
integer
|
Random seed. Leave blank to randomize the seed
|
|
fps |
integer
|
15
Min: 10 Max: 60 |
Choose fps for the video.
|
clip_name |
None
|
ViT-L/14
|
Choose CLIP model
|
use_init |
boolean
|
False
|
If not using init image, you can skip the next settings to setting the animation_mode.
|
init_image |
string
|
Provide init_image if use_init
|
|
add_init_noise |
boolean
|
False
|
add_init_noise
|
strength |
number
|
0.5
|
The initial diffusion on the input image.
|
use_mask |
boolean
|
False
|
None
|
mask_file |
string
|
Provide mask_file if use_mask
|
|
invert_mask |
boolean
|
False
|
None
|
animation_mode |
None
|
2D
|
Choose Animation mode. All parameters below are for setting up animations.
|
border |
None
|
replicate
|
None
|
angle |
string
|
0:(0)
|
angle parameter for the motion
|
zoom |
string
|
0:(1.04)
|
zoom parameter for the motion
|
translation_x |
string
|
0:(10*sin(2*3.14*t/10))
|
translation_x parameter for the 2D motion
|
translation_y |
string
|
0:(0)
|
translation_y parameter for the 2D motion
|
translation_z |
string
|
0:(10)
|
translation_z parameter for the 2D motion
|
rotation_3d_x |
string
|
0:(0)
|
rotation_3d_x parameter for the 3D motion
|
rotation_3d_y |
string
|
0:(0)
|
rotation_3d_y parameter for the 3D motion
|
rotation_3d_z |
string
|
0:(0)
|
rotation_3d_z parameter for the 3D motion
|
flip_2d_perspective |
boolean
|
False
|
None
|
perspective_flip_theta |
string
|
0:(0)
|
None
|
perspective_flip_phi |
string
|
0:(t%15)
|
None
|
perspective_flip_gamma |
string
|
0:(0)
|
None
|
perspective_flip_fv |
string
|
0:(53)
|
None
|
noise_schedule |
string
|
0: (0.02)
|
None
|
strength_schedule |
string
|
0: (0.65)
|
None
|
contrast_schedule |
string
|
0: (1.0)
|
None
|
hybrid_video_comp_alpha_schedule |
string
|
0:(1)
|
None
|
hybrid_video_comp_mask_blend_alpha_schedule |
string
|
0:(0.5)
|
None
|
hybrid_video_comp_mask_contrast_schedule |
string
|
0:(1)
|
None
|
hybrid_video_comp_mask_auto_contrast_cutoff_high_schedule |
string
|
0:(100)
|
None
|
hybrid_video_comp_mask_auto_contrast_cutoff_low_schedule |
string
|
0:(0)
|
None
|
enable_schedule_samplers |
boolean
|
False
|
None
|
sampler_schedule |
string
|
0:('euler'),10:('dpm2'),20:('dpm2_ancestral'),30:('heun'),40:('euler'),50:('euler_ancestral'),60:('dpm_fast'),70:('dpm_adaptive'),80:('dpmpp_2s_a'),90:('dpmpp_2m')
|
None
|
kernel_schedule |
string
|
0: (5)
|
None
|
sigma_schedule |
string
|
0: (1.0)
|
None
|
amount_schedule |
string
|
0: (0.2)
|
None
|
threshold_schedule |
string
|
0: (0.0)
|
None
|
color_coherence |
None
|
Match Frame 0 LAB
|
None
|
color_coherence_video_every_N_frames |
integer
|
1
|
None
|
color_force_grayscale |
boolean
|
False
|
None
|
diffusion_cadence |
None
|
1
|
None
|
use_depth_warping |
boolean
|
True
|
None
|
midas_weight |
number
|
0.3
|
None
|
near_plane |
integer
|
200
|
None
|
far_plane |
integer
|
10000
|
None
|
fov |
integer
|
40
|
None
|
padding_mode |
None
|
border
|
None
|
sampling_mode |
None
|
bicubic
|
None
|
video_init_path |
string
|
None
|
|
extract_nth_frame |
integer
|
1
|
None
|
overwrite_extracted_frames |
boolean
|
True
|
None
|
use_mask_video |
boolean
|
False
|
None
|
video_mask_path |
string
|
None
|
|
hybrid_generate_inputframes |
boolean
|
False
|
None
|
hybrid_use_first_frame_as_init_image |
boolean
|
True
|
None
|
hybrid_motion |
None
|
None
|
None
|
hybrid_flow_method |
None
|
Farneback
|
None
|
hybrid_composite |
boolean
|
False
|
None
|
hybrid_comp_mask_type |
None
|
None
|
None
|
hybrid_comp_mask_inverse |
boolean
|
False
|
None
|
hybrid_comp_mask_equalize |
None
|
None
|
None
|
hybrid_comp_mask_auto_contrast |
boolean
|
False
|
None
|
hybrid_comp_save_extra_frames |
boolean
|
False
|
None
|
hybrid_use_video_as_mse_image |
boolean
|
False
|
None
|
interpolate_key_frames |
boolean
|
False
|
None
|
interpolate_x_frames |
integer
|
4
|
None
|
resume_from_timestring |
boolean
|
False
|
None
|
resume_timestring |
string
|
|
None
|
{
"type": "object",
"title": "Input",
"properties": {
"fov": {
"type": "integer",
"title": "Fov",
"default": 40,
"x-order": 56
},
"fps": {
"type": "integer",
"title": "Fps",
"default": 15,
"maximum": 60,
"minimum": 10,
"x-order": 10,
"description": "Choose fps for the video."
},
"seed": {
"type": "integer",
"title": "Seed",
"x-order": 9,
"description": "Random seed. Leave blank to randomize the seed"
},
"zoom": {
"type": "string",
"title": "Zoom",
"default": "0:(1.04)",
"x-order": 22,
"description": "zoom parameter for the motion"
},
"angle": {
"type": "string",
"title": "Angle",
"default": "0:(0)",
"x-order": 21,
"description": "angle parameter for the motion"
},
"width": {
"enum": [
128,
144,
228,
256,
360,
480,
640,
720,
853,
1080,
1280,
1920
],
"type": "integer",
"title": "width",
"description": "Width of output video. Reduce if out of memory.",
"default": 360,
"x-order": 4
},
"border": {
"enum": [
"wrap",
"replicate"
],
"type": "string",
"title": "border",
"description": "An enumeration.",
"default": "replicate",
"x-order": 20
},
"height": {
"enum": [
128,
144,
228,
256,
360,
480,
640,
720,
853,
1080,
1280,
1920
],
"type": "integer",
"title": "height",
"description": "Height of output image. Reduce if out of memory.",
"default": 640,
"x-order": 5
},
"sampler": {
"enum": [
"klms",
"dpm2",
"dpm2_ancestral",
"heun",
"euler",
"euler_ancestral",
"plms",
"ddim",
"dpm_fast",
"dpm_adaptive",
"dpmpp_2s_a",
"dpmpp_2m"
],
"type": "string",
"title": "sampler",
"description": "An enumeration.",
"default": "euler_ancestral",
"x-order": 8
},
"strength": {
"type": "number",
"title": "Strength",
"default": 0.5,
"x-order": 15,
"description": "The initial diffusion on the input image."
},
"use_init": {
"type": "boolean",
"title": "Use Init",
"default": false,
"x-order": 12,
"description": "If not using init image, you can skip the next settings to setting the animation_mode."
},
"use_mask": {
"type": "boolean",
"title": "Use Mask",
"default": false,
"x-order": 16
},
"clip_name": {
"enum": [
"ViT-L/14",
"ViT-L/14@336px",
"ViT-B/16",
"ViT-B/32"
],
"type": "string",
"title": "clip_name",
"description": "Choose CLIP model",
"default": "ViT-L/14",
"x-order": 11
},
"far_plane": {
"type": "integer",
"title": "Far Plane",
"default": 10000,
"x-order": 55
},
"mask_file": {
"type": "string",
"title": "Mask File",
"format": "uri",
"x-order": 17,
"description": "Provide mask_file if use_mask"
},
"init_image": {
"type": "string",
"title": "Init Image",
"format": "uri",
"x-order": 13,
"description": "Provide init_image if use_init"
},
"max_frames": {
"type": "integer",
"title": "Max Frames",
"default": 200,
"x-order": 1,
"description": "Number of frames for animation"
},
"near_plane": {
"type": "integer",
"title": "Near Plane",
"default": 200,
"x-order": 54
},
"invert_mask": {
"type": "boolean",
"title": "Invert Mask",
"default": false,
"x-order": 18
},
"midas_weight": {
"type": "number",
"title": "Midas Weight",
"default": 0.3,
"x-order": 53
},
"padding_mode": {
"enum": [
"border",
"reflection",
"zeros"
],
"type": "string",
"title": "padding_mode",
"description": "An enumeration.",
"default": "border",
"x-order": 57
},
"hybrid_motion": {
"enum": [
"None",
"Optical Flow",
"Perspective",
"Affine"
],
"type": "string",
"title": "hybrid_motion",
"description": "An enumeration.",
"default": "None",
"x-order": 66
},
"rotation_3d_x": {
"type": "string",
"title": "Rotation 3D X",
"default": "0:(0)",
"x-order": 26,
"description": "rotation_3d_x parameter for the 3D motion"
},
"rotation_3d_y": {
"type": "string",
"title": "Rotation 3D Y",
"default": "0:(0)",
"x-order": 27,
"description": "rotation_3d_y parameter for the 3D motion"
},
"rotation_3d_z": {
"type": "string",
"title": "Rotation 3D Z",
"default": "0:(0)",
"x-order": 28,
"description": "rotation_3d_z parameter for the 3D motion"
},
"sampling_mode": {
"enum": [
"bicubic",
"bilinear",
"nearest"
],
"type": "string",
"title": "sampling_mode",
"description": "An enumeration.",
"default": "bicubic",
"x-order": 58
},
"translation_x": {
"type": "string",
"title": "Translation X",
"default": "0:(10*sin(2*3.14*t/10))",
"x-order": 23,
"description": "translation_x parameter for the 2D motion"
},
"translation_y": {
"type": "string",
"title": "Translation Y",
"default": "0:(0)",
"x-order": 24,
"description": "translation_y parameter for the 2D motion"
},
"translation_z": {
"type": "string",
"title": "Translation Z",
"default": "0:(10)",
"x-order": 25,
"description": "translation_z parameter for the 2D motion"
},
"add_init_noise": {
"type": "boolean",
"title": "Add Init Noise",
"default": false,
"x-order": 14,
"description": "add_init_noise"
},
"animation_mode": {
"enum": [
"2D",
"3D",
"Video Input",
"Interpolation"
],
"type": "string",
"title": "animation_mode",
"description": "Choose Animation mode. All parameters below are for setting up animations.",
"default": "2D",
"x-order": 19
},
"guidance_scale": {
"type": "number",
"title": "Guidance Scale",
"default": 7,
"maximum": 20,
"minimum": 1,
"x-order": 7,
"description": "Scale for classifier-free guidance"
},
"noise_schedule": {
"type": "string",
"title": "Noise Schedule",
"default": "0: (0.02)",
"x-order": 34
},
"sigma_schedule": {
"type": "string",
"title": "Sigma Schedule",
"default": "0: (1.0)",
"x-order": 45
},
"use_mask_video": {
"type": "boolean",
"title": "Use Mask Video",
"default": false,
"x-order": 62
},
"amount_schedule": {
"type": "string",
"title": "Amount Schedule",
"default": "0: (0.2)",
"x-order": 46
},
"color_coherence": {
"enum": [
"Match Frame 0 HSV",
"Match Frame 0 LAB",
"Match Frame 0 RGB",
"Video Input"
],
"type": "string",
"title": "color_coherence",
"description": "An enumeration.",
"default": "Match Frame 0 LAB",
"x-order": 48
},
"kernel_schedule": {
"type": "string",
"title": "Kernel Schedule",
"default": "0: (5)",
"x-order": 44
},
"video_init_path": {
"type": "string",
"title": "Video Init Path",
"format": "uri",
"x-order": 59
},
"video_mask_path": {
"type": "string",
"title": "Video Mask Path",
"format": "uri",
"x-order": 63
},
"hybrid_composite": {
"type": "boolean",
"title": "Hybrid Composite",
"default": false,
"x-order": 68
},
"model_checkpoint": {
"enum": [
"v2-1_768-ema-pruned.ckpt",
"v2-1_512-ema-pruned.ckpt",
"768-v-ema.ckpt",
"512-base-ema.ckpt",
"Protogen_V2.2.ckpt",
"v1-5-pruned.ckpt",
"v1-5-pruned-emaonly.ckpt",
"sd-v1-4.ckpt",
"robo-diffusion-v1.ckpt",
"wd-v1-3-float16.ckpt"
],
"type": "string",
"title": "model_checkpoint",
"description": "Choose stable diffusion model.",
"default": "Protogen_V2.2.ckpt",
"x-order": 0
},
"negative_prompts": {
"type": "string",
"title": "Negative Prompts",
"default": "0: mountain",
"x-order": 3,
"description": "Prompt for negative. Provide 'frame number : prompt at this frame', separate different prompts with '|'. Make sure the frame number does not exceed the max_frames."
},
"sampler_schedule": {
"type": "string",
"title": "Sampler Schedule",
"default": "0:('euler'),10:('dpm2'),20:('dpm2_ancestral'),30:('heun'),40:('euler'),50:('euler_ancestral'),60:('dpm_fast'),70:('dpm_adaptive'),80:('dpmpp_2s_a'),90:('dpmpp_2m')",
"x-order": 43
},
"animation_prompts": {
"type": "string",
"title": "Animation Prompts",
"default": "0: a beautiful apple, trending on Artstation | 50: a beautiful banana, trending on Artstation | 100: a beautiful coconut, trending on Artstation | 150: a beautiful durian, trending on Artstation",
"x-order": 2,
"description": "Prompt for animation. Provide 'frame number : prompt at this frame', separate different prompts with '|'. Make sure the frame number does not exceed the max_frames."
},
"contrast_schedule": {
"type": "string",
"title": "Contrast Schedule",
"default": "0: (1.0)",
"x-order": 36
},
"diffusion_cadence": {
"enum": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8"
],
"type": "string",
"title": "diffusion_cadence",
"description": "An enumeration.",
"default": "1",
"x-order": 51
},
"extract_nth_frame": {
"type": "integer",
"title": "Extract Nth Frame",
"default": 1,
"x-order": 60
},
"resume_timestring": {
"type": "string",
"title": "Resume Timestring",
"default": "",
"x-order": 78
},
"strength_schedule": {
"type": "string",
"title": "Strength Schedule",
"default": "0: (0.65)",
"x-order": 35
},
"use_depth_warping": {
"type": "boolean",
"title": "Use Depth Warping",
"default": true,
"x-order": 52
},
"hybrid_flow_method": {
"enum": [
"Farneback",
"DenseRLOF",
"SF"
],
"type": "string",
"title": "hybrid_flow_method",
"description": "An enumeration.",
"default": "Farneback",
"x-order": 67
},
"threshold_schedule": {
"type": "string",
"title": "Threshold Schedule",
"default": "0: (0.0)",
"x-order": 47
},
"flip_2d_perspective": {
"type": "boolean",
"title": "Flip 2D Perspective",
"default": false,
"x-order": 29
},
"num_inference_steps": {
"type": "integer",
"title": "Num Inference Steps",
"default": 50,
"maximum": 500,
"minimum": 1,
"x-order": 6,
"description": "Number of denoising steps"
},
"perspective_flip_fv": {
"type": "string",
"title": "Perspective Flip Fv",
"default": "0:(53)",
"x-order": 33
},
"interpolate_x_frames": {
"type": "integer",
"title": "Interpolate X Frames",
"default": 4,
"x-order": 76
},
"perspective_flip_phi": {
"type": "string",
"title": "Perspective Flip Phi",
"default": "0:(t%15)",
"x-order": 31
},
"color_force_grayscale": {
"type": "boolean",
"title": "Color Force Grayscale",
"default": false,
"x-order": 50
},
"hybrid_comp_mask_type": {
"enum": [
"None",
"Depth",
"Video Depth",
"Blend",
"Difference"
],
"type": "string",
"title": "hybrid_comp_mask_type",
"description": "An enumeration.",
"default": "None",
"x-order": 69
},
"interpolate_key_frames": {
"type": "boolean",
"title": "Interpolate Key Frames",
"default": false,
"x-order": 75
},
"perspective_flip_gamma": {
"type": "string",
"title": "Perspective Flip Gamma",
"default": "0:(0)",
"x-order": 32
},
"perspective_flip_theta": {
"type": "string",
"title": "Perspective Flip Theta",
"default": "0:(0)",
"x-order": 30
},
"resume_from_timestring": {
"type": "boolean",
"title": "Resume From Timestring",
"default": false,
"x-order": 77
},
"enable_schedule_samplers": {
"type": "boolean",
"title": "Enable Schedule Samplers",
"default": false,
"x-order": 42
},
"hybrid_comp_mask_inverse": {
"type": "boolean",
"title": "Hybrid Comp Mask Inverse",
"default": false,
"x-order": 70
},
"hybrid_comp_mask_equalize": {
"enum": [
"None",
"Before",
"After",
"Both"
],
"type": "string",
"title": "hybrid_comp_mask_equalize",
"description": "An enumeration.",
"default": "None",
"x-order": 71
},
"overwrite_extracted_frames": {
"type": "boolean",
"title": "Overwrite Extracted Frames",
"default": true,
"x-order": 61
},
"hybrid_generate_inputframes": {
"type": "boolean",
"title": "Hybrid Generate Inputframes",
"default": false,
"x-order": 64
},
"hybrid_comp_save_extra_frames": {
"type": "boolean",
"title": "Hybrid Comp Save Extra Frames",
"default": false,
"x-order": 73
},
"hybrid_use_video_as_mse_image": {
"type": "boolean",
"title": "Hybrid Use Video As Mse Image",
"default": false,
"x-order": 74
},
"hybrid_comp_mask_auto_contrast": {
"type": "boolean",
"title": "Hybrid Comp Mask Auto Contrast",
"default": false,
"x-order": 72
},
"hybrid_video_comp_alpha_schedule": {
"type": "string",
"title": "Hybrid Video Comp Alpha Schedule",
"default": "0:(1)",
"x-order": 37
},
"color_coherence_video_every_N_frames": {
"type": "integer",
"title": "Color Coherence Video Every N Frames",
"default": 1,
"x-order": 49
},
"hybrid_use_first_frame_as_init_image": {
"type": "boolean",
"title": "Hybrid Use First Frame As Init Image",
"default": true,
"x-order": 65
},
"hybrid_video_comp_mask_contrast_schedule": {
"type": "string",
"title": "Hybrid Video Comp Mask Contrast Schedule",
"default": "0:(1)",
"x-order": 39
},
"hybrid_video_comp_mask_blend_alpha_schedule": {
"type": "string",
"title": "Hybrid Video Comp Mask Blend Alpha Schedule",
"default": "0:(0.5)",
"x-order": 38
},
"hybrid_video_comp_mask_auto_contrast_cutoff_low_schedule": {
"type": "string",
"title": "Hybrid Video Comp Mask Auto Contrast Cutoff Low Schedule",
"default": "0:(0)",
"x-order": 41
},
"hybrid_video_comp_mask_auto_contrast_cutoff_high_schedule": {
"type": "string",
"title": "Hybrid Video Comp Mask Auto Contrast Cutoff High Schedule",
"default": "0:(100)",
"x-order": 40
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "string",
"title": "Output",
"format": "uri"
}