huggingface / huggingface/diffusers
HunyuanVIdeo in diffusers use negative_prompt but generate wrong video
- Ngôn ngữ chính
- Python
- Star
- 34.5k
- Fork
- 7.3k
- Merge trung bình
- 3 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
### 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_
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với lệnh gọi HunyuanVideoPipeline trong bản tái hiện, tập trung vào sự tương tác giữa negative_prompt, guidance_scale và true_cfg_scale. Kiểm tra xem đầu ra màu đen có xuất hiện trong các frame được trả về trước export_to_video hay không, sau đó xem xét hành vi guidance và xuất video của pipeline. Hoàn thành khi xác định được liệu các tham số hay bước xuất có gây ra các phần tử màu đen hay không, đồng thời ghi lại hoặc sửa trường hợp có thể tái hiện.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python, pytorch
- Lĩnh vực
- machine-learning
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100