anghellia commited on
Commit
ec66d9f
β€’
1 Parent(s): aee78d9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +138 -0
README.md CHANGED
@@ -1,3 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
  ![Controlnet collections for Flux](https://github.com/XLabs-AI/x-flux/blob/main/assets/readme/light/flux-controlnet-collections.png?raw=true)
3
  [<img src="https://github.com/XLabs-AI/x-flux/blob/main/assets/readme/light/join-our-discord-rev1.png?raw=true">](https://discord.gg/FHY2guThfy)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.
5
+ language:
6
+ - en
7
+ pipeline_tag: text-to-image
8
+ tags:
9
+ - LoRA
10
+ - Stable Diffusion
11
+ - image-generation
12
+ - Flux
13
+ ---
14
 
15
  ![Controlnet collections for Flux](https://github.com/XLabs-AI/x-flux/blob/main/assets/readme/light/flux-controlnet-collections.png?raw=true)
16
  [<img src="https://github.com/XLabs-AI/x-flux/blob/main/assets/readme/light/join-our-discord-rev1.png?raw=true">](https://discord.gg/FHY2guThfy)
17
+
18
+ This repository provides a collection of ControlNet checkpoints for
19
+ [FLUX.1-dev model](https://huggingface.co/black-forest-labs/FLUX.1-dev) by Black Forest Labs
20
+
21
+ ![Example Picture 1](https://github.com/XLabs-AI/x-flux/blob/main/assets/readme/examples/depth_example_3.png?raw=true)
22
+
23
+ # Training details
24
+ [XLabs AI](https://github.com/XLabs-AI) team is happy to publish fune-tuning Flux scripts, including:
25
+
26
+ - **LoRA** πŸ”₯
27
+ - **ControlNet** πŸ”₯
28
+
29
+ [See our github](https://github.com/XLabs-AI/x-flux) for train script and train configs.
30
+
31
+ # Training Dataset
32
+ Dataset has the following format for the training process:
33
+
34
+ ```
35
+ β”œβ”€β”€ images/
36
+ β”‚ β”œβ”€β”€ 1.png
37
+ β”‚ β”œβ”€β”€ 1.json
38
+ β”‚ β”œβ”€β”€ 2.png
39
+ β”‚ β”œβ”€β”€ 2.json
40
+ β”‚ β”œβ”€β”€ ...
41
+ ```
42
+ A .json file contains "caption" field with a text prompt.
43
+
44
+
45
+ # Models
46
+
47
+ Our collection supports 3 models:
48
+ - Canny
49
+ - HED
50
+ - Depth (Midas)
51
+
52
+ Each ControlNet is trained on 1024x1024 resolution.
53
+ However, we recommend you to generate images with 1024x1024 for Depth, and use 768x768 resolution for Canny and HED for better results.
54
+
55
+ # Inference
56
+ Use main.py from our [official repo](https://github.com/XLabs-AI/x-flux)
57
+
58
+ We do not guarantee that our checkpoints will work 100% correctly with other repositories and tools due to the nature of our sampling implementation and so on until we add our support.
59
+
60
+
61
+
62
+ ## Canny ControlNet
63
+ ```bash
64
+ python3 main.py \
65
+ --prompt "a viking man with white hair looking, cinematic, MM full HD" \
66
+ --image input_image_canny.jpg \
67
+ --control_type canny \
68
+ --repo_id XLabs-AI/flux-controlnet-collections --name flux-canny-controlnet.safetensors --device cuda --use_controlnet \
69
+ --model_type flux-dev --width 768 --height 768 \
70
+ --timestep_to_start_cfg 1 --num_steps 25 --true_gs 3.5 --guidance 4
71
+
72
+ ```
73
+ ![Example Picture 1](https://github.com/XLabs-AI/x-flux/blob/main/assets/readme/examples/canny_example_1.png?raw=true)
74
+
75
+ ## Depth ControlNet
76
+ ```bash
77
+ python3 main.py \
78
+ --prompt "Photo of the bold man with beard and laptop, full hd, cinematic photo" \
79
+ --image input_image_depth1.jpg \
80
+ --control_type depth \
81
+ --repo_id XLabs-AI/flux-controlnet-collections --name flux-depth-controlnet.safetensors --device cuda --use_controlnet \
82
+ --model_type flux-dev --width 1024 --height 1024 \
83
+ --timestep_to_start_cfg 1 --num_steps 25 --true_gs 3.5 --guidance 4
84
+
85
+ ```
86
+ ![Example Picture 2](https://github.com/XLabs-AI/x-flux/blob/main/assets/readme/examples/depth_example_1.png?raw=true)
87
+
88
+ ```bash
89
+ python3 main.py \
90
+ --prompt "photo of handsome fluffy black dog standing on a forest path, full hd, cinematic photo" \
91
+ --image input_image_depth2.jpg \
92
+ --control_type depth \
93
+ --repo_id XLabs-AI/flux-controlnet-collections --name flux-depth-controlnet.safetensors --device cuda --use_controlnet \
94
+ --model_type flux-dev --width 1024 --height 1024 \
95
+ --timestep_to_start_cfg 1 --num_steps 25 --true_gs 3.5 --guidance 4
96
+
97
+ ```
98
+ ![Example Picture 2](https://github.com/XLabs-AI/x-flux/blob/main/assets/readme/examples/depth_example_2.png?raw=true)
99
+
100
+ ```bash
101
+ python3 main.py \
102
+ --prompt "Photo of japanese village with houses and sakura, full hd, cinematic photo" \
103
+ --image input_image_depth3.webp \
104
+ --control_type depth \
105
+ --repo_id XLabs-AI/flux-controlnet-collections --name flux-depth-controlnet.safetensors --device cuda --use_controlnet \
106
+ --model_type flux-dev --width 1024 --height 1024 \
107
+ --timestep_to_start_cfg 1 --num_steps 25 --true_gs 3.5 --guidance 4
108
+
109
+ ```
110
+ ![Example Picture 2](https://github.com/XLabs-AI/x-flux/blob/main/assets/readme/examples/depth_example_3.png?raw=true)
111
+
112
+
113
+ ## HED ControlNet
114
+ ```bash
115
+ python3 main.py \
116
+ --prompt "2d art of a sitting african rich woman, full hd, cinematic photo" \
117
+ --image input_image_hed1.jpg \
118
+ --control_type hed \
119
+ --repo_id XLabs-AI/flux-controlnet-collections --name flux-hed-controlnet.safetensors --device cuda --use_controlnet \
120
+ --model_type flux-dev --width 768 --height 768 \
121
+ --timestep_to_start_cfg 1 --num_steps 25 --true_gs 3.5 --guidance 4
122
+
123
+ ```
124
+ ![Example Picture 2](https://github.com/XLabs-AI/x-flux/blob/main/assets/readme/examples/hed_example_1.png?raw=true)
125
+
126
+ ```bash
127
+ python3 main.py \
128
+ --prompt "anime ghibli style art of a running happy white dog, full hd" \
129
+ --image input_image_hed2.jpg \
130
+ --control_type hed \
131
+ --repo_id XLabs-AI/flux-controlnet-collections --name flux-hed-controlnet.safetensors --device cuda --use_controlnet \
132
+ --model_type flux-dev --width 768 --height 768 \
133
+ --timestep_to_start_cfg 1 --num_steps 25 --true_gs 3.5 --guidance 4
134
+
135
+ ```
136
+ ![Example Picture 2](https://github.com/XLabs-AI/x-flux/blob/main/assets/readme/examples/hed_example_2.png?raw=true)
137
+
138
+
139
+ ## License
140
+
141
+ Our weights fall under the [FLUX.1 [dev]](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md) Non-Commercial License<br/>