Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added tasks/examples/image_edit/data/car_photo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tasks/examples/image_edit/data/landscape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tasks/examples/image_edit/data/object1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tasks/examples/image_edit/data/portrait.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tasks/examples/image_edit/data/room_photo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions tasks/examples/image_edit/graph_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
data_config:
source:
type: "disk"
file_path: "tasks/examples/image_edit/multi_image_edits.json"
file_format: "json"

graph_config:
nodes:
edit_image:
node_type: llm
output_keys: edited_image
prompt:
- user:
- type: image_url
image_url: "{images}"
- type: text
text: "{edit_instruction}"
model:
name: gemini_2_5_pro
output_type: image
parameters:
quality: medium

edges:
- from: START
to: edit_image
- from: edit_image
to: END

output_config:
output_map:
id:
from: id
title:
from: title
original_image:
from: source_image
edit_instruction:
from: edit_instruction
edited_image:
from: edited_image
26 changes: 26 additions & 0 deletions tasks/examples/image_edit/images_to_edit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"edit_instruction": "Remove the red chair from the room",
"id": "edit_001",
"source_image": "tasks/examples/image_edit/data/room_photo.png",
"title": "Remove Background Object"
},
{
"edit_instruction": "Change the car color from blue to red",
"id": "edit_002",
"source_image": "tasks/examples/image_edit/data/car_photo.png",
"title": "Change Color"
},
{
"edit_instruction": "Add a rainbow in the sky",
"id": "edit_003",
"source_image": "tasks/examples/image_edit/data/landscape.png",
"title": "Add Element"
},
{
"edit_instruction": "Make the background blurry and add bokeh effect",
"id": "edit_004",
"source_image": "tasks/examples/image_edit/data/portrait.png",
"title": "Style Transfer"
}
]
12 changes: 12 additions & 0 deletions tasks/examples/image_edit/multi_image_edits.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"edit_instruction": "Combine these into a cohesive scene with natural perspective",
"id": "multi_002",
"images": [
"tasks/examples/image_edit/data/room_photo.png",
"tasks/examples/image_edit/data/object1.png",
"tasks/examples/image_edit/data/car_photo.png"
],
"title": "Scene Composition"
}
]
17 changes: 17 additions & 0 deletions tasks/examples/text_to_image/concepts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"id": "concept_001",
"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",
"theme": "Modern Office Space"
},
{
"id": "concept_002",
"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",
"theme": "Cozy Coffee Shop"
},
{
"id": "concept_003",
"prompt": "A futuristic cityscape at night with neon lights, flying vehicles, towering skyscrapers with holographic advertisements, advanced architecture, cyberpunk aesthetic, rain-slicked streets",
"theme": "Futuristic City"
}
]
32 changes: 32 additions & 0 deletions tasks/examples/text_to_image/graph_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
data_config:
source:
type: "disk"
file_path: "tasks/examples/text_to_image/concepts.json"

graph_config:
nodes:
generate_variations:
node_type: llm
output_keys: images
prompt:
- user: |
{prompt}
model:
name: gpt_image_1
parameters:
n: 3

edges:
- from: START
to: generate_variations
- from: generate_variations
to: END

output_config:
output_map:
id:
from: "id"
concept:
from: "concept_description"
images:
from: "images"
36 changes: 36 additions & 0 deletions tasks/examples/text_to_speech/graph_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
data_config:
source:
type: "disk"
file_path: "tasks/examples/text_to_speech/test.json"
file_format: "json"

graph_config:
nodes:
generate_audio:
node_type: llm
output_keys: llm_response
prompt:
- user: |
{text}
model:
name: gpt-audio
output_type: audio
parameters:
audio:
voice: "alloy"
format: "wav"

edges:
- from: START
to: generate_audio
- from: generate_audio
to: END

output_config:
output_map:
id:
from: id
text:
from: text
llm_response:
from: llm_response
17 changes: 17 additions & 0 deletions tasks/examples/text_to_speech/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"text": "Hello, how are you?"
},
{
"text": "The quick brown fox jumps over the lazy dog."
},
{
"text": "Artificial intelligence is transforming the world."
},
{
"text": "OpenAI develops advanced AI technologies."
},
{
"text": "This is a test of text-to-speech synthesis."
}
]