You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-16
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,14 @@ Contains code for the text encoders (OpenAI CLIP-L/14, OpenCLIP bigG, Google T5-
6
6
7
7
Note: this repo is a reference library meant to assist partner organizations in implementing SD3.5/SD3. For alternate inference, use [Comfy](https://github.com/comfyanonymous/ComfyUI).
8
8
9
-
###Updates
9
+
## Updates
10
10
11
+
- Nov 26, 2024 : Released ControlNets for SD3.5-Large.
11
12
- Oct 29, 2024 : Released inference code for SD3.5-Medium.
12
13
- Oct 24, 2024 : Updated code license to MIT License.
13
14
- Oct 22, 2024 : Released inference code for SD3.5-Large, Large-Turbo. Also works on SD3-Medium.
14
15
15
-
###Download
16
+
## Download
16
17
17
18
Download the following models from HuggingFace into `models` directory:
18
19
1.[Stability AI SD3.5 Large](https://huggingface.co/stabilityai/stable-diffusion-3.5-large/blob/main/sd3.5_large.safetensors) or [Stability AI SD3.5 Large Turbo](https://huggingface.co/stabilityai/stable-diffusion-3.5-large-turbo/blob/main/sd3.5_large_turbo.safetensors) or [Stability AI SD3.5 Medium](https://huggingface.co/stabilityai/stable-diffusion-3.5-medium/blob/main/sd3.5_medium.safetensors)
@@ -22,12 +23,12 @@ Download the following models from HuggingFace into `models` directory:
22
23
23
24
This code also works for [Stability AI SD3 Medium](https://huggingface.co/stabilityai/stable-diffusion-3-medium/blob/main/sd3_medium.safetensors).
24
25
25
-
####ControlNets
26
+
### ControlNets
26
27
27
28
Optionally, download [SD3.5 Large ControlNets](https://huggingface.co/stabilityai/stable-diffusion-3.5-controlnets):
To use SD3.5 Large ControlNets, additionally download your chosen ControlNet model from the [model repository](https://huggingface.co/stabilityai/stable-diffusion-3.5-controlnets), then run inference, like so:
80
-
(a) Blur:
81
+
- Blur:
81
82
```sh
82
83
python sd3_infer.py --model models/sd3.5_large.safetensors --controlnet_ckpt models/sd3.5_large_controlnet_blur.safetensors --controlnet_cond_image inputs/blur.png --prompt "generated ai art, a tiny, lost rubber ducky in an action shot close-up, surfing the humongous waves, inside the tube, in the style of Kelly Slater"
83
84
```
84
-
(b) Canny:
85
+
- Canny:
85
86
```sh
86
87
python sd3_infer.py --model models/sd3.5_large.safetensors --controlnet_ckpt models/sd3.5_large_controlnet_canny.safetensors --controlnet_cond_image inputs/canny.png --prompt "A Night time photo taken by Leica M11, portrait of a Japanese woman in a kimono, looking at the camera, Cherry blossoms"
87
88
```
88
-
(c) Depth:
89
+
- Depth:
89
90
```sh
90
91
python sd3_infer.py --model models/sd3.5_large.safetensors --controlnet_ckpt models/sd3.5_large_controlnet_depth.safetensors --controlnet_cond_image inputs/depth.png --prompt "photo of woman, presumably in her mid-thirties, striking a balanced yoga pose on a rocky outcrop during dusk or dawn. She wears a light gray t-shirt and dark leggings. Her pose is dynamic, with one leg extended backward and the other bent at the knee, holding the moon close to her hand."
91
92
```
92
93
93
94
For details on preprocessing for each of the ControlNets, and examples, please review the [model card](https://huggingface.co/stabilityai/stable-diffusion-3.5-controlnets).
94
95
95
-
###File Guide
96
+
## File Guide
96
97
97
98
-`sd3_infer.py` - entry point, review this for basic usage of diffusion model
98
99
-`sd3_impls.py` - contains the wrapper around the MMDiTX and the VAE
@@ -104,7 +105,7 @@ For details on preprocessing for each of the ControlNets, and examples, please r
104
105
-`t5xxl.safetensors` (google T5-v1.1-XXL, can grab a public copy)
105
106
-`sd3.5_large.safetensors` or `sd3.5_large_turbo.safetensors` or `sd3.5_medium.safetensors` (or `sd3_medium.safetensors`)
106
107
107
-
###Code Origin
108
+
## Code Origin
108
109
109
110
The code included here originates from:
110
111
- Stability AI internal research code repository (MM-DiT)
@@ -113,10 +114,10 @@ The code included here originates from:
113
114
- Some code from ComfyUI internal Stability implementation of SD3 (for some code corrections and handlers)
114
115
- HuggingFace and upstream providers (for sections of CLIP/T5 code)
115
116
116
-
###Legal
117
+
## Legal
117
118
118
119
Check the LICENSE-CODE file.
119
120
120
-
####Note
121
+
### Note
121
122
122
123
Some code in `other_impls` originates from HuggingFace and is subject to [the HuggingFace Transformers Apache2 License](https://github.com/huggingface/transformers/blob/main/LICENSE)
0 commit comments