# franciszzj/Leffa

[CVPR 2025] Learning Flow Fields in Attention for Controllable Person Image Generation

Repository: https://github.com/franciszzj/Leffa
Canonical: https://ross.abutalabs.com/products/leffa
Homepage: https://huggingface.co/spaces/franciszzj/Leffa
Language: Python
License: MIT
License Family: permissive
Last push: 2025-09-12T09:17:13+00:00

## Health v2 (maintenance only)
Score: 40/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 41, release rhythm 35, longevity 45
- inputs: {"age_days": 636, "days_push": 355, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1672, forks 184 (observed 2026-08-28T04:05:20.213967+00:00)

## What it is
Leffa is a diffusion-based framework for controllable person image generation, supporting virtual try-on and pose transfer via a regularization loss on attention maps. It ships with pretrained models, a Gradio/HuggingFace demo, and a ComfyUI integration.

## Use cases
- generate images of a person wearing clothes from a reference garment
- transfer a person's pose from one image to another
- reduce fine-grained texture distortion in diffusion-generated person images
- run virtual try-on inference locally on a GPU
- apply the Leffa attention loss to improve other diffusion models

## When to choose
- you need state-of-the-art virtual try-on or pose transfer with preserved garment details
- you want a research baseline or pretrained models for controllable person image generation
- you want a quick demo via HuggingFace Spaces or ComfyUI

## When to avoid
- you need general-purpose image editing unrelated to person images
- you lack a GPU and cannot tolerate multi-second inference
- you need a production-ready commercial service with support

## Facets
- artifact type: library
- maturity: active
- function: image-processing, machine-learning, deep-learning
- domain: computer-vision, image-processing, deep-learning, artificial-intelligence
- platform: python
- tags: virtual-try-on, pose-transfer, diffusion-models, person-image-generation, cvpr-2025, research, gpu, web-server

## Member repositories
- franciszzj/Leffa (main) score 40

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:20.213967+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:42:37.316417+00:00, confidence not recorded.
  - readme: https://github.com/franciszzj/Leffa (fetched 2026-08-28T04:05:20.213967+00:00, sha 9a9990b35145)
  - homepage: https://huggingface.co/spaces/franciszzj/Leffa (fetched 2026-08-29T11:15:36.577210+00:00, sha 91dc1b76f11a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
