|
--- |
|
tags: |
|
- text-to-image |
|
- lora |
|
- diffusers |
|
- flux |
|
base_model: black-forest-labs/FLUX.1-dev |
|
license: creativeml-openrail-m |
|
library_name: diffusers |
|
--- |
|
|
|
# Flux.1-Dev LoRA Adapter Trained on Me |
|
|
|
LoRA Adapter for [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev) trained on 22 pictures of young women wearing a traditional Vietnamese dess `ao dai` with [ai-toolkit](https://github.com/ostris/ai-toolkit/tree/main) |
|
|
|
# Model Details |
|
|
|
**Some Amusing Examples** |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(1).png" width=576> |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(3).png" width=576> |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(4).png" width=576> |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(5).png" width=576> |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(6).png" width=576> |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(7).png" width=576> |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(8).png" width=576> |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(9).png" width=576> |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(10).png" width=576> |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(11).png" width=576> |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(12).png" width=576> |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(13).png" width=576> |
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/aodai%20(13).png" width=576> |
|
LoRA was trained with the trigger phrase `a0da1` |
|
|
|
Full training config available at [train_lora_flux.yaml](./train_lora_flux.yaml) |
|
|
|
# Usage |
|
|
|
With diffusers package |
|
*Note: FLUX uses ~70GBvram when loaded directly with diffusers* |
|
*Note: Recommended to load at ~70% scale for best results* |
|
|
|
```python |
|
from diffusers import DiffusionPipeline |
|
|
|
pipeline = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev") |
|
pipeline.load_lora_weights("dtthanh/aodai_v2", weight_name="aodai_v2.safetensors") |
|
pipeline.to("cuda") |
|
|
|
prompt = "a photo of a young Asian women dressed in traditional Vietnamese dress called a0da1." |
|
|
|
out = pipeline( |
|
prompt=prompt, |
|
guidance_scale=3.5, |
|
num_inference_steps=20, |
|
cross_attention_kwargs={"scale": 0.7} |
|
).images[0] |
|
|
|
out.save("aodai.png") |
|
``` |
|
|
|
ComfyUI Workflow |
|
|
|
trigger: a0da1 |
|
|
|
prompt: "a photo of a young [enethnicity] women dressed in traditional Vietnamese dress called a0da1." |
|
|
|
|
|
<img src="https://huggingface.co/dtthanh/aodai_v2/resolve/main/Screenshot%202024-09-08%20101527.png" width=800> |
|
|
|
File available at [workflow_aodai_lora_v2.json](workflow_aodai_lora_v2.json) |
|
|
|
# Additional Details |
|
|
|
Please see base model page [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev) for all details on appropriate usage, licensing, and more. |