Introducing On-demand Preference Fine-Tuning for Image Models

Introducing On-demand Preference Fine-Tuning for Image Models

We’re excited to announce a simpler way to make our AI tools work better for you at fal.ai. Our latest feature lets enterprise users fine-tune their models with user preferences collected directly through their apps. This new service starts today, making it easier to tailor your model to match your users' preferences closely.

How Does It Work?

  1. Collect Data: Start recording preference data by pushing the rankings between images for the same prompt to our REST API. The results will be collected under a private dataset that only you can access and can be exported as a CSV or deleted at any point in time.
  2. Fine-Tune with One Click: Use this data to fine-tune your AI model with just one click improving its performance and alignment with user preferences. Currently only SDXL, SD1.5 are supported; support for other models is coming soon.
  3. Deploy: Put the customized model to work right in your app, enhancing user satisfaction while not sacrificing the incredibly fast inference speeds provided by fal.ai’s inference engine.
  4. Rinse & Repeat: This is a process, not a single action. Keep collecting more data to better align models with your users. ****

Example Results

Salesforce AI Research published their own results on DPO for diffusion models and as you can see, the prompt alignment and visual aesthetics are much improved

Images are generated with SDXL and fine-tuned on yuvalkirstain/pickapic_v2.

Start using it, today!

To start collecting user preferences, simply use our API endpoint /preferences/submit. Here’s a quick example of how you can submit user preference data using our API:

POST /preferences/submit
Content-Type: application/json

{
    "modality": "text-to-image",
    "parameters": {
        "prompt": "A beautiful landscape painting with a sunset over the mountains"
    },
    "outputs": [
        {
            "media_type": "image",
            "model_name": "fal-ai/fast-sdxl",
            "url": "<https://fal.media/outputs/[...]>",
            "rank": 1
        },
        {
            "media_type": "image",
            "model_name": "fal-ai/fast-sdxl",
            "url": "<https://fal.media/outputs/[...]>",
            "rank": 2
        }
    ]
}

Once you have enough samples you can start a training job through our playgrounds and get your customized model that you can plug into our Any Diffusion runner! We recommend collecting anywhere from 100k to 10M samples, depending on the model and the distribution of ranks.

Note: training though our playground is only accessible to our enterprise customers at the moment, but we are expanding the scope day by day. Send us an e-mail at hello@fal.ai if you want to have early access.