$ cat workspace-template.yaml

T

Template Generazione Avatar

// Creo immagini di riferimento dell'avatar, linee generali dei tratti della sua personalità e traccia audio di riferimento della sua voce

Media Production

// Canvas Preview

canvas.flow

// Instruction

instruction.md

Crea un flusso di creazione immagini per un avatar

Overview

This workflow automates the creation of a complete digital avatar identity. It starts by generating a base character image, uses that image to create specific camera angles (Chest Up, Chin Up, Hip to Head) via image-to-image editing, elaborates a detailed character persona based on the visual traits, and integrates a character voice file from Google Drive.

Workflow Chain

[Generazione Immagini Avatar]  -> [Avatar Name - Studio Setting]    -> [Avatar Name - Camera Chest Up]    -> [Avatar Name - Camera Chin Up]    -> [Avatar Name - Camera Hip to Head]
[Personalità e Persona]  -> [Tratti della Personalità]    -> [Crea Persona - Scheda Personaggio]
[Audio e Voce]  -> [Drive Audio Reader - Voce Personaggio]

Node Reference

Generazione Immagini Avatar (Section)

  • What it does: Container for the image generation pipeline.
  • Inputs from: N/A
  • Configurable inputs: N/A
  • Output: Contains image generation and editing nodes.

Avatar Name - Studio Setting (Image Creation)

  • What it does: Generates the initial base image of the avatar using a text prompt.
  • Inputs from: User (Prompt)
  • Configurable inputs: prompt (Text), aspect_ratio (Number), megapixel (Number), seed_mode (Select), seed (Number).
  • Output: image (Image), resolution (String), aspect_ratio (Number).

Avatar Name - Camera Chest Up / Chin Up / Hip to Head (Image Edit)

  • What it does: Performs image-to-image edits to create specific camera perspectives based on the base image.
  • Inputs from: Avatar Name - Studio Setting (via images port).
  • Configurable inputs: prompt (Text), aspect_ratio (Number), megapixel (Number), seed_mode (Select).
  • Output: image (Image), resolution (String), aspect_ratio (Number).

Personalità e Persona (Section)

  • What it does: Container for character development.
  • Inputs from: N/A
  • Configurable inputs: N/A
  • Output: Contains personality and persona nodes.

Tratti della Personalità (Text)

  • What it does: Provides the raw personality traits as input text.
  • Inputs from: User (Text)
  • Configurable inputs: value (Textarea).
  • Output: value (Text).

Crea Persona - Scheda Personaggio (Text Transform)

  • What it does: Uses an LLM to expand raw traits into a full, detailed character profile.
  • Inputs from: Tratti della Personalità (via input_text).
  • Configurable inputs: prompt (Textarea), llmModelId (LLM Picker).
  • Output: output_text (Text).

Audio e Voce (Section)

  • What it does: Container for audio integration.
  • Inputs from: N/A
  • Configurable inputs: N/A
  • Output: Contains audio reader nodes.

Drive Audio Reader - Voce Personaggio (Drive Audio Reader)

  • What it does: Fetches a specific audio file from Google Drive to serve as the avatar's voice.
  • Inputs from: User (Drive Item)
  • Configurable inputs: driveItemId (Drive Item Picker).
  • Output: audio (Audio).

Execution Strategy

You MUST complete all 3 phases in order: Phase 1 -> Phase 2 -> Phase 3. Do NOT skip any phase.

Phase 1: Image Generation

  1. Call requestUserDecision to gather initial setup:
    • "What is the visual description of your avatar?" (context: Needed for the base image prompt)
    • "What aspect ratio should the images use?" (context: Sets the frame for all generated views)
    • "Should the seed be Random or Fixed?" (context: Determines if the character remains consistent across edits)
    • "Do you want to publish the final images automatically?" (context: Determines if the terminal nodes execute immediately)
  2. Use nodeExecutor on Avatar Name - Studio Setting using the provided prompt and aspect ratio.
  3. For EACH of the three edit nodes (Camera Chest Up, Camera Chin Up, Camera Hip to Head), repeat: a. Connect the image output from Studio Setting to the images input of the edit node. b. Set the specific prompt for that camera angle (e.g., "Camera zoom to the character face..."). c. Execute the node. Phase 1 complete. Now proceed to Phase 2. Do NOT skip to Phase 3.

Phase 2: Persona Development

  1. Use nodeExecutor on Tratti della Personalità with the user's provided personality traits.
  2. Use nodeExecutor on Crea Persona - Scheda Personaggio, passing the output from the previous step into input_text. Phase 2 complete. Now proceed to Phase 3. Do NOT skip to Phase 1.

Phase 3: Audio Integration & Finalization

  1. Call requestUserDecision to ask the user to select the audio file from their Drive.
  2. Use nodeExecutor on Drive Audio Reader - Voce Personaggio using the selected driveItemId.
  3. If the user requested automatic publishing in Phase 1, execute all terminal image/text/audio outputs. Otherwise, present the final results and ask for confirmation to publish. Phase 3 complete.

Configuration Tips

User saysConfigure
"Make it a tall portrait"Avatar Name - Studio Setting: aspect_ratio = 0.5625 (9:16)
"Use a specific seed"Avatar Name - Studio Setting: seed_mode = fixed, seed = [user value]
"Make the character more aggressive"Tratti della Personalità: value = [updated traits]

Error Handling

ErrorCauseFix
Image Edit failsNo reference image providedEnsure Avatar Name - Studio Setting has successfully completed and is connected to the edit node.
Text Transform failsLLM Model not selected or connection brokenCheck llmModelId configuration or ensure input_text is connected.
Drive Audio errorInvalid or inaccessible Drive IDRe-select the file using the drive-item-picker.

Re-editable artifacts

Incremental Edits to an Existing Canvas

  • Detection — If the nodes for the avatar already exist, this is an EDIT. Use nodeFinder to locate existing nodes before attempting to upsert.
  • Add / remove / reorder recipes — To change camera angles, use sectionManager(ungroup, { sectionId }) on the "Generazione Immagini Avatar" section, then batchCloneNodes for new angles, then organizeNodes and autoLayout().
  • Post-edit — After any edit, re-run the verification tool to ensure all edges (especially the image-to-edit connections) are intact, then honor the user's original publish decision.

// Dependencies

requirements.py
1from process import ImageCreation2from process import ImageEdit3from input import Text4from process import TextTransform5from input import DriveAudioReader