FASHN icon

FASHN

FASHN AI is a virtual try-on platform that generates realistic try-on images by combining model photos with garment images using advanced AI technology.

Overview

This node integrates with the FASHN AI virtual try-on platform to generate realistic images of a person wearing a specified garment. It combines a model photo and a garment image using advanced AI technology to produce virtual try-on results.

Typical use cases include:

  • Fashion e-commerce sites wanting to show customers how clothes look on models.
  • Virtual fitting rooms for online shopping.
  • Marketing campaigns showcasing apparel on different body types without physical photoshoots.

For example, given a photo of a model and an image of a shirt, the node generates an image of the model wearing that shirt realistically.

Properties

Name Meaning
AI Model Version AI model version to use for virtual try-on generation. Options: "Try-On v1.6 (Latest)" (higher quality, recommended for production), "Try-On v1.5" (faster processing, good for testing).
Model Image URL or base64 encoded image of the model (person) on whom the virtual try-on will be performed.
Garment Image URL or base64 encoded image of the garment (clothing item) to be virtually tried on the model.
Category Category of the garment. Options: Auto, Tops, Bottoms, One-Pieces.
Segmentation Free Boolean flag to enable segmentation-free processing. When true, direct garment fitting is done without clothing segmentation, allowing bulkier garments and better preservation of body shape and skin texture. Set false if original garments are not removed properly.
Moderation Level Content moderation level. Options: Conservative, Permissive, None.
Garment Photo Type Type of garment photo. Options: Auto, Flat-Lay, Model.
Mode Processing mode balancing speed and quality. Options: Performance, Balanced, Quality.
Seed Random seed number (0 to 2^32-1) for reproducible results.
Number of Samples Number of output samples to generate (1 to 4).
Output Format Output image format. Options: PNG, JPEG.
Return Base64 Boolean flag indicating whether to return images as base64 encoded strings instead of URLs.

Output

The node outputs JSON data containing the status and results of the virtual try-on job. The key fields include:

  • id: Prediction job ID.
  • status: Job status (e.g., "completed", "failed").
  • On completion, detailed result data including generated images in the requested format and encoding (base64 or URL).

If multiple samples are requested, multiple images are included.

Binary data is not directly output by the node; images can be returned as base64 strings if enabled.

Dependencies

  • Requires an API key credential for authenticating with the FASHN AI service.
  • Makes HTTP POST requests to https://api.fashn.ai/v1/run to start the job.
  • Polls job status via GET requests to https://api.fashn.ai/v1/status/{predictionId} until completion or timeout.
  • Requires network access to the FASHN API endpoints.

Troubleshooting

  • Timeouts: The node waits up to 25 seconds for job completion, polling every 5 seconds. If the job takes longer, a timeout error occurs. Consider increasing timeout or checking API responsiveness.
  • Invalid response: If the API does not return a valid prediction ID, the node throws an error.
  • Job failure: If the job status returns "failed", the node reports the error message from the API.
  • Image input issues: Ensure model and garment images are valid URLs or correctly formatted base64 strings.
  • Segmentation artifacts: If original garments are not removed properly, try setting "Segmentation Free" to false.
  • API authentication errors: Verify that the API key credential is configured correctly in n8n.

Links and References

Discussion