""" Sphinx configuration file for Wan2.1 documentation. Copyright (c) 2025 Kuaishou. All rights reserved. """ import os import sys from datetime import datetime # Add source directory to path sys.path.insert(0, os.path.abspath('..')) # -- Project information ----------------------------------------------------- project = 'Wan2.1' copyright = f'{datetime.now().year}, Kuaishou' author = 'Kuaishou' release = '2.1.0' version = '2.1' # -- General configuration --------------------------------------------------- extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx', 'sphinx.ext.mathjax', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.githubpages', 'myst_parser', # For markdown support ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The suffix(es) of source filenames. source_suffix = { '.rst': 'restructuredtext', '.md': 'markdown', } # The master toctree document. master_doc = 'index' # -- Options for HTML output ------------------------------------------------- html_theme = 'sphinx_rtd_theme' html_static_path = ['_static'] html_logo = None html_favicon = None html_theme_options = { 'canonical_url': '', 'analytics_id': '', 'logo_only': False, 'display_version': True, 'prev_next_buttons_location': 'bottom', 'style_external_links': False, 'style_nav_header_background': '#2980B9', # Toc options 'collapse_navigation': True, 'sticky_navigation': True, 'navigation_depth': 4, 'includehidden': True, 'titles_only': False } # -- Extension configuration ------------------------------------------------- # Napoleon settings (for Google/NumPy style docstrings) napoleon_google_docstring = True napoleon_numpy_docstring = True napoleon_include_init_with_doc = True napoleon_include_private_with_doc = False napoleon_include_special_with_doc = True napoleon_use_admonition_for_examples = False napoleon_use_admonition_for_notes = False napoleon_use_admonition_for_references = False napoleon_use_ivar = False napoleon_use_param = True napoleon_use_rtype = True napoleon_preprocess_types = False napoleon_type_aliases = None napoleon_attr_annotations = True # Autodoc settings autodoc_default_options = { 'members': True, 'member-order': 'bysource', 'special-members': '__init__', 'undoc-members': True, 'exclude-members': '__weakref__' } autodoc_typehints = 'description' autodoc_typehints_description_target = 'documented' # Intersphinx mapping intersphinx_mapping = { 'python': ('https://docs.python.org/3', None), 'torch': ('https://pytorch.org/docs/stable/', None), 'numpy': ('https://numpy.org/doc/stable/', None), } # Todo extension todo_include_todos = True # MyST parser options myst_enable_extensions = [ "colon_fence", "deflist", "dollarmath", "fieldlist", "html_admonition", "html_image", "linkify", "replacements", "smartquotes", "strikethrough", "substitution", "tasklist", ]