huggingface / huggingface/diffusers

HunyuanVIdeo in diffusers use negative_prompt but generate wrong video

オープン
#10,901 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug stale
主要言語
Python
スター
34.5k
フォーク
7.3k
平均マージ
3日 3時間
マージ済み PR(30日)
91

説明

### Describe the bug

Diffusers support negative_prompt for hunyuan_video recently, but when I use negative_prompt and set **guidance_scale** and **true_cfg_scale**, I got a video with all black elements. Maybe I set wrong parameters or save video fail.
How can I fix my problem? Thanks

### Reproduction

import torch
import time
from diffusers import HunyuanVideoPipeline, HunyuanVideoTransformer3DModel, AutoencoderKLHunyuanVideo
from diffusers.utils import export_to_video, load_image, load_video
NEGATIVE_PROMPT = "Aerial view, aerial view, overexposed, low quality, deformation, a poor composition, bad hands, bad teeth, bad eyes, bad limbs, distortion"
model_path = "/realpath/hunyuanvideo-community-HunyuanVideo"
pipe = HunyuanVideoPipeline.from_pretrained(model_path, torch_dtype=torch.float16)
pipe.vae.enable_tiling()
pipe.to("cuda")
output = pipe(
prompt="The video shows a man and a woman standing in the snow, wearing winter clothing and holding cups of coffee. ",
negative_prompt=NEGATIVE_PROMPT,
height=480,
width=720,
num_frames=129,
num_inference_steps=10,
true_cfg_scale=6.0,
guidance_scale=1.0,
).frames[0]
export_to_video(output, "diffusers_480p_output.mp4", fps=24)

### Logs

```shell

```

### System Info

H20
resolution = 480 * 720
steps=10

### Who can help?

_No response_

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with the HunyuanVideoPipeline call in the reproduction, focusing on the interaction between negative_prompt, guidance_scale, and true_cfg_scale. Check whether the black output appears in the returned frames before export_to_video, then consult the pipeline's guidance and video-export behavior. Done means identifying whether the parameters or export step causes the black elements and documenting or fixing the reproducible case.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python, pytorch
領域
machine-learning
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。