Skip to content

Commit cf40f9a

Browse files
authored
[Enhancement] Added text_to_speech, text_to_image, image_edit example tasks (#128)
Added text_to_speech, text_to_image, image_edit example tasks
1 parent 80a9b6d commit cf40f9a

12 files changed

Lines changed: 181 additions & 0 deletions

File tree

1.79 MB
Loading
2.31 MB
Loading
2.05 KB
Loading
2.5 MB
Loading
1.72 MB
Loading
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
data_config:
2+
source:
3+
type: "disk"
4+
file_path: "tasks/examples/image_edit/multi_image_edits.json"
5+
file_format: "json"
6+
7+
graph_config:
8+
nodes:
9+
edit_image:
10+
node_type: llm
11+
output_keys: edited_image
12+
prompt:
13+
- user:
14+
- type: image_url
15+
image_url: "{images}"
16+
- type: text
17+
text: "{edit_instruction}"
18+
model:
19+
name: gemini_2_5_pro
20+
output_type: image
21+
parameters:
22+
quality: medium
23+
24+
edges:
25+
- from: START
26+
to: edit_image
27+
- from: edit_image
28+
to: END
29+
30+
output_config:
31+
output_map:
32+
id:
33+
from: id
34+
title:
35+
from: title
36+
original_image:
37+
from: source_image
38+
edit_instruction:
39+
from: edit_instruction
40+
edited_image:
41+
from: edited_image
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[
2+
{
3+
"edit_instruction": "Remove the red chair from the room",
4+
"id": "edit_001",
5+
"source_image": "tasks/examples/image_edit/data/room_photo.png",
6+
"title": "Remove Background Object"
7+
},
8+
{
9+
"edit_instruction": "Change the car color from blue to red",
10+
"id": "edit_002",
11+
"source_image": "tasks/examples/image_edit/data/car_photo.png",
12+
"title": "Change Color"
13+
},
14+
{
15+
"edit_instruction": "Add a rainbow in the sky",
16+
"id": "edit_003",
17+
"source_image": "tasks/examples/image_edit/data/landscape.png",
18+
"title": "Add Element"
19+
},
20+
{
21+
"edit_instruction": "Make the background blurry and add bokeh effect",
22+
"id": "edit_004",
23+
"source_image": "tasks/examples/image_edit/data/portrait.png",
24+
"title": "Style Transfer"
25+
}
26+
]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{
3+
"edit_instruction": "Combine these into a cohesive scene with natural perspective",
4+
"id": "multi_002",
5+
"images": [
6+
"tasks/examples/image_edit/data/room_photo.png",
7+
"tasks/examples/image_edit/data/object1.png",
8+
"tasks/examples/image_edit/data/car_photo.png"
9+
],
10+
"title": "Scene Composition"
11+
}
12+
]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{
3+
"id": "concept_001",
4+
"prompt": "A modern minimalist office space with floor-to-ceiling windows, natural wood desk, ergonomic black chair, indoor plants, soft natural lighting, clean and organized workspace",
5+
"theme": "Modern Office Space"
6+
},
7+
{
8+
"id": "concept_002",
9+
"prompt": "A cozy coffee shop interior with exposed brick walls, vintage pendant lights, wooden tables and chairs, barista counter with espresso machine, warm ambient lighting, people enjoying coffee",
10+
"theme": "Cozy Coffee Shop"
11+
},
12+
{
13+
"id": "concept_003",
14+
"prompt": "A futuristic cityscape at night with neon lights, flying vehicles, towering skyscrapers with holographic advertisements, advanced architecture, cyberpunk aesthetic, rain-slicked streets",
15+
"theme": "Futuristic City"
16+
}
17+
]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
data_config:
2+
source:
3+
type: "disk"
4+
file_path: "tasks/examples/text_to_image/concepts.json"
5+
6+
graph_config:
7+
nodes:
8+
generate_variations:
9+
node_type: llm
10+
output_keys: images
11+
prompt:
12+
- user: |
13+
{prompt}
14+
model:
15+
name: gpt_image_1
16+
parameters:
17+
n: 3
18+
19+
edges:
20+
- from: START
21+
to: generate_variations
22+
- from: generate_variations
23+
to: END
24+
25+
output_config:
26+
output_map:
27+
id:
28+
from: "id"
29+
concept:
30+
from: "concept_description"
31+
images:
32+
from: "images"

0 commit comments

Comments
 (0)