Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在V100下使用FP16推理只得到全黑图像 #559

Open
1 of 2 tasks
SambyCAT opened this issue Nov 28, 2024 · 1 comment
Open
1 of 2 tasks

在V100下使用FP16推理只得到全黑图像 #559

SambyCAT opened this issue Nov 28, 2024 · 1 comment

Comments

@SambyCAT
Copy link

System Info / 系統信息

显卡:V100-32GB,其余环境按requirements.txt安装,diffusers库从源码安装

Information / 问题信息

  • The official example scripts / 官方的示例脚本
  • My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

使用最新模型(t2v, i2v均可),将cli_demo.py的数据类型从bf16改成float16
prompt: a girl riding a bike

会得到:
/opt/conda/lib/python3.11/site-packages/diffusers/image_processor.py:147: RuntimeWarning: invalid value encountered in cast
images = (images * 255).round().astype("uint8")

看起来并不是转换出了问题而是生成的结果有nan
不使用fp16而是使用bf16的话会OOM,所以只能使用fp16

Expected behavior / 期待表现

正常生成图像

@SambyCAT
Copy link
Author

SambyCAT commented Nov 28, 2024

UPDATE: 可以暂时使用FP32推理来代替,FP32可以正常使用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant