Skip to content
/ f-lite Public

F Lite is a 10B parameter diffusion model created by Freepik and Fal, trained exclusively on copyright-safe and SFW content.

License

Notifications You must be signed in to change notification settings

fal-ai/f-lite

Repository files navigation

F Lite

Simo Ryu     Lu Pengqi     Javier Martín Juan     Iván de Prado Alonso    

F Lite generated images mosaic

F Lite is a 10B parameter diffusion model created by Freepik and Fal, trained exclusively on copyright-safe and SFW content. The model was trained on Freepik's internal dataset comprising approximately 80 million copyright-safe images, making it the first publicly available model of this scale trained exclusively on legally compliant and SFW content.

Read our technical report for more details about the architecture and training process.

Project updates

  • 🎉 April 29, 2025: F Lite is released!

Weights

Model Version Link Description Notes HF Demo Fal.ai Demo
Standard Model Freepik/F-Lite Base model suitable for general-purpose image generation - Demo Fal.ai Demo
Texture Model Freepik/F-Lite-Texture Specialized version with richer textures and enhanced details • Requires more detailed prompts
• May be more prone to malformations
• Less effective for vector-style imagery
Demo Fal.ai Demo

ComfyUI Nodes

F Lite can be used within ComfyUI for a more visual workflow experience. Two example workflows are provided:

Simple Workflow (F-lite-simple.json)

This workflow doesn't require any additional extensions and provides basic F Lite image generation functionality.

  • Load the workflow by importing F-lite-simple.json in ComfyUI
  • Perfect for quick testing without additional setup

Advanced Workflow with SuperPrompt (F-lite-superprompt.json)

This workflow is recommended as F Lite works significantly better with detailed, longer prompts. It uses the SuperPrompt feature to expand simple prompts into more detailed descriptions.

Requirements

This workflow requires the following ComfyUI extensions:

To install these extensions:

cd [your ComfyUI folder]/custom_nodes
git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts
git clone https://github.com/kijai/ComfyUI-KJNodes

After installing the extensions, restart ComfyUI and load the F-lite-superprompt.json workflow.

Command Line and diffusers

Installation

pip install -r requirements.txt

Command line generation

You can generate images using the provided generate.py script:

python -m f_lite.generate \
  --prompt "A photorealistic landscape of a mountain lake at sunset with reflections in the water" \
  --output_file "generated_image.png" \
  --model "Freepik/F-Lite" \
  --width 1344 \
  --height 896 \
  --steps 30 \
  --guidance_scale 6 \
  --seed 42

Diffusers

Here's a basic example of how to use the F Lite pipeline:

import torch
from f_lite import FLitePipeline

# Trick required because it is not a native diffusers model
from diffusers.pipelines.pipeline_loading_utils import LOADABLE_CLASSES, ALL_IMPORTABLE_CLASSES
LOADABLE_CLASSES["f_lite"] = LOADABLE_CLASSES["f_lite.model"] = {"DiT": ["save_pretrained", "from_pretrained"]}
ALL_IMPORTABLE_CLASSES["DiT"] = ["save_pretrained", "from_pretrained"]

pipeline = FLitePipeline.from_pretrained("Freepik/F-Lite", torch_dtype=torch.bfloat16)
pipeline.enable_model_cpu_offload() # For less memory consumption. Alternatively, pipeline.to("cuda")
pipe.vae.enable_slicing()
pipe.vae.enable_tiling()

# Generate an image
output = pipeline(
    prompt="A photorealistic 3D render of a charming, mischievous young boy, approximately eight years old, possessing the endearingly unusual features of long, floppy donkey ears that droop playfully over his shoulders and a surprisingly small, pink pig nose that twitches slightly.  His eyes, a sparkling, intelligent hazel, are wide with a hint of playful mischief, framed by slightly unruly, sandy-brown hair that falls in tousled waves across his forehead.",
    height=1024,
    width=1024,
    num_inference_steps=30,
    guidance_scale=3.0,
    negative_prompt=None,
)

# Save the generated image
output.images[0].save("image.png")

The model requires a card with at least 24GB of VRAM to operate, although using quantization has not been explored and it is expected to reduce the memory footprint even more.

You can enable Adaptive Projected Guidance by setting the parameter apg_config to APGConfig(enabled=True).

Using negative prompts can help improve the quality of the generated images.

Fine-tuning and LoRAs

It is possible to fine-tune F Lite using your own data. Read the Fine-tuning documentation for more information.

Acknowledgements

This model uses T5 XXLand Flux Schnell VAE

License

The F Lite weights are licensed under the permissive CreativeML Open RAIL-M license. The T5 XXL and Flux Schnell VAE are licensed under Apache 2.0.

Citation

If you find our work helpful, please cite it!

@article{ryu2025flite,
  title={F Lite Technical Report},
  author={Ryu, Simo and Pengqi, Lu and Mart\'in Juan, Javier and de Prado Alonso, Iv\'an},
  year={2025}
}

About

F Lite is a 10B parameter diffusion model created by Freepik and Fal, trained exclusively on copyright-safe and SFW content.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages