Update README.md
Browse files
README.md
CHANGED
@@ -2,22 +2,20 @@
|
|
2 |
license: other
|
3 |
---
|
4 |
|
5 |
-
|
6 |
|
7 |
This repository provides a checkpoint with trained ControlNet Canny model for
|
8 |
[FLUX.1-dev model](https://huggingface.co/black-forest-labs/FLUX.1-dev) by Black Forest Labs
|
9 |
|
10 |
# Training details
|
11 |
[XLabs AI](https://github.com/XLabs-AI) team is happy to publish fune-tuning Flux scripts, including:
|
12 |
-
|
13 |
- **LoRA** π₯
|
14 |
- **ControlNet** π₯
|
15 |
|
16 |
[See our github](https://github.com/XLabs-AI/x-flux) for train script and train configs.
|
17 |
|
18 |
-
# Training
|
19 |
Dataset has the following format for the training process:
|
20 |
-
|
21 |
```
|
22 |
βββ images/
|
23 |
β βββ 1.png
|
@@ -28,7 +26,38 @@ Dataset has the following format for the training process:
|
|
28 |
```
|
29 |
A .json file contains "caption" field with a text prompt.
|
30 |
|
31 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
controlnet.safetensors falls under the [FLUX.1 [dev]](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md) Non-Commercial License<br/>
|
34 |
controlnet.bin falls under the [FLUX.1 [dev]](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md) Non-Commercial License
|
|
|
2 |
license: other
|
3 |
---
|
4 |
|
5 |
+

|
6 |
|
7 |
This repository provides a checkpoint with trained ControlNet Canny model for
|
8 |
[FLUX.1-dev model](https://huggingface.co/black-forest-labs/FLUX.1-dev) by Black Forest Labs
|
9 |
|
10 |
# Training details
|
11 |
[XLabs AI](https://github.com/XLabs-AI) team is happy to publish fune-tuning Flux scripts, including:
|
|
|
12 |
- **LoRA** π₯
|
13 |
- **ControlNet** π₯
|
14 |
|
15 |
[See our github](https://github.com/XLabs-AI/x-flux) for train script and train configs.
|
16 |
|
17 |
+
# Training dataset
|
18 |
Dataset has the following format for the training process:
|
|
|
19 |
```
|
20 |
βββ images/
|
21 |
β βββ 1.png
|
|
|
26 |
```
|
27 |
A .json file contains "caption" field with a text prompt.
|
28 |
|
29 |
+
# Inference
|
30 |
+
|
31 |
+
To test our checkpoints, use commands presented below.
|
32 |
+
|
33 |
+
### LoRA
|
34 |
+
|
35 |
+
```bash
|
36 |
+
python3 demo_lora_inference.py \
|
37 |
+
--checkpoint lora.safetensors \
|
38 |
+
--prompt "A handsome girl in a suit covered with bold tattoos and holding a pistol. fantasy style, natural photo cinematic"
|
39 |
+
```
|
40 |
|
41 |
+

|
42 |
+
|
43 |
+
### ControlNet (Canny)
|
44 |
+
```bash
|
45 |
+
python3 demo_controlnet_inference.py \
|
46 |
+
--checkpoint controlnet.safetensors \
|
47 |
+
--control_image "input_image.jpg" \
|
48 |
+
--prompt "a handsome viking man with white hair, cinematic, MM full HD"
|
49 |
+
```
|
50 |
+

|
51 |
+
```bash
|
52 |
+
python3 demo_controlnet_inference.py \
|
53 |
+
--checkpoint controlnet.safetensors \
|
54 |
+
--control_image "input_image.jpg" \
|
55 |
+
--prompt "a dark evil mysterius house with ghosts, cinematic, MM full HD"
|
56 |
+
```
|
57 |
+
|
58 |
+

|
59 |
+
|
60 |
+
|
61 |
+
# License
|
62 |
controlnet.safetensors falls under the [FLUX.1 [dev]](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md) Non-Commercial License<br/>
|
63 |
controlnet.bin falls under the [FLUX.1 [dev]](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md) Non-Commercial License
|