File size: 3,209 Bytes
f055ec8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
{
  "version": "1",
  "name": "Marketing Image Creator",
  "nodes": [
    {
      "id": "n_input",
      "kind": "input",
      "label": "Product Image",
      "source": "local",
      "inputs": [],
      "outputs": [
        {
          "id": "out",
          "label": "Image",
          "type": "image"
        }
      ],
      "x": 60,
      "y": 160,
      "width": 220,
      "height": 160,
      "data": {}
    },
    {
      "id": "n_caption",
      "kind": "transform",
      "label": "Describe Product",
      "source": "fn",
      "inputs": [
        {
          "id": "in_image",
          "label": "image",
          "type": "image",
          "required": true
        }
      ],
      "outputs": [
        {
          "id": "out_0",
          "label": "output",
          "type": "text"
        }
      ],
      "x": 360,
      "y": 160,
      "width": 220,
      "height": 120,
      "data": {},
      "fn": "describe_product"
    },
    {
      "id": "n_prompt",
      "kind": "transform",
      "label": "Craft Prompt",
      "source": "fn",
      "fn": "craft_marketing_prompt",
      "inputs": [
        {
          "id": "in_caption",
          "label": "caption",
          "type": "text",
          "required": true
        }
      ],
      "outputs": [
        {
          "id": "out_0",
          "label": "output",
          "type": "text"
        }
      ],
      "x": 660,
      "y": 160,
      "width": 220,
      "height": 120,
      "data": {}
    },
    {
      "id": "n_flux",
      "kind": "transform",
      "label": "Generate Image",
      "source": "space",
      "space_id": "black-forest-labs/FLUX.1-schnell",
      "inputs": [
        {
          "id": "in",
          "label": "Prompt",
          "type": "text",
          "required": true
        }
      ],
      "outputs": [
        {
          "id": "out",
          "label": "Image",
          "type": "image"
        }
      ],
      "x": 960,
      "y": 160,
      "width": 220,
      "height": 191,
      "data": {}
    },
    {
      "id": "n_output",
      "kind": "output",
      "label": "Marketing Image",
      "source": "local",
      "inputs": [
        {
          "id": "in",
          "label": "Image",
          "type": "image"
        }
      ],
      "outputs": [
        {
          "id": "out",
          "label": "Image",
          "type": "image"
        }
      ],
      "x": 1260,
      "y": 160,
      "width": 220,
      "height": 160,
      "data": {}
    }
  ],
  "edges": [
    {
      "id": "e1",
      "from_node_id": "n_input",
      "from_port_id": "out",
      "to_node_id": "n_caption",
      "to_port_id": "in_image",
      "type": "image"
    },
    {
      "id": "e2",
      "from_node_id": "n_caption",
      "from_port_id": "out_0",
      "to_node_id": "n_prompt",
      "to_port_id": "in_caption",
      "type": "text"
    },
    {
      "id": "e3",
      "from_node_id": "n_prompt",
      "from_port_id": "out_0",
      "to_node_id": "n_flux",
      "to_port_id": "in",
      "type": "text"
    },
    {
      "id": "e4",
      "from_node_id": "n_flux",
      "from_port_id": "out",
      "to_node_id": "n_output",
      "to_port_id": "in",
      "type": "image"
    }
  ]
}