akhaliq HF Staff commited on
Commit
4859b00
·
verified ·
1 Parent(s): 7bdc638

workflow graph: generate + chained edits

Browse files
Files changed (1) hide show
  1. workflow.json +210 -0
workflow.json ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema_version": "2",
3
+ "name": "P-H3-Image Workflow",
4
+ "references": [
5
+ {
6
+ "id": "ref_source",
7
+ "label": "Source Image",
8
+ "role": "reference",
9
+ "asset_type": "image",
10
+ "inputs": [{"id": "in", "label": "Image", "type": "image"}],
11
+ "outputs": [{"id": "out", "label": "Image", "type": "image"}],
12
+ "x": 40,
13
+ "y": 40,
14
+ "width": 220,
15
+ "height": 130,
16
+ "data": {}
17
+ },
18
+ {
19
+ "id": "ref_edit",
20
+ "label": "Edit Instruction",
21
+ "role": "reference",
22
+ "asset_type": "text",
23
+ "inputs": [{"id": "in", "label": "Text", "type": "text"}],
24
+ "outputs": [{"id": "out", "label": "Text", "type": "text"}],
25
+ "x": 300,
26
+ "y": 40,
27
+ "width": 280,
28
+ "height": 130,
29
+ "data": {"out": "make it night, with warm light glowing in the windows"}
30
+ },
31
+ {
32
+ "id": "ref_edit_2",
33
+ "label": "Second Edit Instruction",
34
+ "role": "reference",
35
+ "asset_type": "text",
36
+ "inputs": [{"id": "in", "label": "Text", "type": "text"}],
37
+ "outputs": [{"id": "out", "label": "Text", "type": "text"}],
38
+ "x": 620,
39
+ "y": 250,
40
+ "width": 280,
41
+ "height": 130,
42
+ "data": {"out": "add a small boat with a lantern on the water"}
43
+ },
44
+ {
45
+ "id": "ref_seed",
46
+ "label": "Seed",
47
+ "role": "reference",
48
+ "asset_type": "text",
49
+ "inputs": [{"id": "in", "label": "Text", "type": "text"}],
50
+ "outputs": [{"id": "out", "label": "Text", "type": "text"}],
51
+ "x": 300,
52
+ "y": 190,
53
+ "width": 130,
54
+ "height": 90,
55
+ "data": {"out": "42"}
56
+ },
57
+ {
58
+ "id": "ref_prompt",
59
+ "label": "Prompt",
60
+ "role": "reference",
61
+ "asset_type": "text",
62
+ "inputs": [{"id": "in", "label": "Text", "type": "text"}],
63
+ "outputs": [{"id": "out", "label": "Text", "type": "text"}],
64
+ "x": 40,
65
+ "y": 460,
66
+ "width": 300,
67
+ "height": 160,
68
+ "data": {"out": "A lighthouse on a cliff at dusk, film still, cold light raking across the rocks, fine grain, restrained palette of slate and amber."}
69
+ },
70
+ {
71
+ "id": "ref_aspect",
72
+ "label": "Aspect Ratio",
73
+ "role": "reference",
74
+ "asset_type": "text",
75
+ "inputs": [{"id": "in", "label": "Text", "type": "text"}],
76
+ "outputs": [{"id": "out", "label": "Text", "type": "text"}],
77
+ "x": 40,
78
+ "y": 640,
79
+ "width": 140,
80
+ "height": 90,
81
+ "data": {"out": "4:3"}
82
+ },
83
+ {
84
+ "id": "ref_resolution",
85
+ "label": "Resolution",
86
+ "role": "reference",
87
+ "asset_type": "text",
88
+ "inputs": [{"id": "in", "label": "Text", "type": "text"}],
89
+ "outputs": [{"id": "out", "label": "Text", "type": "text"}],
90
+ "x": 200,
91
+ "y": 640,
92
+ "width": 140,
93
+ "height": 90,
94
+ "data": {"out": "8 MP"}
95
+ }
96
+ ],
97
+ "operators": [
98
+ {
99
+ "id": "op_edit",
100
+ "label": "P-H3 Edit",
101
+ "role": "operator",
102
+ "kind": "fn",
103
+ "fn": "ph3_edit",
104
+ "inputs": [
105
+ {"id": "image", "label": "Image", "type": "image", "required": true},
106
+ {"id": "prompt", "label": "Edit Instruction", "type": "text", "required": true},
107
+ {"id": "seed", "label": "Seed", "type": "text"}
108
+ ],
109
+ "outputs": [{"id": "out_0", "label": "Image", "type": "image", "output_index": 0}],
110
+ "x": 620,
111
+ "y": 60,
112
+ "width": 230,
113
+ "height": 150,
114
+ "data": {}
115
+ },
116
+ {
117
+ "id": "op_edit_2",
118
+ "label": "P-H3 Edit (chained)",
119
+ "role": "operator",
120
+ "kind": "fn",
121
+ "fn": "ph3_edit",
122
+ "inputs": [
123
+ {"id": "image", "label": "Image", "type": "image", "required": true},
124
+ {"id": "prompt", "label": "Edit Instruction", "type": "text", "required": true},
125
+ {"id": "seed", "label": "Seed", "type": "text"}
126
+ ],
127
+ "outputs": [{"id": "out_0", "label": "Image", "type": "image", "output_index": 0}],
128
+ "x": 960,
129
+ "y": 260,
130
+ "width": 230,
131
+ "height": 150,
132
+ "data": {}
133
+ },
134
+ {
135
+ "id": "op_generate",
136
+ "label": "P-H3 Generate",
137
+ "role": "operator",
138
+ "kind": "fn",
139
+ "fn": "ph3_generate",
140
+ "inputs": [
141
+ {"id": "prompt", "label": "Prompt", "type": "text", "required": true},
142
+ {"id": "aspect", "label": "Aspect Ratio", "type": "text"},
143
+ {"id": "resolution", "label": "Resolution", "type": "text"},
144
+ {"id": "seed", "label": "Seed", "type": "text"}
145
+ ],
146
+ "outputs": [{"id": "out_0", "label": "Image", "type": "image", "output_index": 0}],
147
+ "x": 420,
148
+ "y": 480,
149
+ "width": 230,
150
+ "height": 170,
151
+ "data": {}
152
+ }
153
+ ],
154
+ "subjects": [
155
+ {
156
+ "id": "sub_edited",
157
+ "label": "Edited Image",
158
+ "role": "subject",
159
+ "asset_type": "image",
160
+ "inputs": [{"id": "in", "label": "Image", "type": "image"}],
161
+ "outputs": [{"id": "out", "label": "Image", "type": "image"}],
162
+ "x": 900,
163
+ "y": 70,
164
+ "width": 230,
165
+ "height": 110,
166
+ "data": {}
167
+ },
168
+ {
169
+ "id": "sub_final",
170
+ "label": "Final Image",
171
+ "role": "subject",
172
+ "asset_type": "image",
173
+ "inputs": [{"id": "in", "label": "Image", "type": "image"}],
174
+ "outputs": [{"id": "out", "label": "Image", "type": "image"}],
175
+ "x": 1240,
176
+ "y": 270,
177
+ "width": 230,
178
+ "height": 110,
179
+ "data": {}
180
+ },
181
+ {
182
+ "id": "sub_generated",
183
+ "label": "Generated Image",
184
+ "role": "subject",
185
+ "asset_type": "image",
186
+ "inputs": [{"id": "in", "label": "Image", "type": "image"}],
187
+ "outputs": [{"id": "out", "label": "Image", "type": "image"}],
188
+ "x": 710,
189
+ "y": 490,
190
+ "width": 230,
191
+ "height": 110,
192
+ "data": {}
193
+ }
194
+ ],
195
+ "edges": [
196
+ {"id": "e_source", "from_node_id": "ref_source", "from_port_id": "out", "to_node_id": "op_edit", "to_port_id": "image", "type": "image"},
197
+ {"id": "e_edit", "from_node_id": "ref_edit", "from_port_id": "out", "to_node_id": "op_edit", "to_port_id": "prompt", "type": "text"},
198
+ {"id": "e_seed", "from_node_id": "ref_seed", "from_port_id": "out", "to_node_id": "op_edit", "to_port_id": "seed", "type": "text"},
199
+ {"id": "e_out", "from_node_id": "op_edit", "from_port_id": "out_0", "to_node_id": "sub_edited", "to_port_id": "in", "type": "image"},
200
+ {"id": "e_chain", "from_node_id": "op_edit", "from_port_id": "out_0", "to_node_id": "op_edit_2", "to_port_id": "image", "type": "image"},
201
+ {"id": "e_edit_2", "from_node_id": "ref_edit_2", "from_port_id": "out", "to_node_id": "op_edit_2", "to_port_id": "prompt", "type": "text"},
202
+ {"id": "e_seed_2", "from_node_id": "ref_seed", "from_port_id": "out", "to_node_id": "op_edit_2", "to_port_id": "seed", "type": "text"},
203
+ {"id": "e_out_2", "from_node_id": "op_edit_2", "from_port_id": "out_0", "to_node_id": "sub_final", "to_port_id": "in", "type": "image"},
204
+ {"id": "e_prompt", "from_node_id": "ref_prompt", "from_port_id": "out", "to_node_id": "op_generate", "to_port_id": "prompt", "type": "text"},
205
+ {"id": "e_aspect", "from_node_id": "ref_aspect", "from_port_id": "out", "to_node_id": "op_generate", "to_port_id": "aspect", "type": "text"},
206
+ {"id": "e_resolution", "from_node_id": "ref_resolution", "from_port_id": "out", "to_node_id": "op_generate", "to_port_id": "resolution", "type": "text"},
207
+ {"id": "e_seed_g", "from_node_id": "ref_seed", "from_port_id": "out", "to_node_id": "op_generate", "to_port_id": "seed", "type": "text"},
208
+ {"id": "e_gen", "from_node_id": "op_generate", "from_port_id": "out_0", "to_node_id": "sub_generated", "to_port_id": "in", "type": "image"}
209
+ ]
210
+ }