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
6a2309b9
Unverified
Commit
6a2309b9
authored
Nov 13, 2025
by
Steven Liu
Committed by
GitHub
Nov 13, 2025
Browse files
[utils] Update check_doc_toc (#12642)
update Co-authored-by:
Sayak Paul
<
spsayakpaul@gmail.com
>
parent
cd3bbe29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
docs/source/en/_toctree.yml
docs/source/en/_toctree.yml
+4
-4
utils/check_doc_toc.py
utils/check_doc_toc.py
+12
-10
No files found.
docs/source/en/_toctree.yml
View file @
6a2309b9
...
@@ -450,6 +450,8 @@
...
@@ -450,6 +450,8 @@
-
sections
:
-
sections
:
-
local
:
api/pipelines/overview
-
local
:
api/pipelines/overview
title
:
Overview
title
:
Overview
-
local
:
api/pipelines/auto_pipeline
title
:
AutoPipeline
-
sections
:
-
sections
:
-
local
:
api/pipelines/audioldm
-
local
:
api/pipelines/audioldm
title
:
AudioLDM
title
:
AudioLDM
...
@@ -462,8 +464,6 @@
...
@@ -462,8 +464,6 @@
-
local
:
api/pipelines/stable_audio
-
local
:
api/pipelines/stable_audio
title
:
Stable Audio
title
:
Stable Audio
title
:
Audio
title
:
Audio
-
local
:
api/pipelines/auto_pipeline
title
:
AutoPipeline
-
sections
:
-
sections
:
-
local
:
api/pipelines/amused
-
local
:
api/pipelines/amused
title
:
aMUSEd
title
:
aMUSEd
...
@@ -527,6 +527,8 @@
...
@@ -527,6 +527,8 @@
title
:
HiDream-I1
title
:
HiDream-I1
-
local
:
api/pipelines/hunyuandit
-
local
:
api/pipelines/hunyuandit
title
:
Hunyuan-DiT
title
:
Hunyuan-DiT
-
local
:
api/pipelines/hunyuanimage21
title
:
HunyuanImage2.1
-
local
:
api/pipelines/pix2pix
-
local
:
api/pipelines/pix2pix
title
:
InstructPix2Pix
title
:
InstructPix2Pix
-
local
:
api/pipelines/kandinsky
-
local
:
api/pipelines/kandinsky
...
@@ -640,8 +642,6 @@
...
@@ -640,8 +642,6 @@
title
:
ConsisID
title
:
ConsisID
-
local
:
api/pipelines/framepack
-
local
:
api/pipelines/framepack
title
:
Framepack
title
:
Framepack
-
local
:
api/pipelines/hunyuanimage21
title
:
HunyuanImage2.1
-
local
:
api/pipelines/hunyuan_video
-
local
:
api/pipelines/hunyuan_video
title
:
HunyuanVideo
title
:
HunyuanVideo
-
local
:
api/pipelines/i2vgenxl
-
local
:
api/pipelines/i2vgenxl
...
...
utils/check_doc_toc.py
View file @
6a2309b9
...
@@ -21,20 +21,23 @@ import yaml
...
@@ -21,20 +21,23 @@ import yaml
PATH_TO_TOC
=
"docs/source/en/_toctree.yml"
PATH_TO_TOC
=
"docs/source/en/_toctree.yml"
# Titles that should maintain their position and not be sorted alphabetically
FIXED_POSITION_TITLES
=
{
"overview"
,
"autopipeline"
}
def
clean_doc_toc
(
doc_list
):
def
clean_doc_toc
(
doc_list
):
"""
"""
Cleans the table of content of the model documentation by removing duplicates and sorting models alphabetically.
Cleans the table of content of the model documentation by removing duplicates and sorting models alphabetically.
"""
"""
counts
=
defaultdict
(
int
)
counts
=
defaultdict
(
int
)
overview
_doc
=
[]
fixed_position
_doc
s
=
[]
new_doc_list
=
[]
new_doc_list
=
[]
for
doc
in
doc_list
:
for
doc
in
doc_list
:
if
"local"
in
doc
:
if
"local"
in
doc
:
counts
[
doc
[
"local"
]]
+=
1
counts
[
doc
[
"local"
]]
+=
1
if
doc
[
"title"
].
lower
()
==
"overview"
:
if
doc
[
"title"
].
lower
()
in
FIXED_POSITION_TITLES
:
overview
_doc
.
append
({
"local"
:
doc
[
"local"
],
"title"
:
doc
[
"title"
]})
fixed_position
_doc
s
.
append
({
"local"
:
doc
[
"local"
],
"title"
:
doc
[
"title"
]})
else
:
else
:
new_doc_list
.
append
(
doc
)
new_doc_list
.
append
(
doc
)
...
@@ -57,14 +60,13 @@ def clean_doc_toc(doc_list):
...
@@ -57,14 +60,13 @@ def clean_doc_toc(doc_list):
new_doc
.
extend
([
doc
for
doc
in
doc_list
if
"local"
not
in
counts
or
counts
[
doc
[
"local"
]]
==
1
])
new_doc
.
extend
([
doc
for
doc
in
doc_list
if
"local"
not
in
counts
or
counts
[
doc
[
"local"
]]
==
1
])
new_doc
=
sorted
(
new_doc
,
key
=
lambda
s
:
s
[
"title"
].
lower
())
new_doc
=
sorted
(
new_doc
,
key
=
lambda
s
:
s
[
"title"
].
lower
())
# "overview" gets special treatment and is always first
# Fixed-position titles maintain their original order
if
len
(
overview_doc
)
>
1
:
result
=
[]
raise
ValueError
(
"{doc_list} has two 'overview' docs which is not allowed."
)
for
doc
in
fixed_position_docs
:
result
.
append
(
doc
)
overview_doc
.
extend
(
new_doc
)
# Sort
result
.
extend
(
new_doc
)
return
overview_doc
return
result
def
check_scheduler_doc
(
overwrite
=
False
):
def
check_scheduler_doc
(
overwrite
=
False
):
...
...
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