Error initializing pipeline: 'tuple' object has no attribute 'numel'

#1
by CaveBanner - opened

When I initialized the pipeline using the example code, the following issues occurred:

pipe = DiffusionPipeline.from_pretrained(
    "unsloth/Qwen-Image-2512-unsloth-bnb-4bit",
    torch_dtype=torch.bfloat16,
).to('cuda')

'tuple' object has no attribute 'numel'

Also encountered an error when running it on ZeroGPU Spaces: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling cublasSgemmStridedBatched( handle, opa, opb, m, n, k, &alpha, a, lda, stridea, b, ldb, strideb, &beta, c, ldc, stridec, num_batches)

When I initialized the pipeline using the example code, the following issues occurred:

pipe = DiffusionPipeline.from_pretrained(
    "unsloth/Qwen-Image-2512-unsloth-bnb-4bit",
    torch_dtype=torch.bfloat16,
).to('cuda')

'tuple' object has no attribute 'numel'

You may need to upgrade packages in your environment. These package versions are working for me
torch: 2.9.0+cu126
diffusers: 0.36.0
transformers: 4.57.6
bitsandbytes: 0.49.1
accelerate: 1.12.0

Also encountered an error when running it on ZeroGPU Spaces: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling cublasSgemmStridedBatched( handle, opa, opb, m, n, k, &alpha, a, lda, stridea, b, ldb, strideb, &beta, c, ldc, stridec, num_batches)

Not sure, but you can try taking out the to('cuda') call.

The pipeline initialization can only run on @spaces.GPU. The error during execution was due to insufficient VRAM, as other programs were using the GPU. The problem has now been resolved.

CaveBanner changed discussion status to closed

Sign up or log in to comment