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

运行“python demo_gr.py --name flux-dev”报错了 #151

Open
gavid0124 opened this issue Sep 14, 2024 · 0 comments
Open

运行“python demo_gr.py --name flux-dev”报错了 #151

gavid0124 opened this issue Sep 14, 2024 · 0 comments

Comments

@gavid0124
Copy link

报错信息如下:
Traceback (most recent call last):
File "/home/dev/flux/demo_gr.py", line 217, in
demo = create_demo(args.name, args.device, args.offload)
File "/home/dev/flux/demo_gr.py", line 163, in create_demo
generator = FluxGenerator(model_name, device, offload)
File "/home/dev/flux/demo_gr.py", line 33, in init
self.model, self.ae, self.t5, self.clip, self.nsfw_classifier = get_models(
File "/home/dev/flux/demo_gr.py", line 22, in get_models
model = load_flow_model(name, device="cpu" if offload else device)
File "/home/dev/flux/src/flux/util.py", line 123, in load_flow_model
sd = load_sft(ckpt_path, device=str(device))
File "/home/ps/.local/lib/python3.10/site-packages/safetensors/torch.py", line 311, in load_file
with safe_open(filename, framework="pt", device=device) as f:
OSError: No such device (os error 19)

但是torch.cuda.is_available()返回的是true

import torch
torch.cuda.is_available()
True

请教下是什么原因?感谢!

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