An OOMOL workflow package for AI-powered image editing using the Nano Banana model.
Nano Banana is a powerful image editing solution that leverages AI to transform images based on natural language instructions. This package provides seamless integration with the Nano Banana AI service through OOMOL workflows, making advanced image editing accessible and easy to use.
- Natural Language Image Editing: Describe your desired changes in plain language, and the AI will apply them to your images
- Multiple Input Methods: Support for both URL-based images and local image files
- Reference Image Support: Optionally provide reference images for style guidance
- LLM-Enhanced Prompts: Automatically refines your editing instructions for optimal results
- Batch Processing: Edit multiple images in a single workflow
- Automatic Result Polling: Handles asynchronous processing and retrieves results automatically
- Local File Handling: Upload local images to the cloud and optionally download edited results
Submits image editing requests to the Nano Banana AI service.
- Inputs:
image_urls: Array of publicly accessible image URLs to processprompt: Natural language instruction describing desired modifications
- Outputs:
result: API response containing request_id and status information
Extracts the request identifier from the API response for tracking.
- Inputs:
response: API response object from nano-banana-edit
- Outputs:
request_id: Unique request identifier for polling results
Polls the service and retrieves edited images using the request ID.
- Inputs:
request_id: Request ID from nano-banana-editpoll_interval(optional): Seconds between polling attemptsmax_attempts(optional): Maximum polling attempts before timeout
- Outputs:
images: Array of URLs to the successfully edited images
Complete workflow for editing images from URLs with LLM-enhanced prompts.
- Inputs:
main_picture: URL of primary image to editreference_picture(optional): Reference image URL for style guidanceprompt: Natural language editing instructionspoll_interval(optional): Polling interval configurationmax_attempts(optional): Maximum polling attempts
- Outputs:
images: Array of URLs to edited images
This subflow automatically:
- Enhances your prompt using an LLM to create precise editing instructions
- Submits the editing request to Nano Banana
- Polls for results until completion
- Returns the edited image URLs
Complete workflow for editing local image files.
- Inputs:
main_picture: Local path to primary image filereference_picture(optional): Local path to reference image fileprompt: Natural language editing instructionssave_dir(optional): Directory to save edited images locallypoll_interval(optional): Polling interval configurationmax_attempts(optional): Maximum polling attempts
- Outputs:
images: Array of edited image URLs or local paths
This subflow automatically:
- Uploads local images to the cloud
- Uses the URL-based editing workflow
- Optionally downloads edited images to your specified directory
- Returns either URLs or local file paths
- OOMOL Studio installed
- Python 3.10+ environment
- Internet connection for API access
- Install the package in OOMOL Studio
- Dependencies will be automatically installed via the bootstrap script
- Use the "URL Images Nano Banana Edit" subflow
- Provide the main image URL
- Optionally add a reference image URL
- Enter your editing instruction (e.g., "Change the sky to sunset colors")
- Run the workflow
- Receive edited image URLs
- Use the "Local Image Nano Banana Edit" subflow
- Select your main image file
- Optionally select a reference image
- Enter your editing instruction
- Optionally specify a save directory
- Run the workflow
- Receive edited images (saved locally if directory specified)
The Nano Banana package operates in several stages:
-
Input Processing: Accepts images either as URLs or local files. Local files are automatically uploaded to cloud storage.
-
Prompt Enhancement: Your natural language instructions are processed by an LLM to create precise, optimized editing prompts that the AI model can better understand.
-
API Submission: The images and enhanced prompts are sent to the Nano Banana AI service via the OOMOL Fusion API.
-
Asynchronous Processing: The service processes your request asynchronously, returning a request ID for tracking.
-
Result Polling: The workflow automatically polls the service at regular intervals to check if processing is complete.
-
Result Retrieval: Once processing is complete, edited images are retrieved and returned as URLs or saved locally.
The package is built using OOMOL's workflow architecture with three core task blocks and two high-level subflows that combine these tasks into complete editing pipelines.
- Service: OOMOL Fusion API
- Endpoint:
https://fusion-api.oomol.com/v1/fal-nano-banana-edit/submit - Authentication: Automatic token management via OOMOL context
- Error Handling: Automatic retry with exponential backoff for SSL and connection errors
requests: HTTP client for API communicationdownloaderx: File download utilitiesupload-to-cloudpackage: Cloud storage integrationarraypackage: Array processing utilitiesllmpackage: LLM integration for prompt enhancement
Both subflows support optional polling configuration:
- poll_interval: Time in seconds between result checks (default: service-defined)
- max_attempts: Maximum number of polling attempts before timeout (default: service-defined)
Adjust these values based on your image complexity and processing time requirements.
API Connection Errors
- The package includes automatic retry logic with exponential backoff
- SSL errors are automatically handled with up to 3 retry attempts
Timeout During Polling
- Increase
max_attemptsfor complex editing tasks - Increase
poll_intervalto reduce server load
File Upload Failures
- Ensure local files are accessible and not corrupted
- Check that file paths are correct
See project license file for details.
For issues and questions, please refer to the OOMOL documentation or contact support through the OOMOL platform.