File size: 7,297 Bytes
1b8dd1c
 
ce442e1
58f9482
1b8dd1c
 
 
 
88c9300
 
 
 
 
 
 
 
 
 
 
 
1b8dd1c
 
 
 
 
58f9482
1b8dd1c
 
 
 
 
58f9482
1b8dd1c
 
 
 
 
58f9482
1b8dd1c
 
 
 
 
58f9482
ce442e1
1827801
 
 
 
58f9482
1827801
ce442e1
 
 
 
58f9482
1b8dd1c
 
 
 
 
 
 
 
 
58f9482
 
 
 
 
 
1b8dd1c
 
 
 
 
 
88c9300
1b8dd1c
 
 
 
 
 
 
88c9300
1b8dd1c
 
 
 
 
88c9300
1b8dd1c
 
 
 
 
88c9300
1b8dd1c
 
 
88c9300
 
58f9482
 
 
 
 
 
1b8dd1c
 
 
 
 
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
  "schema_version": "2",
  "name": "Video Replace Background",
  "description": "Lift a subject with the LTX-2.5 Alpha-Gen matte (Lightricks/LTX-2.5-22b-IC-LoRA-Alpha-Gen), then regenerate the background with MiniMax-H3 (multimodalart/MiniMax-H3-Pruned) via the inpainting modular blocks (diffusers-modular/minimax-h3-inpainting) and turbo LoRA (lightx2v/Minimax-h3-Turbo) - or just remove it. Harmonize (on) blends the subject's lighting into the scene. Upload any clip. The matte is cached per clip, so changing only the prompt skips the LTX pass.",
  "runtime": {"default": "client"},
  "view": {"default": "canvas"},
  "references": [
    {
      "id": "ref_clip", "role": "reference", "label": "Your clip (upload any video)", "asset_type": "video",
      "inputs": [{"id": "in", "label": "Clip", "type": "video"}],
      "outputs": [{"id": "out", "label": "Clip", "type": "video"}],
      "x": 40, "y": 40, "width": 260, "height": 160,
      "data": {"out": {"path": "examples/subject.mp4", "url": "/gradio_api/file=examples/subject.mp4", "orig_name": "subject.mp4", "mime_type": "video/mp4", "meta": {"_type": "gradio.FileData"}}}
    },
    {
      "id": "ref_prompt", "role": "reference", "label": "New background (edit freely)", "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 40, "y": 230, "width": 260, "height": 150,
      "data": {"out": "a sunny tropical beach, white sand, palm trees and turquoise ocean waves behind the subject, bright warm daylight, static camera"}
    },
    {
      "id": "ref_budget", "role": "reference", "label": "Quality / speed", "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 40, "y": 410, "width": 260, "height": 110, "data": {"out": "Balanced 路 640"}
    },
    {
      "id": "ref_steps", "role": "reference", "label": "Steps (turbo)", "asset_type": "number",
      "inputs": [{"id": "in", "label": "Number", "type": "number"}],
      "outputs": [{"id": "out", "label": "Number", "type": "number"}],
      "x": 40, "y": 540, "width": 260, "height": 110, "data": {"out": 8}
    },
    {
      "id": "ref_seed", "role": "reference", "label": "Seed", "asset_type": "number",
      "inputs": [{"id": "in", "label": "Number", "type": "number"}],
      "outputs": [{"id": "out", "label": "Number", "type": "number"}],
      "x": 40, "y": 670, "width": 260, "height": 110, "data": {"out": 7}
    },
    {
      "id": "ref_keep", "role": "reference", "label": "Keep original audio", "asset_type": "boolean",
      "inputs": [{"id": "in", "label": "Boolean", "type": "boolean"}],
      "outputs": [{"id": "out", "label": "Boolean", "type": "boolean"}],
      "x": 40, "y": 800, "width": 260, "height": 100, "data": {"out": true}
    },
    {
      "id": "ref_harmonize", "role": "reference", "label": "Harmonize subject into the scene", "asset_type": "boolean",
      "inputs": [{"id": "in", "label": "Boolean", "type": "boolean"}],
      "outputs": [{"id": "out", "label": "Boolean", "type": "boolean"}],
      "x": 40, "y": 930, "width": 260, "height": 100, "data": {"out": true}
    },
    {
      "id": "ref_remove", "role": "reference", "label": "Just remove the background", "asset_type": "boolean",
      "inputs": [{"id": "in", "label": "Boolean", "type": "boolean"}],
      "outputs": [{"id": "out", "label": "Boolean", "type": "boolean"}],
      "x": 40, "y": 1060, "width": 260, "height": 100, "data": {"out": false}
    }
  ],
  "operators": [
    {
      "id": "op_generate", "role": "operator", "kind": "fn", "source": "fn", "fn": "generate_video",
      "label": "generate_video",
      "inputs": [
        {"id": "in_0", "label": "clip", "type": "video", "required": true},
        {"id": "in_1", "label": "prompt", "type": "text", "required": true},
        {"id": "in_2", "label": "budget", "type": "text", "choices": ["Balanced 路 640", "Full 路 768 short edge", "Fast 路 512"]},
        {"id": "in_3", "label": "steps", "type": "number"},
        {"id": "in_4", "label": "seed", "type": "number"},
        {"id": "in_5", "label": "keep_audio", "type": "boolean"},
        {"id": "in_6", "label": "harmonize", "type": "boolean"},
        {"id": "in_7", "label": "remove_only", "type": "boolean"}
      ],
      "outputs": [
        {"id": "out_0", "label": "result", "type": "video", "output_index": 0},
        {"id": "out_1", "label": "alpha matte", "type": "video", "output_index": 1},
        {"id": "out_2", "label": "background mask", "type": "video", "output_index": 2}
      ],
      "x": 460, "y": 360, "width": 320, "height": 340, "data": {}
    }
  ],
  "subjects": [
    {
      "id": "sub_result", "role": "subject", "label": "Result", "asset_type": "video",
      "inputs": [{"id": "in", "label": "Video", "type": "video"}],
      "outputs": [{"id": "out", "label": "Video", "type": "video"}],
      "x": 920, "y": 220, "width": 300, "height": 220, "data": {}
    },
    {
      "id": "sub_matte", "role": "subject", "label": "Alpha matte", "asset_type": "video",
      "inputs": [{"id": "in", "label": "Video", "type": "video"}],
      "outputs": [{"id": "out", "label": "Video", "type": "video"}],
      "x": 920, "y": 470, "width": 300, "height": 200, "data": {}
    },
    {
      "id": "sub_mask", "role": "subject", "label": "Background mask", "asset_type": "video",
      "inputs": [{"id": "in", "label": "Video", "type": "video"}],
      "outputs": [{"id": "out", "label": "Video", "type": "video"}],
      "x": 920, "y": 700, "width": 300, "height": 200, "data": {}
    }
  ],
  "edges": [
    {"id": "e_clip", "from_node_id": "ref_clip", "from_port_id": "out", "to_node_id": "op_generate", "to_port_id": "in_0", "type": "video"},
    {"id": "e_prompt", "from_node_id": "ref_prompt", "from_port_id": "out", "to_node_id": "op_generate", "to_port_id": "in_1", "type": "text"},
    {"id": "e_budget", "from_node_id": "ref_budget", "from_port_id": "out", "to_node_id": "op_generate", "to_port_id": "in_2", "type": "text"},
    {"id": "e_steps", "from_node_id": "ref_steps", "from_port_id": "out", "to_node_id": "op_generate", "to_port_id": "in_3", "type": "number"},
    {"id": "e_seed", "from_node_id": "ref_seed", "from_port_id": "out", "to_node_id": "op_generate", "to_port_id": "in_4", "type": "number"},
    {"id": "e_keep", "from_node_id": "ref_keep", "from_port_id": "out", "to_node_id": "op_generate", "to_port_id": "in_5", "type": "boolean"},
    {"id": "e_harmonize", "from_node_id": "ref_harmonize", "from_port_id": "out", "to_node_id": "op_generate", "to_port_id": "in_6", "type": "boolean"},
    {"id": "e_remove", "from_node_id": "ref_remove", "from_port_id": "out", "to_node_id": "op_generate", "to_port_id": "in_7", "type": "boolean"},
    {"id": "e_result", "from_node_id": "op_generate", "from_port_id": "out_0", "to_node_id": "sub_result", "to_port_id": "in", "type": "video"},
    {"id": "e_matte", "from_node_id": "op_generate", "from_port_id": "out_1", "to_node_id": "sub_matte", "to_port_id": "in", "type": "video"},
    {"id": "e_mask", "from_node_id": "op_generate", "from_port_id": "out_2", "to_node_id": "sub_mask", "to_port_id": "in", "type": "video"}
  ]
}