lllyasviel / lllyasviel/stable-diffusion-webui-forge

5070ti显卡对应的cu128环境,使用flux模型报错 AttributeError: function 'cdequantize_blockwise_bf16_nf4' not found

Open
#2,919 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

环境使用的是整合包给的Torch 2.7.0 cu128 + xFormers 0.0.30
使用flux1-dev-bnb-nf4-v2.safetensors模型进行文生图时报错 AttributeError: function 'cdequantize_blockwise_bf16_nf4' not found

![Image](https://github.com/user-attachments/assets/444f55f5-ba58-492b-83a2-816122cc2abf)

报错在修复了以下警告后消失,flux模型能正常文生图
`WARNING:bitsandbytes.cextension:Could not find the bitsandbytes CUDA binary at WindowsPath('D:/software/sd-webui-forge-aki-v1.0/python/Lib/site-packages/bitsandbytes/libbitsandbytes_cuda128.dll')`
`WARNING:bitsandbytes.cextension:The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.`

该报错的解决方法是更新bitsandbytes到0.45.3,如下链接所示
[https://github.com/bitsandbytes-foundation/bitsandbytes/issues/1510](url)

由于整合包一键启动时会检测依赖并控制版本,因此目前还还需要关闭"高级选项"中的"跳过内部组件同步"才能维持bitsandbytes为0.45.3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the FLUX text-to-image failure with Torch 2.7.0 cu128 and xFormers 0.0.30, then inspect the integrated package's dependency detection and internal component synchronization around bitsandbytes. Verify that the required bitsandbytes version remains available without skipping synchronization and that the CUDA warning and AttributeError no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.