/ Модель

Характеристики

Размер весов
1,4 ГБ
Лицензия
CC BY-NC 4.0
Базовая модель
FLUX.1-Kontext-dev
Библиотека
diffusers
Опубликована
29 июл 2026

thermal-fr-lora

Преобразование изображенийИзображение, текст → изображение3 профессии

GbrlOl/thermal-fr-lora — адаптер LoRA для модели FLUX.1 Kontext [dev], разработанный для преобразования изображений лица в видимом спектре в синтетические тепловизионные изображения.

4 489скачиваний за 30 дней0лайковвеса обновлены12 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Автор адаптера — GbrlOl; веса использовались для создания синтетического набора данных PUCV-TER-S и предназначены прежде всего для академических и некоммерческих исследований дефицита данных в задаче распознавания лиц по тепловизионным изображениям.

Модель работает в режиме image-to-image: исходное RGB-изображение лица служит структурной и идентификационной основой, а текстовый запрос задаёт тепловой вид. Базовая архитектура — мультимодальный diffusion transformer FLUX.1 Kontext [dev] с flow matching. Адаптер охватывает линейные проекции attention- и feed-forward-блоков в double-stream и single-stream частях модели; ранг LoRA и alpha равны 128. Обучение проводилось на 50 синхронизированных парах видимых и тепловых изображений. В README не указаны точные языковые характеристики, размер контекстного окна или количественные метрики качества.

Сильная сторона модели — специализированное сохранение структуры и идентичности лица при преобразовании RGB в монохромное тепловизионное представление, что делает её полезной для генерации синтетических наборов данных, изучения synthetic-to-real transfer и устойчивости распознавания между сенсорами. Ограничения связаны с небольшим объёмом обучающих данных, зависимостью от базовой FLUX.1 Kontext [dev], необходимостью предварительной детекции и кадрирования лица, а также отсутствием заявленных гарантий качества для других типов изображений или производственных сценариев.

Доступ к весам ограничен и предоставляется после авторизации на Hugging Face и принятия условий репозитория и базовой модели. Указана лицензия CC BY-NC 4.0, однако адаптер является производным от FLUX.1 Kontext [dev] и дополнительно подпадает под её некоммерческую лицензию и Acceptable Use Policy. Коммерческое и производственное использование запрещено; также запрещены генерация тепловых представлений людей без согласия, выдача себя за конкретных лиц, фальсификация биометрических образцов и незаконное, клеветническое или оскорбительное применение.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

🔥 Thermal Face LoRA — FLUX.1 Kontext (I2I)

Visible → Thermal (RGB-to-TIR) facial translation that preserves subject identity

License: CC BY-NC 4.0 Base model Code Gated


A LoRA adapter that specializes FLUX.1 Kontext [dev] for visible-to-thermal facial translation under an explicit image-to-image (I2I) scheme. A real visible face acts as the structural and identity anchor while a fixed text prompt steers the thermal appearance — so the generated thermal face keeps the subject's identity instead of merely looking realistic.

These weights were used to generate PUCV-TER-S, a synthetic thermal face dataset, and accompany the code released at 👉 github.com/GbrlOl/thermal-fr-lora.

⚠️ Gated, non-commercial research release. These weights are a Derivative of FLUX.1 Kontext [dev]; the upstream FLUX.1 [dev] Non-Commercial License and its Acceptable Use Policy apply in addition to the cc-by-nc-4.0 label on this repo. See License & intended use.

📦 Model summary

TypeLoRA adapter for FLUX.1 Kontext [dev]
TaskImage-to-image, visible → thermal (RGB-to-TIR) facial translation
Base modelblack-forest-labs/FLUX.1-Kontext-dev
BackboneMultimodal diffusion transformer (flow matching)
Adapter targetAll linear projections (attention + feed-forward) of the double-stream and single-stream blocks
LoRA rank / alphar = 128 / α = 128
Training pairs50 synchronized visible–thermal pairs (PUCV-VTF)
Weights fileFlux_ter_50_redo_seed42.safetensors (≈1.37 GB, bf16)

🎯 Intended use

  • Generating synthetic thermal face datasets from consented visible-face images, for research on data scarcity in thermal-face recognition.
  • Studying synthetic-to-real transfer and cross-sensor robustness in thermal biometrics.

Out of scope / prohibited: any commercial or production use; generating thermal representations of individuals without consent; impersonation; fabrication of biometric samples; any unlawful, defamatory, or abusive use.

🚀 How to use

You must be authenticated on the Hugging Face Hub and have accepted the terms of both this repository and the base model black-forest-labs/FLUX.1-Kontext-dev (which is itself gated).

huggingface-cli login
pip install -U diffusers transformers accelerate peft safetensors facenet-pytorch
import torch
from diffusers import FluxKontextPipeline
from diffusers.utils import load_image

