File size: 1,141 Bytes
4deff51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69a1b4b
4deff51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
license: apache-2.0
language:
- en
base_model:
- black-forest-labs/FLUX.1-Kontext-dev
pipeline_tag: image-segmentation
tags:
- image-segmentation
- LoRA
- FLUX
- fashion
- computer-vision
---

# Hat-LoRA for Segmenting Hat Regions in Fashion Images

![Example](./hats-01-results.png)

## Model Overview

**Hat-LoRA** is a lightweight LoRA adapter designed for the FLUX.1 Kontext generative model, enabling automatic segmentation of a "hat" region on fashion images—even when hats are absent from the original image. This LoRA is specifically intended for virtual try-on and inpainting workflows, where constructing a precise mask for new or modified clothing items is critical.

## Intended Use

- Automatically generating a segmentation mask for a "hat" area.
- Facilitating downstream virtual try-on, inpainting, and style transfer tasks by providing a consistent mask for input images.
Prompts used:  
- **Caption:** `put a green mask for a hat on the person`

## Acknowledgments

Based on the FLUX.1 Kontext generative model, trained with Ostris’ AI Toolkit. See [video instructions](https://www.youtube.com/watch?v=WSWubJ4eFqI).