8000 GitHub - fal-ai/f-lite: F Lite is a 10B parameter diffusion model created by Freepik and Fal, trained exclusively on copyright-safe and SFW content.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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 family of 10B and 7B parameter diffusion models created by Freepik and Fal, trained exclusively on copyright-safe and SFW content. The models were trained on Freepik's internal dataset comprising approximately 80 million copyright-safe images, making them the first publicly available models 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

  • πŸŽ‰ May, 9, 2025: F Lite 7B is released!
  • 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
Standard 7B Freepik/F-Lite-7B 7B parameter version of the standard model β€’ Lower VRAM requirement Demo N/A

ComfyUI Nodes

F Lite can be used within ComfyUI for a more visual workflow experience. Install it into Comfy custom_nodes folder:

cd [your ComfyUI folder]/custom_nodes
git clone https://github.com/fal-ai/f-lite.git

You'll also need to install its dependencies, typically:

cd [your ComfyUI folder]/custom_nodes/f-lite
pip install -r requirements.txt

Check how to install ComfyUI plugin requirements if you have doubts.

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.

Graphical User Interface

f-lite includes a Gradio-based GUI that provides an intuitive interface for image generation.

image

Launching Gradio GUI

python f_lite_gradio_gui.py

Gradio GUI Features

  • Basic parameter configuration
  • Augmented Parallel Guidance for more consistent results
  • Preset resolutions for common aspect ratios (square, portrait, landscape)
  • Continuous generation mode with random seed iteration
  • Dynamic prompt enhancement with wildcard support ({option1|option2|option3} syntax, as well as __filename__ for .txt-file wildcards)
  • Enhanced prompts using SuperPrompt
  • Controls for randomization with SuperPrompt and wildcards while using fixed seeds
  • Prompt prefix / suffix

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

0