Skip to content

Commit 4e6fa96

Browse files
merge in README updates
1 parent 56e090d commit 4e6fa96

File tree

2 files changed

+17
-40
lines changed

2 files changed

+17
-40
lines changed

LICENSE-CODE

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ copies or substantial portions of the Software.
1414

1515
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1616
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17-
SOFTWARE.
17+
SOFTWARE.

README.md

+16-39
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Stable Diffusion 3 Micro-Reference Implementation
1+
# Stable Diffusion 3.5
22

33
Inference-only tiny reference implementation of SD3.5 and SD3 - everything you need for simple inference using SD3.5/SD3, excluding the weights files.
44

@@ -26,8 +26,8 @@ This code also works for [Stability AI SD3 Medium](https://huggingface.co/stabil
2626

2727
```sh
2828
# Note: on windows use "python" not "python3"
29-
python3 -s -m venv venv
30-
source ./venv/bin/activate
29+
python3 -s -m venv .sd3.5
30+
source .sd3.5/bin/activate
3131
# or on windows: venv/scripts/activate
3232
python3 -s -m pip install -r requirements.txt
3333
```
@@ -47,13 +47,10 @@ python3 sd3_infer.py --prompt path/to/my_prompts.txt --model models/sd3.5_medium
4747
python3 sd3_infer.py --prompt path/to/my_prompts.txt --model models/sd3_medium.safetensors
4848
```
4949

50+
Images will be output to `outputs/<MODEL>/<PROMPT>_<DATETIME>_<POSTFIX>` by default.
51+
To add a postfix to the output directory, add `--postfix <my_postfix>`. For example,
5052
```sh
51-
# Generate a cat on ref model with default settings
52-
python3 -s sd3_infer.py
53-
# Generate a 1024 cat on SD3-8B
54-
python3 -s sd3_infer.py --width 1024 --height 1024 --shift 3 --model models/sd3_medium.safetensors --prompt "cute wallpaper art of a cat"
55-
# Or for parameter listing
56-
python3 -s sd3_infer.py --help
53+
python3 sd3_infer.py --prompt path/to/my_prompts.txt --postfix "steps100" --steps 100
5754
```
5855

5956
To change the resolution of the generated image, add `--width <WIDTH> --height <HEIGHT>`.
@@ -65,13 +62,13 @@ python3 sd3_infer.py --prompt path/to/my_prompts.txt --model models/sd3.5_medium
6562

6663
### File Guide
6764

68-
- `sd3_infer.py` - entry point, review this for basic usage of diffusion model and the triple-tenc cat
69-
- `sd3_impls.py` - contains the wrapper around the MMDiT and the VAE
70-
- `other_impls.py` - contains the CLIP model, the T5 model, and some utilities
71-
- `mmdit.py` - contains the core of the MMDiT itself
65+
- `sd3_infer.py` - entry point, review this for basic usage of diffusion model
66+
- `sd3_impls.py` - contains the wrapper around the MMDiTX and the VAE
67+
- `other_impls.py` - contains the CLIP models, the T5 model, and some utilities
68+
- `mmditx.py` - contains the core of the MMDiT-X itself
7269
- folder `models` with the following files (download separately):
73-
- `clip_g.safetensors` (openclip bigG, same as SDXL, can grab a public copy)
74-
- `clip_l.safetensors` (OpenAI CLIP-L, same as SDXL, can grab a public copy)
70+
- `clip_l.safetensors` (OpenAI CLIP-L, same as SDXL/SD3, can grab a public copy)
71+
- `clip_g.safetensors` (openclip bigG, same as SDXL/SD3, can grab a public copy)
7572
- `t5xxl.safetensors` (google T5-v1.1-XXL, can grab a public copy)
7673
- `sd3.5_large.safetensors` or `sd3.5_large_turbo.safetensors` or `sd3.5_medium.safetensors` (or `sd3_medium.safetensors`)
7774

@@ -80,34 +77,14 @@ python3 sd3_infer.py --prompt path/to/my_prompts.txt --model models/sd3.5_medium
8077
The code included here originates from:
8178
- Stability AI internal research code repository (MM-DiT)
8279
- Public Stability AI repositories (eg VAE)
83-
- Some unique code for this reference repo written by Alex Goodwin for Stability AI
84-
- Some code from ComfyUI internal Stability impl of SD3 (for some code corrections and handlers)
80+
- Some unique code for this reference repo written by Alex Goodwin and Vikram Voleti for Stability AI
81+
- Some code from ComfyUI internal Stability implementation of SD3 (for some code corrections and handlers)
8582
- HuggingFace and upstream providers (for sections of CLIP/T5 code)
8683

8784
### Legal
8885

89-
MIT License
90-
91-
Copyright (c) 2024 Stability AI
92-
93-
Permission is hereby granted, free of charge, to any person obtaining a copy
94-
of this software and associated documentation files (the "Software"), to deal
95-
in the Software without restriction, including without limitation the rights
96-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
97-
copies of the Software, and to permit persons to whom the Software is
98-
furnished to do so, subject to the following conditions:
99-
100-
The above copyright notice and this permission notice shall be included in all
101-
copies or substantial portions of the Software.
102-
103-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
104-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
105-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
106-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
107-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
108-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
109-
SOFTWARE.
86+
Check the LICENSE-CODE file.
11087

11188
#### Note
11289

113-
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)
90+
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

Comments
 (0)