Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
d63e6fcc
Unverified
Commit
d63e6fcc
authored
Apr 16, 2025
by
Ishan Modi
Committed by
GitHub
Apr 16, 2025
Browse files
[BUG] fixed _toctree.yml alphabetical ordering (#11277)
update
parent
59f1b7b1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
34 deletions
+86
-34
docs/source/en/_toctree.yml
docs/source/en/_toctree.yml
+30
-30
utils/check_doc_toc.py
utils/check_doc_toc.py
+56
-4
No files found.
docs/source/en/_toctree.yml
View file @
d63e6fcc
...
@@ -290,12 +290,12 @@
...
@@ -290,12 +290,12 @@
title
:
AuraFlowTransformer2DModel
title
:
AuraFlowTransformer2DModel
-
local
:
api/models/cogvideox_transformer3d
-
local
:
api/models/cogvideox_transformer3d
title
:
CogVideoXTransformer3DModel
title
:
CogVideoXTransformer3DModel
-
local
:
api/models/consisid_transformer3d
title
:
ConsisIDTransformer3DModel
-
local
:
api/models/cogview3plus_transformer2d
-
local
:
api/models/cogview3plus_transformer2d
title
:
CogView3PlusTransformer2DModel
title
:
CogView3PlusTransformer2DModel
-
local
:
api/models/cogview4_transformer2d
-
local
:
api/models/cogview4_transformer2d
title
:
CogView4Transformer2DModel
title
:
CogView4Transformer2DModel
-
local
:
api/models/consisid_transformer3d
title
:
ConsisIDTransformer3DModel
-
local
:
api/models/dit_transformer2d
-
local
:
api/models/dit_transformer2d
title
:
DiTTransformer2DModel
title
:
DiTTransformer2DModel
-
local
:
api/models/easyanimate_transformer3d
-
local
:
api/models/easyanimate_transformer3d
...
@@ -310,12 +310,12 @@
...
@@ -310,12 +310,12 @@
title
:
HunyuanVideoTransformer3DModel
title
:
HunyuanVideoTransformer3DModel
-
local
:
api/models/latte_transformer3d
-
local
:
api/models/latte_transformer3d
title
:
LatteTransformer3DModel
title
:
LatteTransformer3DModel
-
local
:
api/models/lumina_nextdit2d
title
:
LuminaNextDiT2DModel
-
local
:
api/models/lumina2_transformer2d
title
:
Lumina2Transformer2DModel
-
local
:
api/models/ltx_video_transformer3d
-
local
:
api/models/ltx_video_transformer3d
title
:
LTXVideoTransformer3DModel
title
:
LTXVideoTransformer3DModel
-
local
:
api/models/lumina2_transformer2d
title
:
Lumina2Transformer2DModel
-
local
:
api/models/lumina_nextdit2d
title
:
LuminaNextDiT2DModel
-
local
:
api/models/mochi_transformer3d
-
local
:
api/models/mochi_transformer3d
title
:
MochiTransformer3DModel
title
:
MochiTransformer3DModel
-
local
:
api/models/omnigen_transformer
-
local
:
api/models/omnigen_transformer
...
@@ -324,10 +324,10 @@
...
@@ -324,10 +324,10 @@
title
:
PixArtTransformer2DModel
title
:
PixArtTransformer2DModel
-
local
:
api/models/prior_transformer
-
local
:
api/models/prior_transformer
title
:
PriorTransformer
title
:
PriorTransformer
-
local
:
api/models/sd3_transformer2d
title
:
SD3Transformer2DModel
-
local
:
api/models/sana_transformer2d
-
local
:
api/models/sana_transformer2d
title
:
SanaTransformer2DModel
title
:
SanaTransformer2DModel
-
local
:
api/models/sd3_transformer2d
title
:
SD3Transformer2DModel
-
local
:
api/models/stable_audio_transformer
-
local
:
api/models/stable_audio_transformer
title
:
StableAudioDiTModel
title
:
StableAudioDiTModel
-
local
:
api/models/transformer2d
-
local
:
api/models/transformer2d
...
@@ -342,10 +342,10 @@
...
@@ -342,10 +342,10 @@
title
:
StableCascadeUNet
title
:
StableCascadeUNet
-
local
:
api/models/unet
-
local
:
api/models/unet
title
:
UNet1DModel
title
:
UNet1DModel
-
local
:
api/models/unet2d
title
:
UNet2DModel
-
local
:
api/models/unet2d-cond
-
local
:
api/models/unet2d-cond
title
:
UNet2DConditionModel
title
:
UNet2DConditionModel
-
local
:
api/models/unet2d
title
:
UNet2DModel
-
local
:
api/models/unet3d-cond
-
local
:
api/models/unet3d-cond
title
:
UNet3DConditionModel
title
:
UNet3DConditionModel
-
local
:
api/models/unet-motion
-
local
:
api/models/unet-motion
...
@@ -354,6 +354,10 @@
...
@@ -354,6 +354,10 @@
title
:
UViT2DModel
title
:
UViT2DModel
title
:
UNets
title
:
UNets
-
sections
:
-
sections
:
-
local
:
api/models/asymmetricautoencoderkl
title
:
AsymmetricAutoencoderKL
-
local
:
api/models/autoencoder_dc
title
:
AutoencoderDC
-
local
:
api/models/autoencoderkl
-
local
:
api/models/autoencoderkl
title
:
AutoencoderKL
title
:
AutoencoderKL
-
local
:
api/models/autoencoderkl_allegro
-
local
:
api/models/autoencoderkl_allegro
...
@@ -370,10 +374,6 @@
...
@@ -370,10 +374,6 @@
title
:
AutoencoderKLMochi
title
:
AutoencoderKLMochi
-
local
:
api/models/autoencoder_kl_wan
-
local
:
api/models/autoencoder_kl_wan
title
:
AutoencoderKLWan
title
:
AutoencoderKLWan
-
local
:
api/models/asymmetricautoencoderkl
title
:
AsymmetricAutoencoderKL
-
local
:
api/models/autoencoder_dc
title
:
AutoencoderDC
-
local
:
api/models/consistency_decoder_vae
-
local
:
api/models/consistency_decoder_vae
title
:
ConsistencyDecoderVAE
title
:
ConsistencyDecoderVAE
-
local
:
api/models/autoencoder_oobleck
-
local
:
api/models/autoencoder_oobleck
...
@@ -521,40 +521,40 @@
...
@@ -521,40 +521,40 @@
-
sections
:
-
sections
:
-
local
:
api/pipelines/stable_diffusion/overview
-
local
:
api/pipelines/stable_diffusion/overview
title
:
Overview
title
:
Overview
-
local
:
api/pipelines/stable_diffusion/text2img
-
local
:
api/pipelines/stable_diffusion/depth2img
title
:
Text-to-image
title
:
Depth-to-image
-
local
:
api/pipelines/stable_diffusion/gligen
title
:
GLIGEN (Grounded Language-to-Image Generation)
-
local
:
api/pipelines/stable_diffusion/image_variation
title
:
Image variation
-
local
:
api/pipelines/stable_diffusion/img2img
-
local
:
api/pipelines/stable_diffusion/img2img
title
:
Image-to-image
title
:
Image-to-image
-
local
:
api/pipelines/stable_diffusion/svd
-
local
:
api/pipelines/stable_diffusion/svd
title
:
Image-to-video
title
:
Image-to-video
-
local
:
api/pipelines/stable_diffusion/inpaint
-
local
:
api/pipelines/stable_diffusion/inpaint
title
:
Inpainting
title
:
Inpainting
-
local
:
api/pipelines/stable_diffusion/depth2img
-
local
:
api/pipelines/stable_diffusion/k_diffusion
title
:
Depth-to-image
title
:
K-Diffusion
-
local
:
api/pipelines/stable_diffusion/image_variation
-
local
:
api/pipelines/stable_diffusion/latent_upscale
title
:
Image variation
title
:
Latent upscaler
-
local
:
api/pipelines/stable_diffusion/ldm3d_diffusion
title
:
LDM3D Text-to-(RGB, Depth), Text-to-(RGB-pano, Depth-pano), LDM3D Upscaler
-
local
:
api/pipelines/stable_diffusion/stable_diffusion_safe
-
local
:
api/pipelines/stable_diffusion/stable_diffusion_safe
title
:
Safe Stable Diffusion
title
:
Safe Stable Diffusion
-
local
:
api/pipelines/stable_diffusion/sdxl_turbo
title
:
SDXL Turbo
-
local
:
api/pipelines/stable_diffusion/stable_diffusion_2
-
local
:
api/pipelines/stable_diffusion/stable_diffusion_2
title
:
Stable Diffusion
2
title
:
Stable Diffusion
2
-
local
:
api/pipelines/stable_diffusion/stable_diffusion_3
-
local
:
api/pipelines/stable_diffusion/stable_diffusion_3
title
:
Stable Diffusion
3
title
:
Stable Diffusion
3
-
local
:
api/pipelines/stable_diffusion/stable_diffusion_xl
-
local
:
api/pipelines/stable_diffusion/stable_diffusion_xl
title
:
Stable Diffusion XL
title
:
Stable Diffusion XL
-
local
:
api/pipelines/stable_diffusion/sdxl_turbo
title
:
SDXL Turbo
-
local
:
api/pipelines/stable_diffusion/latent_upscale
title
:
Latent upscaler
-
local
:
api/pipelines/stable_diffusion/upscale
-
local
:
api/pipelines/stable_diffusion/upscale
title
:
Super-resolution
title
:
Super-resolution
-
local
:
api/pipelines/stable_diffusion/k_diffusion
title
:
K-Diffusion
-
local
:
api/pipelines/stable_diffusion/ldm3d_diffusion
title
:
LDM3D Text-to-(RGB, Depth), Text-to-(RGB-pano, Depth-pano), LDM3D Upscaler
-
local
:
api/pipelines/stable_diffusion/adapter
-
local
:
api/pipelines/stable_diffusion/adapter
title
:
T2I-Adapter
title
:
T2I-Adapter
-
local
:
api/pipelines/stable_diffusion/
gligen
-
local
:
api/pipelines/stable_diffusion/
text2img
title
:
GLIGEN (Grounded Language
-to-
I
mage
Generation)
title
:
Text
-to-
i
mage
title
:
Stable Diffusion
title
:
Stable Diffusion
-
local
:
api/pipelines/stable_unclip
-
local
:
api/pipelines/stable_unclip
title
:
Stable unCLIP
title
:
Stable unCLIP
...
...
utils/check_doc_toc.py
View file @
d63e6fcc
...
@@ -123,11 +123,13 @@ def check_pipeline_doc(overwrite=False):
...
@@ -123,11 +123,13 @@ def check_pipeline_doc(overwrite=False):
# sort sub pipeline docs
# sort sub pipeline docs
for
pipeline_doc
in
pipeline_docs
:
for
pipeline_doc
in
pipeline_docs
:
if
"section"
in
pipeline_doc
:
if
"section
s
"
in
pipeline_doc
:
sub_pipeline_doc
=
pipeline_doc
[
"section"
]
sub_pipeline_doc
=
pipeline_doc
[
"section
s
"
]
new_sub_pipeline_doc
=
clean_doc_toc
(
sub_pipeline_doc
)
new_sub_pipeline_doc
=
clean_doc_toc
(
sub_pipeline_doc
)
if
new_sub_pipeline_doc
!=
sub_pipeline_doc
:
diff
=
True
if
overwrite
:
if
overwrite
:
pipeline_doc
[
"section"
]
=
new_sub_pipeline_doc
pipeline_doc
[
"section
s
"
]
=
new_sub_pipeline_doc
new_pipeline_docs
.
append
(
pipeline_doc
)
new_pipeline_docs
.
append
(
pipeline_doc
)
# sort overall pipeline doc
# sort overall pipeline doc
...
@@ -149,6 +151,55 @@ def check_pipeline_doc(overwrite=False):
...
@@ -149,6 +151,55 @@ def check_pipeline_doc(overwrite=False):
)
)
def
check_model_doc
(
overwrite
=
False
):
with
open
(
PATH_TO_TOC
,
encoding
=
"utf-8"
)
as
f
:
content
=
yaml
.
safe_load
(
f
.
read
())
# Get to the API doc
api_idx
=
0
while
content
[
api_idx
][
"title"
]
!=
"API"
:
api_idx
+=
1
api_doc
=
content
[
api_idx
][
"sections"
]
# Then to the model doc
model_idx
=
0
while
api_doc
[
model_idx
][
"title"
]
!=
"Models"
:
model_idx
+=
1
diff
=
False
model_docs
=
api_doc
[
model_idx
][
"sections"
]
new_model_docs
=
[]
# sort sub model docs
for
model_doc
in
model_docs
:
if
"sections"
in
model_doc
:
sub_model_doc
=
model_doc
[
"sections"
]
new_sub_model_doc
=
clean_doc_toc
(
sub_model_doc
)
if
new_sub_model_doc
!=
sub_model_doc
:
diff
=
True
if
overwrite
:
model_doc
[
"sections"
]
=
new_sub_model_doc
new_model_docs
.
append
(
model_doc
)
# sort overall model doc
new_model_docs
=
clean_doc_toc
(
new_model_docs
)
if
new_model_docs
!=
model_docs
:
diff
=
True
if
overwrite
:
api_doc
[
model_idx
][
"sections"
]
=
new_model_docs
if
diff
:
if
overwrite
:
content
[
api_idx
][
"sections"
]
=
api_doc
with
open
(
PATH_TO_TOC
,
"w"
,
encoding
=
"utf-8"
)
as
f
:
f
.
write
(
yaml
.
dump
(
content
,
allow_unicode
=
True
))
else
:
raise
ValueError
(
"The model doc part of the table of content is not properly sorted, run `make style` to fix this."
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"--fix_and_overwrite"
,
action
=
"store_true"
,
help
=
"Whether to fix inconsistencies."
)
parser
.
add_argument
(
"--fix_and_overwrite"
,
action
=
"store_true"
,
help
=
"Whether to fix inconsistencies."
)
...
@@ -156,3 +207,4 @@ if __name__ == "__main__":
...
@@ -156,3 +207,4 @@ if __name__ == "__main__":
check_scheduler_doc
(
args
.
fix_and_overwrite
)
check_scheduler_doc
(
args
.
fix_and_overwrite
)
check_pipeline_doc
(
args
.
fix_and_overwrite
)
check_pipeline_doc
(
args
.
fix_and_overwrite
)
check_model_doc
(
args
.
fix_and_overwrite
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment