-
Notifications
You must be signed in to change notification settings - Fork 78
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
"import error: oneflow.cuda.amp.GradScaler is not implemented" and "TypeError: embedding(): argument 'indices' (position 2) must be Tensor, not Tensor" #104
Comments
我根据报错信息中的这句话
在导入diffusers之前先导入transformers可以解决报错的问题,但不知道原因 下面附上测试过程:
|
|
solved : ) |
可以先安装下 accelerate,复现问题; 然后改下:
注释下这里,让该函数返回 false,看是否能解决问题。如果可以的话,把改动可以提交到 oneflow 的 diffusers 仓库。 |
更改后,重新执行
|
尴尬了,这个路径是 transformers 库里面的,我们现在让用户自己安装的官方 transformers,这样就改不了它的逻辑了。 那就还是沿用上面的方法吧:
|
按照 https://github.com/Oneflow-Inc/diffusers/wiki/How-to-Run-OneFlow-Stable-Diffusion 中 Without Docker 的方式配置,所有操作都完成,但是执行
from diffusers import OneFlowStableDiffusionPipeline
报错使用这个方法可以解决导入报错:https://github.com/Oneflow-Inc/diffusers/issues/104#issuecomment-1434151151
我想要运行该样例:https://github.com/Oneflow-Inc/diffusers/blob/oneflow-fork/tests/test_pipelines_oneflow_graph_load.py
于是按照 https://github.com/Oneflow-Inc/diffusers/issues/104#issuecomment-1434151151 在 from diffusers import ... 之前先导入 transformers 模块,但是在运行中触发了新的错误
System Info
Linux
oneflow 0.9.1.dev20230216+cu117
transformers 4.26.1
diffusers 0.10.0.dev0
huggingface-hub 0.12.0
The text was updated successfully, but these errors were encountered: