Overview
This node integrates with the PiAPI Kling service to generate virtual try-on images of clothing on a model. It allows users to input an image of a person (the model) and one or two garment images, then produces images showing how the garments would look when worn by the model. This is useful for fashion retailers, designers, or marketing teams who want to visualize clothing on models without physical photoshoots.
Typical use cases include:
- Creating virtual fitting rooms for e-commerce platforms.
- Generating promotional images for new clothing lines.
- Testing garment designs on different body types digitally.
The node supports either a full dress garment or separate upper and lower garments, providing flexibility depending on the type of clothing being showcased.
Properties
| Name | Meaning |
|---|---|
| Model Image Source | Source of the model (person) image: "URL" or "Binary Data" |
| Model Image URL | URL of the model image (required if source is URL) |
| Model Binary Property | Name of the binary property containing the model image (required if source is Binary Data) |
| Garment Type | Type of garment to try on: "Full Dress" or "Upper and Lower Separately" |
| Dress Image Source | Source of the full-body garment image: "URL" or "Binary Data" (shown if Garment Type is Full Dress) |
| Dress Image URL | URL of the full-body garment image (required if Dress Image Source is URL) |
| Dress Binary Property | Name of the binary property containing the dress image (required if Dress Image Source is Binary) |
| Upper Garment Image Source | Source of the upper garment image: "URL" or "Binary Data" (shown if Garment Type is Upper/Lower) |
| Upper Garment Image URL | URL of the upper garment image (required if Upper Garment Image Source is URL) |
| Upper Garment Binary Property | Name of the binary property containing the upper garment image (required if source is Binary) |
| Lower Garment Image Source | Source of the lower garment image: "URL" or "Binary Data" (shown if Garment Type is Upper/Lower) |
| Lower Garment Image URL | URL of the lower garment image (required if Lower Garment Image Source is URL) |
| Lower Garment Binary Property | Name of the binary property containing the lower garment image (required if source is Binary) |
| Batch Size | Number of variations to generate (1 to 4) |
| Wait for Completion | Whether to wait for the task to complete before returning results (true/false) |
Output
The node outputs JSON data containing the response from the PiAPI Kling service. The main output includes:
task_id: Identifier of the processing task.- Task details and status.
- Generated try-on images or links to them once processing completes (if waiting for completion).
- If batch size > 1, multiple variations are included.
No binary data is directly output by this node; all image inputs can be provided as URLs or binary data, but outputs are JSON metadata about the generated images.
Dependencies
- Requires an API key credential for the PiAPI Kling service.
- Needs network access to call the PiAPI endpoints.
- Uses helper functions to fetch binary data buffers from input items if images are provided as binary.
Troubleshooting
- Invalid URL errors: If an image URL is malformed or unreachable, the node throws an error specifying which URL is invalid. Verify URLs are correct and accessible.
- Missing binary data: When using binary data sources, if the specified binary property does not exist or contains no data, an error is thrown. Ensure the binary property names match exactly and contain valid image data.
- API errors: If the PiAPI returns an error code, the node surfaces the message. Check API credentials and usage limits.
- Batch size limits: Batch size must be between 1 and 4; values outside this range may cause errors.
- Timeouts: If "Wait for Completion" is enabled, long processing times might delay workflow execution.
To resolve issues, verify all input parameters, ensure proper API credentials, and check network connectivity.