From b42a39d281a6408eac134a71593d70147c7d86ae Mon Sep 17 00:00:00 2001 From: simpleqt <89645338+simpleqt@users.noreply.github.com> Date: Sun, 6 Sep 2026 00:46:37 +0800 Subject: [PATCH] docs: fix docstring parameter names that do not match signatures - flux controlnet encode_prompt documented a clip_skip parameter that does not exist (copy-paste from SD-style docs; flux has no CLIP layer-skipping) - hunyuan_video1_5 pipelines documented num_images_per_prompt while the parameter is num_videos_per_prompt - kandinsky5 _encode_prompt_qwen/_encode_prompt_clip documented num_videos_per_prompt, which neither method accepts --- src/diffusers/pipelines/flux/pipeline_flux_controlnet.py | 3 --- .../pipelines/hunyuan_video1_5/pipeline_hunyuan_video1_5.py | 2 +- .../hunyuan_video1_5/pipeline_hunyuan_video1_5_image2video.py | 2 +- src/diffusers/pipelines/kandinsky5/pipeline_kandinsky.py | 2 -- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/diffusers/pipelines/flux/pipeline_flux_controlnet.py b/src/diffusers/pipelines/flux/pipeline_flux_controlnet.py index e7792d667f16..1483d6cf98b7 100644 --- a/src/diffusers/pipelines/flux/pipeline_flux_controlnet.py +++ b/src/diffusers/pipelines/flux/pipeline_flux_controlnet.py @@ -368,9 +368,6 @@ def encode_prompt( pooled_prompt_embeds (`torch.FloatTensor`, *optional*): Pre-generated pooled text embeddings. Can be used to easily tweak text inputs, *e.g.* prompt weighting. If not provided, pooled text embeddings will be generated from `prompt` input argument. - clip_skip (`int`, *optional*): - Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that - the output of the pre-final layer will be used for computing the prompt embeddings. lora_scale (`float`, *optional*): A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded. """ diff --git a/src/diffusers/pipelines/hunyuan_video1_5/pipeline_hunyuan_video1_5.py b/src/diffusers/pipelines/hunyuan_video1_5/pipeline_hunyuan_video1_5.py index a0adff493ac0..7232ebbee5b8 100644 --- a/src/diffusers/pipelines/hunyuan_video1_5/pipeline_hunyuan_video1_5.py +++ b/src/diffusers/pipelines/hunyuan_video1_5/pipeline_hunyuan_video1_5.py @@ -352,7 +352,7 @@ def encode_prompt( torch device batch_size (`int`): batch size of prompts, defaults to 1 - num_images_per_prompt (`int`): + num_videos_per_prompt (`int`): number of images that should be generated per prompt prompt_embeds (`torch.Tensor`, *optional*): Pre-generated text embeddings. If not provided, text embeddings will be generated from `prompt` input diff --git a/src/diffusers/pipelines/hunyuan_video1_5/pipeline_hunyuan_video1_5_image2video.py b/src/diffusers/pipelines/hunyuan_video1_5/pipeline_hunyuan_video1_5_image2video.py index 1d33c2ae188f..71a36a1c51cd 100644 --- a/src/diffusers/pipelines/hunyuan_video1_5/pipeline_hunyuan_video1_5_image2video.py +++ b/src/diffusers/pipelines/hunyuan_video1_5/pipeline_hunyuan_video1_5_image2video.py @@ -440,7 +440,7 @@ def encode_prompt( torch device batch_size (`int`): batch size of prompts, defaults to 1 - num_images_per_prompt (`int`): + num_videos_per_prompt (`int`): number of images that should be generated per prompt prompt_embeds (`torch.Tensor`, *optional*): Pre-generated text embeddings. If not provided, text embeddings will be generated from `prompt` input diff --git a/src/diffusers/pipelines/kandinsky5/pipeline_kandinsky.py b/src/diffusers/pipelines/kandinsky5/pipeline_kandinsky.py index 1ce885b21f5b..2f3fae917f37 100644 --- a/src/diffusers/pipelines/kandinsky5/pipeline_kandinsky.py +++ b/src/diffusers/pipelines/kandinsky5/pipeline_kandinsky.py @@ -326,7 +326,6 @@ def _encode_prompt_qwen( Args: prompt (str | list[str]): Input prompt or list of prompts device (torch.device): Device to run encoding on - num_videos_per_prompt (int): Number of videos to generate per prompt max_sequence_length (int): Maximum sequence length for tokenization dtype (torch.dtype): Data type for embeddings @@ -395,7 +394,6 @@ def _encode_prompt_clip( Args: prompt (str | list[str]): Input prompt or list of prompts device (torch.device): Device to run encoding on - num_videos_per_prompt (int): Number of videos to generate per prompt dtype (torch.dtype): Data type for embeddings Returns: