nndeploy.diffusion.diffusers_info.extract_example_doc_string

Traverse all pipeline_*.py files under the specified src/diffusers/pipelines directory, extract the EXAMPLE_DOC_STRING from each file, and write them into the specified diffusers_pipeline_md.py in a more readable format, preserving directory order and indentation.

Functions

extract_example_doc_string(file_path)

Extract the content of EXAMPLE_DOC_STRING from the file.

find_pipeline_files(directory)

Find all pipeline_*.py files, return their relative paths, preserving directory order.

main()

write_dict_pretty(data, output_file)

Write the dictionary to a file in a more readable format.

nndeploy.diffusion.diffusers_info.extract_example_doc_string.find_pipeline_files(directory: str)[源代码]

Find all pipeline_*.py files, return their relative paths, preserving directory order.

nndeploy.diffusion.diffusers_info.extract_example_doc_string.extract_example_doc_string(file_path: str)[源代码]

Extract the content of EXAMPLE_DOC_STRING from the file.

nndeploy.diffusion.diffusers_info.extract_example_doc_string.write_dict_pretty(data: dict, output_file: str)[源代码]

Write the dictionary to a file in a more readable format.

nndeploy.diffusion.diffusers_info.extract_example_doc_string.main()[源代码]