From 843296c691d6f63c2dc4eeb247272f494708c250 Mon Sep 17 00:00:00 2001 From: stevhliu Date: Wed, 12 Nov 2025 11:00:32 -0800 Subject: [PATCH] update --- docs/source/en/_toctree.yml | 8 ++++---- utils/check_doc_toc.py | 22 ++++++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/docs/source/en/_toctree.yml b/docs/source/en/_toctree.yml index 55fe2a9a379f..399031082edb 100644 --- a/docs/source/en/_toctree.yml +++ b/docs/source/en/_toctree.yml @@ -448,6 +448,8 @@ - sections: - local: api/pipelines/overview title: Overview + - local: api/pipelines/auto_pipeline + title: AutoPipeline - sections: - local: api/pipelines/audioldm title: AudioLDM @@ -460,8 +462,6 @@ - local: api/pipelines/stable_audio title: Stable Audio title: Audio - - local: api/pipelines/auto_pipeline - title: AutoPipeline - sections: - local: api/pipelines/amused title: aMUSEd @@ -525,6 +525,8 @@ title: HiDream-I1 - local: api/pipelines/hunyuandit title: Hunyuan-DiT + - local: api/pipelines/hunyuanimage21 + title: HunyuanImage2.1 - local: api/pipelines/pix2pix title: InstructPix2Pix - local: api/pipelines/kandinsky @@ -638,8 +640,6 @@ title: ConsisID - local: api/pipelines/framepack title: Framepack - - local: api/pipelines/hunyuanimage21 - title: HunyuanImage2.1 - local: api/pipelines/hunyuan_video title: HunyuanVideo - local: api/pipelines/i2vgenxl diff --git a/utils/check_doc_toc.py b/utils/check_doc_toc.py index 0dd02cde86c1..050b093991e6 100644 --- a/utils/check_doc_toc.py +++ b/utils/check_doc_toc.py @@ -21,20 +21,23 @@ 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): """ Cleans the table of content of the model documentation by removing duplicates and sorting models alphabetically. """ counts = defaultdict(int) - overview_doc = [] + fixed_position_docs = [] new_doc_list = [] for doc in doc_list: if "local" in doc: counts[doc["local"]] += 1 - if doc["title"].lower() == "overview": - overview_doc.append({"local": doc["local"], "title": doc["title"]}) + if doc["title"].lower() in FIXED_POSITION_TITLES: + fixed_position_docs.append({"local": doc["local"], "title": doc["title"]}) else: new_doc_list.append(doc) @@ -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 = sorted(new_doc, key=lambda s: s["title"].lower()) - # "overview" gets special treatment and is always first - if len(overview_doc) > 1: - raise ValueError("{doc_list} has two 'overview' docs which is not allowed.") - - overview_doc.extend(new_doc) + # Fixed-position titles maintain their original order + result = [] + for doc in fixed_position_docs: + result.append(doc) - # Sort - return overview_doc + result.extend(new_doc) + return result def check_scheduler_doc(overwrite=False):