Nishitbaria
commited on
Commit
•
5d1552a
1
Parent(s):
793baed
Update README.md
Browse files
README.md
CHANGED
@@ -1,59 +1,80 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
-
- **Specialized for Anime Style:** Generates images with vibrant and detailed anime-style aesthetics.
|
7 |
-
- **Fine-tuned with 200+ Images:** Offers exceptional performance for anime-themed prompts.
|
8 |
-
- **Efficient and Flexible:** Works seamlessly with the 🧨 `diffusers` library.
|
9 |
|
10 |
---
|
11 |
|
12 |
-
##
|
13 |
-
|
|
|
|
|
14 |
|
15 |
-
|
|
|
|
|
16 |
```python
|
17 |
from diffusers import AutoPipelineForText2Image
|
18 |
import torch
|
19 |
|
20 |
-
# Load the base
|
21 |
pipeline = AutoPipelineForText2Image.from_pretrained(
|
22 |
-
|
23 |
torch_dtype=torch.float16
|
24 |
-
).to(
|
25 |
|
26 |
# Load the LoRA weights
|
27 |
-
pipeline.load_lora_weights(
|
28 |
|
29 |
# Generate an image
|
30 |
-
prompt = "animexl a
|
31 |
image = pipeline(prompt).images[0]
|
32 |
|
33 |
# Save or display the image
|
34 |
image.save("output.png")
|
35 |
-
```
|
36 |
-
|
37 |
-
---
|
38 |
-
|
39 |
-
## Trigger Words
|
40 |
-
To achieve the best results, include **`animexl`** in your prompts. For example:
|
41 |
-
- `"animexl a magical girl in a serene forest"`
|
42 |
-
- `"animexl a futuristic city with anime characters"`
|
43 |
-
|
44 |
-
---
|
45 |
-
|
46 |
-
## Advanced Usage
|
47 |
-
For additional techniques like:
|
48 |
-
- **Weighting prompts**
|
49 |
-
- **Merging and fusing multiple LoRAs**
|
50 |
-
|
51 |
-
Refer to the official [diffusers documentation on loading LoRAs](https://huggingface.co/docs/diffusers/using-diffusers/lora).
|
52 |
-
|
53 |
-
---
|
54 |
-
|
55 |
-
## About AnimeXL
|
56 |
-
AnimeXL is a finely-tuned model created to enhance creativity and cater to anime-style generation enthusiasts. Developed using **Replicate's LoRA Trainer** at:
|
57 |
-
[LoRA Trainer](https://replicate.com/ostris/flux-dev-lora-trainer/train).
|
58 |
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
license_name: flux-1-dev-non-commercial-license
|
4 |
+
license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
tags:
|
8 |
+
- flux
|
9 |
+
- diffusers
|
10 |
+
- lora
|
11 |
+
- replicate
|
12 |
+
- anime
|
13 |
+
- text-to-image
|
14 |
+
base_model: black-forest-labs/FLUX.1-dev
|
15 |
+
pipeline_tag: text-to-image
|
16 |
+
instance_prompt: animexl
|
17 |
+
widget:
|
18 |
+
- example_title: Futuristic Samurai
|
19 |
+
inputs:
|
20 |
+
prompt: animexl a cyberpunk samurai standing on a neon-lit rooftop, wearing black armor with glowing blue patterns, holding a katana with an electric blade, a bustling futuristic city in the background with flying cars and holographic billboards, cinematic lighting
|
21 |
+
outputs:
|
22 |
+
- image: https://example.com/samurai.png
|
23 |
+
- example_title: Magical Forest Scene
|
24 |
+
inputs:
|
25 |
+
prompt: animexl an ethereal elf princess with glowing silver hair, wearing a flowing emerald gown adorned with golden patterns, sitting by a glowing blue lake in an enchanted forest, surrounded by bioluminescent flowers, glowing fireflies, and ancient stone ruins covered in moss
|
26 |
+
outputs:
|
27 |
+
- image: https://example.com/forest.png
|
28 |
+
---
|
29 |
|
30 |
+
# AnimeXL - Fine-Tuned LoRA for Anime Image Generation
|
31 |
|
32 |
+
AnimeXL is a LoRA fine-tuned using 200+ anime-style images over 2500 training steps. It specializes in creating vibrant, highly detailed anime-style visuals. The model leverages the **FLUX.1-dev** base model and is compatible with the 🧨 `diffusers` library for seamless integration.
|
|
|
|
|
|
|
33 |
|
34 |
---
|
35 |
|
36 |
+
## Features
|
37 |
+
- **Trigger Word:** Use `animexl` in prompts to activate the model.
|
38 |
+
- **High Compatibility:** Fully integrated with `diffusers` and works with FLUX.1-dev.
|
39 |
+
- **Specialized Output:** Designed to generate anime-style artwork, perfect for creative projects.
|
40 |
|
41 |
+
## How to Use
|
42 |
+
|
43 |
+
### Using 🧨 Diffusers
|
44 |
```python
|
45 |
from diffusers import AutoPipelineForText2Image
|
46 |
import torch
|
47 |
|
48 |
+
# Load the base pipeline
|
49 |
pipeline = AutoPipelineForText2Image.from_pretrained(
|
50 |
+
"black-forest-labs/FLUX.1-dev",
|
51 |
torch_dtype=torch.float16
|
52 |
+
).to("cuda")
|
53 |
|
54 |
# Load the LoRA weights
|
55 |
+
pipeline.load_lora_weights("Nishit2411/AnimeXL", weight_name="lora.safetensors")
|
56 |
|
57 |
# Generate an image
|
58 |
+
prompt = "animexl a futuristic city with anime characters"
|
59 |
image = pipeline(prompt).images[0]
|
60 |
|
61 |
# Save or display the image
|
62 |
image.save("output.png")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
+
Trigger Words
|
65 |
+
Use animexl in prompts to achieve optimal results. Example prompts:
|
66 |
+
|
67 |
+
animexl a magical girl in a serene forest
|
68 |
+
animexl a samurai standing under a cherry blossom tree at sunset
|
69 |
+
About Training
|
70 |
+
AnimeXL was trained on Replicate's LoRA Trainer using the following configuration:
|
71 |
+
|
72 |
+
Base Model: FLUX.1-dev
|
73 |
+
Training Steps: 2500
|
74 |
+
Images: 200+ anime-style images
|
75 |
+
Resolution: 512x512, 768x768, and 1024x1024
|
76 |
+
Batch Size: 1
|
77 |
+
Optimizer: AdamW8bit with a learning rate of 0.0004
|
78 |
+
Scheduler: Flowmatch
|
79 |
+
Sampling: Flowmatch with 28 steps, guidance scale of 3.5
|
80 |
+
For more details, refer to Replicate's LoRA Trainer Documentation.
|