Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: creativeml-openrail-m
|
| 3 |
+
tags:
|
| 4 |
+
- flux
|
| 5 |
+
- lora
|
| 6 |
+
- kontext
|
| 7 |
+
- avatar
|
| 8 |
+
- image-to-image
|
| 9 |
+
- style-transfer
|
| 10 |
+
- na'vi
|
| 11 |
+
- stable-diffusion
|
| 12 |
+
- art
|
| 13 |
+
- character-design
|
| 14 |
+
- ai-generated
|
| 15 |
+
inference: true
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# FLUX.1-Kontext-Dev Na'vi Style LoRA 🎨🧞♂️
|
| 19 |
+
|
| 20 |
+
This is a LoRA adapter trained on top of the [`black-forest-labs/FLUX.1-Kontext-dev`](https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev) model to transform images into *Avatar-style Na'vi characters*, inspired by the visuals from James Cameron's *Avatar* films.
|
| 21 |
+
|
| 22 |
+
## 📸 Example Outputs
|
| 23 |
+
|
| 24 |
+
| Input Image | Stylized Output |
|
| 25 |
+
|-------------|-----------------|
|
| 26 |
+
|  |  |
|
| 27 |
+
|
| 28 |
+
> *(Add your own examples by placing them in an `examples/` folder in the repo)*
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## 🧠 Model Details
|
| 33 |
+
|
| 34 |
+
- **Base Model**: FLUX.1-Kontext-dev (custom diffusion)
|
| 35 |
+
- **LoRA Rank**: 4 / 8 (depending on your version)
|
| 36 |
+
- **Training Resolution**: 512x512
|
| 37 |
+
- **Target Style**: Na'vi characters (blue skin, elongated facial features, glowing eyes, etc.)
|
| 38 |
+
- **Architecture**: LoRA fine-tuning with Stable Diffusion compatible UNet blocks.
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
## 💻 Usage
|
| 43 |
+
|
| 44 |
+
### In Diffusers
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
+
from diffusers import StableDiffusionPipeline
|
| 48 |
+
from peft import PeftModel
|
| 49 |
+
import torch
|
| 50 |
+
|
| 51 |
+
# Load the base model
|
| 52 |
+
pipe = StableDiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", torch_dtype=torch.float16).to("cuda")
|
| 53 |
+
|
| 54 |
+
# Load the LoRA adapter
|
| 55 |
+
pipe.unet.load_attn_procs("your-username/flux-kontext-na-vi-lora")
|
| 56 |
+
|
| 57 |
+
# Use the model
|
| 58 |
+
prompt = "A close-up portrait of a Na'vi warrior in a glowing forest, cinematic lighting"
|
| 59 |
+
image = pipe(prompt).images[0]
|
| 60 |
+
image.save("output.png")
|