Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- text-to-image
|
| 4 |
+
- lora
|
| 5 |
+
- diffusers
|
| 6 |
+
- flux
|
| 7 |
+
base_model: black-forest-labs/FLUX.1-dev
|
| 8 |
+
license: creativeml-openrail-m
|
| 9 |
+
library_name: diffusers
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Flux.1-Dev LoRA Adapter Trained on Me
|
| 13 |
+
|
| 14 |
+
LoRA Adapter for [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev) trained on pictures of me with [ai-toolkit](https://github.com/ostris/ai-toolkit/tree/main)
|
| 15 |
+
|
| 16 |
+
# Model Details
|
| 17 |
+
|
| 18 |
+
**Some Amusing Examples**
|
| 19 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/65ba68a15d2ef0a4b2c892b4/ZG8SCJngcopb_eapEIWpf.png" width=400>
|
| 20 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/65ba68a15d2ef0a4b2c892b4/9EJxi0-wVpRmhndEOtqet.png" width=400>
|
| 21 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/65ba68a15d2ef0a4b2c892b4/yzM48yFaHmHgYFAQJdATw.png" width=400>
|
| 22 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/65ba68a15d2ef0a4b2c892b4/Ye1-e96hf1g1BPB29CyUE.png" width=400>
|
| 23 |
+
|
| 24 |
+
LoRA was trained with the trigger phrase `4d4m luc3k`
|
| 25 |
+
|
| 26 |
+
Full training config available at [train_lora_flux_me.yaml](./train_lora_flux_me.yaml)
|
| 27 |
+
|
| 28 |
+
# Usage
|
| 29 |
+
|
| 30 |
+
With diffusers package
|
| 31 |
+
*Note: FLUX uses ~70GBvram when loaded directly with diffusers*
|
| 32 |
+
*Note: Recommended to load at ~70% scale for best results*
|
| 33 |
+
|
| 34 |
+
```python
|
| 35 |
+
from diffusers import DiffusionPipeline
|
| 36 |
+
|
| 37 |
+
pipeline = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")
|
| 38 |
+
pipeline.load_lora_weights("AdamLucek/FLUX.1-dev-lora-adaml", weight_name="flux_lora_Adam.safetensors.safetensors")
|
| 39 |
+
pipeline.to("cuda")
|
| 40 |
+
|
| 41 |
+
prompt = "4d4m luc3k as a DJ in a fancy nightclub wearing sunglasses."
|
| 42 |
+
|
| 43 |
+
out = pipeline(
|
| 44 |
+
prompt=prompt,
|
| 45 |
+
guidance_scale=3.5,
|
| 46 |
+
num_inference_steps=50,
|
| 47 |
+
cross_attention_kwargs={"scale": 0.7}
|
| 48 |
+
).images[0]
|
| 49 |
+
|
| 50 |
+
out.save("adam_flux_lora.png")
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
ComfyUI Setup
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/65ba68a15d2ef0a4b2c892b4/7c_8aakMNzY4OPjSn5q-5.png" width=800>
|
| 57 |
+
|
| 58 |
+
File available at [workflow_adamlora.json](workflow_adamlora.json)
|
| 59 |
+
|
| 60 |
+
# Additional Details
|
| 61 |
+
|
| 62 |
+
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.
|