From 58e9565719700a83071c2eb4a4264641ced852d1 Mon Sep 17 00:00:00 2001 From: yiyixuxu Date: Thu, 19 Jun 2025 02:24:51 +0200 Subject: [PATCH] update doc format for kwargs_type --- src/diffusers/modular_pipelines/modular_pipeline_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/diffusers/modular_pipelines/modular_pipeline_utils.py b/src/diffusers/modular_pipelines/modular_pipeline_utils.py index a6ca13dbff..ced059551f 100644 --- a/src/diffusers/modular_pipelines/modular_pipeline_utils.py +++ b/src/diffusers/modular_pipelines/modular_pipeline_utils.py @@ -421,7 +421,9 @@ def format_params(params, header="Args", indent_level=4, max_line_length=115): for param in params: # Format parameter name and type type_str = get_type_str(param.type_hint) if param.type_hint != Any else "" - param_str = f"{param_indent}{param.name} (`{type_str}`" + # YiYi Notes: remove this line if we remove kwargs_type + name = f'**{param.kwargs_type}' if param.name is None and param.kwargs_type is not None else param.name + param_str = f"{param_indent}{name} (`{type_str}`" # Add optional tag and default value if parameter is an InputParam and optional if hasattr(param, "required"):