# 1) Base FLUX.1 Kontext model
pipe = FluxKontextPipeline.from_pretrained(
    "black-forest-labs/FLUX.1-Kontext-dev",
    torch_dtype=torch.bfloat16,
).to("cuda")

# 2) Attach this LoRA adapter
pipe.load_lora_weights(
    "GbrlOl/thermal-fr-lora",
    weight_name="Flux_ter_50_redo_seed42.safetensors",
)

# 3) Preprocessed visible face (MTCNN-cropped, 512x512) as the I2I condition
visible = load_image("visible_face_512.png")

prompt = (
    "convert this image to a high-contrast thermal (8-12 µm) infrared view, "
    "monochrome grayscale, black background, preserve face structure, "
    "no visible-spectrum colours"
)

# Deterministic generation settings used to build PUCV-TER-S
thermal = pipe(
    image=visible,
    prompt=prompt,
    guidance_scale=4.0,
    num_inference_steps=20,
    generator=torch.Generator("cuda").manual_seed(42),
).images[0]

thermal.save("thermal_face.png")

Input preprocessing

For results consistent with the paper, preprocess visible images as in training: detect the face with MTCNN (first / highest-confidence detection, 10-pixel margin), crop, and resize to 512×512. The prompt above is fixed and was used for all generations. The full generation and evaluation pipeline is on GitHub.

🧪 Training details

  • Base model: FLUX.1 Kontext [dev] (flow-matching, I2I conditioning).
  • Adaptation: LoRA (rank 128, α 128) on all attention and feed-forward linear projections of the double-stream and single-stream blocks; base weights frozen.
  • Optimization: learning rate 1e-4, batch size 1, 3000 steps, single fixed prompt, seed 42.
  • Data: 50 synchronized visible–thermal pairs from PUCV-VTF; thermal captured with a FLIR Tau 2 640 (LWIR, 14-bit), contrast-normalized to 8-bit via per-image min–max scaling.
  • Hardware: 2× NVIDIA H100 (80 GB).

📊 Evaluation (summary)

Synthetic thermal faces from this adapter preserve subject identity at 99.87% rank-1 (d′ = 13.6) against real-thermal templates, versus 11.4% (Pix2Pix) and 3.5% (CycleGAN) under an identical 50-pair budget. An ArcFace recognizer trained only on the synthetic data transfers to real thermal benchmarks, including unseen-identity cross-sensor settings. Full protocol, confidence intervals and open-set results are in the code repository.

🔁 Reproducibility & code

Training, generation and evaluation code, plus the generation prompt and configuration: github.com/GbrlOl/thermal-fr-lora

The synthetic PUCV-TER-S dataset and the source PUCV-VTF recordings are available from the corresponding author upon reasonable request, subject to the consent conditions of the original captures. With the released code and these weights, the synthetic dataset can be regenerated exactly from the source visible images.

📜 License & intended use

This repository is labeled cc-by-nc-4.0 (attribution, non-commercial). Because the weights are a Derivative of FLUX.1 Kontext [dev], the upstream FLUX.1 [dev] Non-Commercial License and its Acceptable Use Policy also apply, and its restrictions (including non-commercial use only) propagate to these weights. In case of any conflict, the more restrictive terms govern. Commercial use of the base model requires a separate license from Black Forest Labs.

🔒 Ethical considerations

The synthetic images derive from consented captures (PUCV-VTF) and are intended solely for research on data scarcity in thermal biometrics. Identity-preserving generative models can, in principle, be misused to fabricate biometric samples; access is therefore gated, redistribution is non-commercial and attribution-bound, and downstream users are expected to adopt equivalent safeguards. No model capable of impersonating individuals outside the enrolled cohort is distributed.

📖 Citation

@article{11683418,
  author={Hermosilla, Gabriel and Jara, Ashley and Olmos, Gabriel and Soto, Lisa and Cocca-Guardia, Giovanni},
  journal={IEEE Access}, 
  title={Thermal Face Recognition From Synthetic Data: FLUX.1 Kontext Image-to-Image Adaptation and Cross-Sensor Evaluation}, 
  year={2026},
  volume={14},
  pages={137824-137840},
  doi={10.1109/ACCESS.2026.3731153}
}

🙏 Acknowledgements

Funded by ANID (FONDECYT Grant 1240573; ANID Magíster Nacional 2025-22251171; ANID Doctorado Nacional 2025-21251472), Pontificia Universidad Católica de Valparaíso (PUCV), Chile.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · diffusers

Нельзя запустить

Модели «картинка → картинка» пока не запускаются: нужен ввод изображения для diffusion.

Ревизия весов
0cd5bc6

0 моделей