Skip to content

Commit 6a6dfe1

Browse files
Rename (#4294)
* up * Apply suggestions from code review * Apply suggestions from code review * up
1 parent b83bdce commit 6a6dfe1

File tree

9 files changed

+31
-31
lines changed

9 files changed

+31
-31
lines changed

docs/source/en/api/pipelines/stable_diffusion/stable_diffusion_xl.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ The abstract of the paper is the following:
2626

2727
### Available checkpoints:
2828

29-
- *Text-to-Image (1024x1024 resolution)*: [stabilityai/stable-diffusion-xl-base-0.9](https://huggingface.co/stabilityai/stable-diffusion-xl-base-0.9) with [`StableDiffusionXLPipeline`]
30-
- *Image-to-Image / Refiner (1024x1024 resolution)*: [stabilityai/stable-diffusion-xl-refiner-0.9](https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-0.9) with [`StableDiffusionXLImg2ImgPipeline`]
29+
- *Text-to-Image (1024x1024 resolution)*: [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) with [`StableDiffusionXLPipeline`]
30+
- *Image-to-Image / Refiner (1024x1024 resolution)*: [stabilityai/stable-diffusion-xl-refiner-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0) with [`StableDiffusionXLImg2ImgPipeline`]
3131

3232
## Usage Example
3333

@@ -50,7 +50,7 @@ from diffusers import StableDiffusionXLPipeline
5050
import torch
5151

5252
pipe = StableDiffusionXLPipeline.from_pretrained(
53-
"stabilityai/stable-diffusion-xl-base-0.9", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
53+
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
5454
)
5555
pipe.to("cuda")
5656

@@ -68,7 +68,7 @@ from diffusers import StableDiffusionXLImg2ImgPipeline
6868
from diffusers.utils import load_image
6969

7070
pipe = StableDiffusionXLImg2ImgPipeline.from_pretrained(
71-
"stabilityai/stable-diffusion-xl-refiner-0.9", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
71+
"stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
7272
)
7373
pipe = pipe.to("cuda")
7474
url = "https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/aa_xl/000000009.png"
@@ -88,7 +88,7 @@ from diffusers import StableDiffusionXLInpaintPipeline
8888
from diffusers.utils import load_image
8989

9090
pipe = StableDiffusionXLInpaintPipeline.from_pretrained(
91-
"stabilityai/stable-diffusion-xl-base-0.9", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
91+
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
9292
)
9393
pipe.to("cuda")
9494

@@ -104,8 +104,8 @@ image = pipe(prompt=prompt, image=init_image, mask_image=mask_image, num_inferen
104104

105105
### Refining the image output
106106

107-
In addition to the [base model checkpoint](https://huggingface.co/stabilityai/stable-diffusion-xl-base-0.9),
108-
StableDiffusion-XL also includes a [refiner checkpoint](huggingface.co/stabilityai/stable-diffusion-xl-refiner-0.9)
107+
In addition to the [base model checkpoint](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0),
108+
StableDiffusion-XL also includes a [refiner checkpoint](huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0)
109109
that is specialized in denoising low-noise stage images to generate images of improved high-frequency quality.
110110
This refiner checkpoint can be used as a "second-step" pipeline after having run the base checkpoint to improve
111111
image quality.
@@ -149,12 +149,12 @@ from diffusers import DiffusionPipeline
149149
import torch
150150

151151
base = DiffusionPipeline.from_pretrained(
152-
"stabilityai/stable-diffusion-xl-base-0.9", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
152+
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
153153
)
154154
pipe.to("cuda")
155155

156156
refiner = DiffusionPipeline.from_pretrained(
157-
"stabilityai/stable-diffusion-xl-refiner-0.9",
157+
"stabilityai/stable-diffusion-xl-refiner-1.0",
158158
text_encoder_2=base.text_encoder_2,
159159
vae=base.vae,
160160
torch_dtype=torch.float16,
@@ -219,7 +219,7 @@ The ensemble-of-experts method works well on all available schedulers!
219219
#### 2.) Refining the image output from fully denoised base image
220220

221221
In standard [`StableDiffusionImg2ImgPipeline`]-fashion, the fully-denoised image generated of the base model
222-
can be further improved using the [refiner checkpoint](huggingface.co/stabilityai/stable-diffusion-xl-refiner-0.9).
222+
can be further improved using the [refiner checkpoint](huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0).
223223

224224
For this, you simply run the refiner as a normal image-to-image pipeline after the "base" text-to-image
225225
pipeline. You can leave the outputs of the base model in latent space.
@@ -229,12 +229,12 @@ from diffusers import DiffusionPipeline
229229
import torch
230230

231231
pipe = DiffusionPipeline.from_pretrained(
232-
"stabilityai/stable-diffusion-xl-base-0.9", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
232+
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
233233
)
234234
pipe.to("cuda")
235235

236236
refiner = DiffusionPipeline.from_pretrained(
237-
"stabilityai/stable-diffusion-xl-refiner-0.9",
237+
"stabilityai/stable-diffusion-xl-refiner-1.0",
238238
text_encoder_2=pipe.text_encoder_2,
239239
vae=pipe.vae,
240240
torch_dtype=torch.float16,
@@ -267,12 +267,12 @@ from diffusers import StableDiffusionXLInpaintPipeline
267267
from diffusers.utils import load_image
268268

269269
pipe = StableDiffusionXLInpaintPipeline.from_pretrained(
270-
"stabilityai/stable-diffusion-xl-base-0.9", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
270+
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
271271
)
272272
pipe.to("cuda")
273273

274274
refiner = StableDiffusionXLInpaintPipeline.from_pretrained(
275-
"stabilityai/stable-diffusion-xl-refiner-0.9",
275+
"stabilityai/stable-diffusion-xl-refiner-1.0",
276276
text_encoder_2=pipe.text_encoder_2,
277277
vae=pipe.vae,
278278
torch_dtype=torch.float16,
@@ -321,12 +321,12 @@ from diffusers import StableDiffusionXLPipeline, StableDiffusionXLImg2ImgPipelin
321321
import torch
322322

323323
pipe = StableDiffusionXLPipeline.from_single_file(
324-
"./sd_xl_base_0.9.safetensors", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
324+
"./sd_xl_base_1.0.safetensors", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
325325
)
326326
pipe.to("cuda")
327327

328328
refiner = StableDiffusionXLImg2ImgPipeline.from_single_file(
329-
"./sd_xl_refiner_0.9.safetensors", torch_dtype=torch.float16, use_safetensors=True, variant="fp16"
329+
"./sd_xl_refiner_1.0.safetensors", torch_dtype=torch.float16, use_safetensors=True, variant="fp16"
330330
)
331331
refiner.to("cuda")
332332
```
@@ -399,7 +399,7 @@ from diffusers import StableDiffusionXLPipeline
399399
import torch
400400

401401
pipe = StableDiffusionXLPipeline.from_pretrained(
402-
"stabilityai/stable-diffusion-xl-base-0.9", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
402+
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
403403
)
404404
pipe.to("cuda")
405405

examples/controlnet/README_sdxl.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ wget https://huggingface.co/datasets/huggingface/documentation-images/resolve/ma
6161
Then run `huggingface-cli login` to log into your Hugging Face account. This is needed to be able to push the trained ControlNet parameters to Hugging Face Hub.
6262

6363
```bash
64-
export MODEL_DIR="stabilityai/stable-diffusion-xl-base-0.9"
64+
export MODEL_DIR="stabilityai/stable-diffusion-xl-base-1.0"
6565
export OUTPUT_DIR="path to save model"
6666

6767
accelerate launch train_controlnet_sdxl.py \
@@ -98,7 +98,7 @@ from diffusers import StableDiffusionXLControlNetPipeline, ControlNetModel, UniP
9898
from diffusers.utils import load_image
9999
import torch
100100

101-
base_model_path = "stabilityai/stable-diffusion-xl-base-0.9"
101+
base_model_path = "stabilityai/stable-diffusion-xl-base-1.0"
102102
controlnet_path = "path to controlnet"
103103

104104
controlnet = ControlNetModel.from_pretrained(controlnet_path, torch_dtype=torch.float16)

examples/controlnet/train_controlnet_sdxl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def save_model_card(repo_id: str, image_logs=None, base_model=str, repo_folder=N
231231
232232
## License
233233
234-
[SDXL 0.9 Research License](https://huggingface.co/stabilityai/stable-diffusion-xl-base-0.9/blob/main/LICENSE.md)
234+
[SDXL 1.0 License](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/LICENSE.md)
235235
"""
236236
with open(os.path.join(repo_folder, "README.md"), "w") as f:
237237
f.write(yaml + model_card)

examples/dreambooth/README_sdxl.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ This will also allow us to push the trained LoRA parameters to the Hugging Face
7676
Now, we can launch training using:
7777

7878
```bash
79-
export MODEL_NAME="stabilityai/stable-diffusion-xl-base-0.9"
79+
export MODEL_NAME="stabilityai/stable-diffusion-xl-base-1.0"
8080
export INSTANCE_DIR="dog"
8181
export OUTPUT_DIR="lora-trained-xl"
8282

@@ -127,7 +127,7 @@ image = pipe("A picture of a sks dog in a bucket", num_inference_steps=25).image
127127
image.save("sks_dog.png")
128128
```
129129

130-
We can further refine the outputs with the [Refiner](https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-0.9):
130+
We can further refine the outputs with the [Refiner](https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0):
131131

132132
```python
133133
from huggingface_hub.repocard import RepoCard
@@ -145,7 +145,7 @@ pipe.load_lora_weights(lora_model_id)
145145

146146
# Load the refiner.
147147
refiner = StableDiffusionXLImg2ImgPipeline.from_pretrained(
148-
"stabilityai/stable-diffusion-xl-refiner-0.9", torch_dtype=torch.float16, use_safetensors=True, variant="fp16"
148+
"stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16, use_safetensors=True, variant="fp16"
149149
)
150150
refiner.to("cuda")
151151

examples/dreambooth/train_dreambooth_lora_sdxl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def save_model_card(
9797
9898
## License
9999
100-
[SDXL 0.9 Research License](https://huggingface.co/stabilityai/stable-diffusion-xl-base-0.9/blob/main/LICENSE.md)
100+
[SDXL 1.0 License](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/LICENSE.md)
101101
"""
102102
with open(os.path.join(repo_folder, "README.md"), "w") as f:
103103
f.write(yaml + model_card)

examples/instruct_pix2pix/README_sdxl.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ training procedure while being faithful to the [original implementation](https:/
1515

1616
Refer to the original InstructPix2Pix training example for installing the dependencies.
1717

18-
You will also need to get access of SDXL by filling the [form](https://huggingface.co/stabilityai/stable-diffusion-xl-base-0.9).
18+
You will also need to get access of SDXL by filling the [form](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0).
1919

2020
### Toy example
2121

@@ -26,7 +26,7 @@ Configure environment variables such as the dataset identifier and the Stable Di
2626
checkpoint:
2727

2828
```bash
29-
export MODEL_NAME="stabilityai/stable-diffusion-xl-base-0.9"
29+
export MODEL_NAME="stabilityai/stable-diffusion-xl-base-1.0"
3030
export DATASET_ID="fusing/instructpix2pix-1000-samples"
3131
```
3232

@@ -51,7 +51,7 @@ with Weights and Biases. You can enable this feature with `report_to="wandb"`:
5151

5252
```bash
5353
python train_instruct_pix2pix_xl.py \
54-
--pretrained_model_name_or_path=stabilityai/stable-diffusion-xl-base-0.9 \
54+
--pretrained_model_name_or_path=stabilityai/stable-diffusion-xl-base-1.0 \
5555
--dataset_name=$DATASET_ID \
5656
--use_ema \
5757
--enable_xformers_memory_efficient_attention \
@@ -80,7 +80,7 @@ for running distributed training with `accelerate`. Here is an example command:
8080

8181
```bash
8282
accelerate launch --mixed_precision="fp16" --multi_gpu train_instruct_pix2pix.py \
83-
--pretrained_model_name_or_path=stabilityai/stable-diffusion-xl-base-0.9 \
83+
--pretrained_model_name_or_path=stabilityai/stable-diffusion-xl-base-1.0 \
8484
--dataset_name=$DATASET_ID \
8585
--use_ema \
8686
--enable_xformers_memory_efficient_attention \

src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
>>> from diffusers import StableDiffusionXLPipeline
5151
5252
>>> pipe = StableDiffusionXLPipeline.from_pretrained(
53-
... "stabilityai/stable-diffusion-xl-base-0.9", torch_dtype=torch.float16
53+
... "stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16
5454
... )
5555
>>> pipe = pipe.to("cuda")
5656

src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
>>> from diffusers.utils import load_image
5353
5454
>>> pipe = StableDiffusionXLImg2ImgPipeline.from_pretrained(
55-
... "stabilityai/stable-diffusion-xl-refiner-0.9", torch_dtype=torch.float16
55+
... "stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16
5656
... )
5757
>>> pipe = pipe.to("cuda")
5858
>>> url = "https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/aa_xl/000000009.png"

src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_inpaint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
>>> from diffusers.utils import load_image
4848
4949
>>> pipe = StableDiffusionXLInpaintPipeline.from_pretrained(
50-
... "stabilityai/stable-diffusion-xl-base-0.9",
50+
... "stabilityai/stable-diffusion-xl-base-1.0",
5151
... torch_dtype=torch.float16,
5252
... variant="fp16",
5353
... use_safetensors=True,

0 commit comments

Comments
 (0)