diff --git a/tasks/examples/image_edit/data/car_photo.png b/tasks/examples/image_edit/data/car_photo.png new file mode 100644 index 0000000..af25fbf Binary files /dev/null and b/tasks/examples/image_edit/data/car_photo.png differ diff --git a/tasks/examples/image_edit/data/landscape.png b/tasks/examples/image_edit/data/landscape.png new file mode 100644 index 0000000..ac9b380 Binary files /dev/null and b/tasks/examples/image_edit/data/landscape.png differ diff --git a/tasks/examples/image_edit/data/object1.png b/tasks/examples/image_edit/data/object1.png new file mode 100644 index 0000000..0837ade Binary files /dev/null and b/tasks/examples/image_edit/data/object1.png differ diff --git a/tasks/examples/image_edit/data/portrait.png b/tasks/examples/image_edit/data/portrait.png new file mode 100644 index 0000000..9c6c6a7 Binary files /dev/null and b/tasks/examples/image_edit/data/portrait.png differ diff --git a/tasks/examples/image_edit/data/room_photo.png b/tasks/examples/image_edit/data/room_photo.png new file mode 100644 index 0000000..f813a17 Binary files /dev/null and b/tasks/examples/image_edit/data/room_photo.png differ diff --git a/tasks/examples/image_edit/graph_config.yaml b/tasks/examples/image_edit/graph_config.yaml new file mode 100644 index 0000000..449ebfe --- /dev/null +++ b/tasks/examples/image_edit/graph_config.yaml @@ -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 diff --git a/tasks/examples/image_edit/images_to_edit.json b/tasks/examples/image_edit/images_to_edit.json new file mode 100644 index 0000000..3c2b576 --- /dev/null +++ b/tasks/examples/image_edit/images_to_edit.json @@ -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" + } +] diff --git a/tasks/examples/image_edit/multi_image_edits.json b/tasks/examples/image_edit/multi_image_edits.json new file mode 100644 index 0000000..2ac3599 --- /dev/null +++ b/tasks/examples/image_edit/multi_image_edits.json @@ -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" + } +] diff --git a/tasks/examples/text_to_image/concepts.json b/tasks/examples/text_to_image/concepts.json new file mode 100644 index 0000000..a29b320 --- /dev/null +++ b/tasks/examples/text_to_image/concepts.json @@ -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" + } +] diff --git a/tasks/examples/text_to_image/graph_config.yaml b/tasks/examples/text_to_image/graph_config.yaml new file mode 100644 index 0000000..a247d6f --- /dev/null +++ b/tasks/examples/text_to_image/graph_config.yaml @@ -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" diff --git a/tasks/examples/text_to_speech/graph_config.yaml b/tasks/examples/text_to_speech/graph_config.yaml new file mode 100644 index 0000000..f6f3f6b --- /dev/null +++ b/tasks/examples/text_to_speech/graph_config.yaml @@ -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 diff --git a/tasks/examples/text_to_speech/test.json b/tasks/examples/text_to_speech/test.json new file mode 100644 index 0000000..3982fd3 --- /dev/null +++ b/tasks/examples/text_to_speech/test.json @@ -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." + } +]