[modular] Per-workflow input signature in the docstring of blocks with `_workflow_map`
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
Línea de trabajo
Read #15136 and inspect how blocks with _workflow_map build their input docstrings, then find the renderer in modular_pipeline_utils.py that produces the model-card documentation. Compare the rendered inputs with get_workflow(name).inputs, including shared inputs and workflow-specific required flags and defaults. Done means both docstrings group inputs correctly by workflow and show the right required and default information.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Follow-up to #15136.
For the final assembled blocks that support workflows (the ones with _workflow_map, i.e. the auto blocks a checkpoint maps to), the signature and the docstring aren't informative enough. An input is listed, but you don't know which workflow actually uses it, whether it's required there, or what its default is, since the defaults can differ between workflows.
Today the way to see the exact signature is to prune the blocks with get_workflow(name) and look at .inputs on the result. That works, but it is better to put that information in the docstring for the users.
This PR proposes a better docstring for these blocks, limited to blocks that define _workflow_map: per workflow, the inputs it takes with their required flag and default, with the inputs that are the same in every workflow listed once.
Examples
AnimaAutoBlocks
Today (after #15136):
Supported workflows:
- `text2image`: requires `prompt`
- `img2img`: requires `image`, `prompt`
Inputs:
prompt (`str`):
The prompt or prompts to guide image generation.
negative_prompt (`str`, *optional*):
...
image (`Image | list`, *optional*, depends on the workflow, see `vae_encoder`):
Reference image(s) for denoising. Can be a single image or list of images.
...
strength (`float`, *optional*, defaults to 0.9):
Strength for img2img/inpainting.
...
image is optional in the list but required for img2img. strength reads like a general input, but text2image does not use it.
Proposed:
Supported workflows:
- `text2image`: requires `prompt`
- `img2img`: requires `image`, `prompt`
Inputs (all workflows):
prompt (`str`):
The prompt or prompts to guide image generation.
negative_prompt (`str`, *optional*):
...
num_inference_steps (`int`, *optional*, defaults to 50):
...
Inputs (`img2img`):
image (`Image | list`):
Reference image(s) for denoising. Can be a single image or list of images.
strength (`float`, *optional*, defaults to 0.9):
Strength for img2img/inpainting.
MiniMaxH3Blocks
Today:
Supported workflows:
- `t2va`: requires `prompt`
- `fl2va`: requires `prompt`, `image` or `prompt`, `last_image`
- `ref2va`: requires `prompt`, `references`
Inputs:
...
references (`list`, *optional*, depends on the workflow, see `...`):
...
num_frames (`int`, *optional*):
Number of frames to generate, at the fixed 24 fps. ...
image (`Image`, *optional*):
...
last_image (`Image`, *optional*):
...
num_frames shows as optional with no default. In t2va and fl2va it defaults to 124, in ref2va it is required (the model reads the length from the references). The docstring can't say that today.
Proposed:
Inputs (all workflows):
prompt (`str`):
...
height (`int`, *optional*):
...
Inputs (`t2va`, `fl2va`):
num_frames (`int`, *optional*, defaults to 124):
Number of frames to generate, at the fixed 24 fps. ...
Inputs (`fl2va`):
image (`Image`, *optional*):
...
last_image (`Image`, *optional*):
...
Inputs (`ref2va`):
references (`list`):
...
num_frames (`int`):
Number of frames to generate, at the fixed 24 fps. ...
Each per-workflow section is get_workflow(name).inputs minus what is already in the shared list. The same renderer change applies to the model-card doc in modular_pipeline_utils.py, which already loops over _workflow_map but only prints the trigger inputs.
Posted by Claude Code on behalf of @yiyixuxu.
- Lenguaje dominante
- Python
- Estrellas
- 35k
- Forks
- 7.5k
- Merge medio
- 2 d 22 h
- PR fusionados (30 d)
- 58
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de huggingface/diffusers
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
huggingface/diffusers#15436 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
InpaintProcessor crashes when padding_mask_crop is set and a dimension is omittedPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
huggingface/diffusers#15433 ·
Los mantenedores suelen responder en 1 día
-
LTXEulerAncestralRFScheduler skips signal scaling with s_noise=0Posiblemente ocupada @hparik11 la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
huggingface/diffusers#15423 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Docs: 13 docstrings document parameters their functions don't havePosiblemente ocupada @M-Colley la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
huggingface/diffusers#15363 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
`ZImageImg2ImgPipeline` / `ZImageInpaintPipeline`: explicit height/width different from the input image raises RuntimeErrorPosiblemente ocupada @chessing234 la tomó hace 11 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
huggingface/diffusers#15337 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de huggingface/diffusers
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 79/100
developmentseed/titiler-covjson#164 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
awslabs/visual-asset-management-system#2164 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
MakazhanAlpamys/Soup#3589 ·
Los mantenedores suelen responder en 1 día
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día