Overview
This node generates videos from images using the PiAPI WanX service. It supports different models for image-to-video transformation, including a standard model, a keyframe-based model (using first and last frame images), and a style-controlled model with LoRA (Low-Rank Adaptation) for applying various animation styles.
Common scenarios where this node is beneficial include:
- Creating animated videos from a single image or two keyframe images.
- Applying specific artistic or animation styles to videos using LoRA.
- Generating short video clips for social media, marketing, or creative projects based on descriptive prompts.
Practical examples:
- Transforming a static character illustration into a 360-degree rotating animation.
- Generating a pixel-art style video from an input image.
- Creating a live wallpaper animation from a photo.
- Producing NSFW-themed animations with specialized LoRA styles.
Properties
| Name | Meaning |
|---|---|
| Prompt | Descriptive text prompt guiding the video generation. |
| Negative Prompt | Text specifying elements to exclude from the generated video. |
| Model | The WanX model to use: - Image to Video (14B): Standard image-to-video transformation. - Keyframe Image to Video (14B): Generates video from first and last frame images. - Image to Video with LoRA: Style-controlled generation. |
| Image URL | Direct URL to the input image (required if image source is URL and model is not keyframe). Must be publicly accessible. |
| First Frame Source | Source type of the first frame image for keyframe model: URL or binary data. |
| Last Frame Source | Source type of the last frame image for keyframe model: URL or binary data. |
| Binary Property | Name of the binary property containing the image data when image source is binary data. |
| First Frame URL | Direct URL to the first frame image (for keyframe model when first frame source is URL). |
| Last Frame URL | Direct URL to the last frame image (for keyframe model when last frame source is URL). |
| First Frame Binary Property | Name of the binary property containing the first frame image data (for keyframe model when first frame source is binary data). |
| Last Frame Binary Property | Name of the binary property containing the last frame image data (for keyframe model when last frame source is binary data). |
| Aspect Ratio | Aspect ratio of the generated video: Landscape (16:9) or Portrait (9:16). |
| Use LoRA | Whether to apply LoRA style control (only for LoRA model). |
| LoRA Type | Style type to apply using LoRA. Options include various animation and artistic styles such as: - Default Ghibli Style - Flat Color Style - Rotation Effect - Live Wallpaper - Pixel Art - NSFW variants etc. |
| LoRA Strength | Intensity of LoRA influence, from 0.0 (none) to 1.0 (full strength). |
| Image Source | Source of the input image: URL or binary data (for non-keyframe models). |
| Wait for Completion | Whether to wait for the video generation task to complete before returning results. |
Output
The node outputs JSON data representing the response from the WanX API after submitting the video generation task. If "Wait for Completion" is enabled, the output contains the completed task result including generated video details.
The output JSON typically includes:
- Task metadata and status.
- Generated video URLs or identifiers.
- Any error messages if the request failed.
Binary data is not directly output by this node; instead, it returns metadata and links related to the generated video.
Dependencies
- Requires an API key credential for the PiAPI WanX service.
- Network access to download input images from URLs if image sources are URLs.
- Uses internal helper functions to make HTTP requests to the WanX API.
- No additional external dependencies beyond the configured API credential.
Troubleshooting
- Failed to download image from URL: Ensure the provided image URL is publicly accessible and correct.
- Provided binary data is not an image: Verify that the binary property contains valid image data with an appropriate MIME type.
- Could not extract image from binary data: Check that the binary data includes either raw data or a valid URL.
- Failed to download first/last frame image: For keyframe model, confirm the first and last frame images are accessible and correctly specified.
- API request errors: Confirm the API key is valid and has sufficient permissions/quota.
- Timeouts or long waits: Enable "Wait for Completion" only if you expect the task to finish quickly; otherwise, handle asynchronous task completion externally.
Links and References
- PiAPI WanX Documentation (hypothetical link)
- LoRA Style Guide (hypothetical link)
- n8n documentation on Creating Custom Nodes