Skip to content

Fal.ai Integration

Sartiq uses Fal.ai as the primary ML inference platform for image generation, LoRA training, and specialized vision tasks.


Overview

Property Value
Provider Fal.ai
Primary Use Image generation, LoRA training, video generation
SDK fal-client Python SDK
Architecture Serverless GPU inference

Use Cases

1. Image Generation

Generate images from text prompts with optional LoRA models for subject/style consistency.

flowchart LR
    PROMPT[Prompt + LoRAs] --> FAL[Fal.ai API]
    REF[Reference Images] --> FAL
    FAL --> IMG[Generated Images]

2. LoRA Training

Train custom LoRA models for subjects, products, and styles.

flowchart LR
    DATASET[Training Dataset] --> TRAIN[flux-lora-fast-training]
    TRAIN --> LORA[LoRA Weights]
    LORA --> GEN[Use in Generation]

3. Image Editing

Edit existing images with inpainting, virtual try-on, and garment fixing.

4. Video Generation

Generate videos from images with motion and timing control.

5. Vision Tasks

  • Face Detection - Moondream3 for face bounding boxes
  • Segmentation - SAM-3 for person/garment segmentation
  • Image Expansion - Bria for outpainting

Architecture

flowchart TB
    subgraph ComputeServer["Compute Server"]
        FC[FalClient]
        FSP[FalStandardProcessor]
        FGF[FalGarmentFixerProcessor]
        FTS[FalTrainingService]
    end

    subgraph FalPlatform["Fal.ai Platform"]
        FLUX[Flux Models]
        SAM[SAM-3]
        MOON[Moondream3]
        TRAIN[Training API]
        WF[Custom Workflows]
    end

    FC --> FLUX
    FC --> SAM
    FC --> MOON
    FSP --> WF
    FTS --> TRAIN

Key Features

Multiple LoRA Support

Generate images with up to 4 simultaneous LoRAs:

LoRA Type Purpose Default Weight
Subject AI model identity 0.8
Product Product appearance 0.8
Style Visual aesthetic 0.8
Product2 Secondary product 0.8

Custom Workflows

Sartiq uses custom Fal.ai workflows for specialized tasks:

Workflow Purpose
workflows/Shootify/flux-krea-lora-i2i Image generation with LoRAs
workflows/Shootify/editing-workflow Image editing pipeline

Task Status Tracking

Real-time status updates during processing:

  • Queued - Waiting for worker
  • InProgress - Processing
  • Completed - Results ready

Documentation

Section Description
Setup Configuration and API keys
Models Available models and endpoints
Examples Code examples and workflows