Overview
This node integrates with the PiAPI Midjourney service to generate and manipulate images using AI. Specifically, the Upscale operation allows users to enhance the resolution of a selected image from a previously generated grid of images (from an Imagine operation). This is useful when you want to improve the quality of one particular image out of multiple generated options.
Common scenarios include:
- Enhancing a chosen image from a batch of AI-generated images for printing or detailed viewing.
- Improving image clarity before further processing or sharing.
- Selecting a favorite image from a set and upscaling it for use in design projects.
For example, after generating 4 images from a text prompt, you can use this node to upscale "Image 2" to get a higher-resolution version suitable for professional use.
Properties
| Name | Meaning |
|---|---|
| Origin Task ID | The Task ID of the original Imagine operation that generated the image grid. |
| Image Index | Which image to upscale from the original grid. Options: Image 1, Image 2, Image 3, Image 4. |
| Advanced Options | Additional settings: - Service Mode: Choose between Public (Pay-As-You-Go) or Private (Host-Your-Account) processing modes. |
| Wait For Completion | Whether to wait for the upscale operation to complete before continuing. |
| Max Retries | Maximum number of retries to check the task status if waiting for completion (only if enabled). |
| Retry Interval | Time interval in milliseconds between retries checking the task status (only if waiting). |
Output
The node outputs JSON data containing the status and details of the upscale task. The key fields include:
task_id: The unique identifier of the upscale task.status: Current status of the task (e.g., pending, completed).
If Wait For Completion is enabled, the output will reflect the final status once the upscale operation finishes. Otherwise, it returns immediately with the initial task status.
No binary data is output by this operation; the output focuses on task metadata and status.
Dependencies
- Requires an API key credential for the PiAPI Midjourney service.
- The node makes HTTP POST requests to the
/api/v1/taskendpoint of the PiAPI Midjourney API. - Optional configuration includes selecting the service mode (public or private).
- If waiting for completion, the node polls the API repeatedly until the task completes or max retries are reached.
Troubleshooting
- Missing or invalid Origin Task ID: Ensure the Task ID provided corresponds to a valid previous Imagine operation; otherwise, the upscale request will fail.
- Invalid Image Index: Only values 1 to 4 are accepted, corresponding to images in the original grid.
- Timeouts or long waits when waiting for completion: Adjust
Max RetriesandRetry Intervalto balance responsiveness and API rate limits. - API errors or no task ID returned: Check API credentials and network connectivity. The node throws an error if no valid task ID is received.
- Continue On Fail option can be enabled to allow workflow continuation despite individual item failures.