Skip to content

CUDA Error on NVIDIA GeForce RTX 5070 Ti (Blackwell Architecture) - Request for sm_90 Support #339

Description

@kaworukevin

Dear FramePack Team,

I am reaching out to report an issue I’m facing while running FramePack on my NVIDIA GeForce RTX 5070 Ti (Blackwell architecture) in GPU mode, and to seek your assistance in resolving it. Despite following the suggestions from an engineer on GitHub and making several modifications, I am still encountering a "CUDA error: no kernel image is available for execution on the device." I believe this may be related to FramePack’s kernel compilation not supporting the Blackwell architecture (sm_90).

System Details:

Operating System: Windows 11

GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell architecture, expected Compute Capability sm_90)

NVIDIA Driver Version: 576.02 (confirmed to be the latest as of April 26, 2025)

PyTorch Version: 2.7.0+cu128

CUDA Toolkit Version: 12.8 (driver supports CUDA 12.9)

FramePack Version: framepack_cu126_torch26

Python Version: 3.10

Issue Description:
When running FramePack in GPU mode, I encounter the following error:

CUDA error: no kernel image is available for execution on the device

This error occurs during the encode_prompt_conds function in hunyuan.py, specifically at the line:

llama_attention_length = int((llama_attention_mask.sum()))

Additionally, PyTorch misidentifies my GPU as sm_120 (Compute Capability 12.0) instead of sm_90, which may also contribute to the issue. I have reported this to the PyTorch team separately.

Steps Taken:

Based on an engineer’s suggestion on GitHub, I modified the code to use bf16 data types to avoid fp32-related issues. Specifically, I set history_latents and the sample_hunyuan function to use torch.bfloat16.

Initially, I ran FramePack in CPU mode, which worked but was very slow (30-60 minutes for a 5-second video).

After switching back to GPU mode and ensuring all tensors and models are on cuda:0, the CUDA error persists.

I updated PyTorch to 2.7.0+cu128 and my NVIDIA driver to the latest version (576.02), but the Compute Capability issue remains unresolved.

Request for Assistance:
Could you please confirm if the current FramePack version (framepack_cu126_torch26) supports the Blackwell architecture (sm_90)? If not, would it be possible to provide a kernel compilation that supports sm_90, or suggest a workaround to resolve the CUDA error? I would also appreciate any guidance on optimizing FramePack for Blackwell GPUs, especially regarding data types or memory management.

You can reach me directly at kaworukevin@gmail.com if you need any additional information or would like to follow up. I’ve attached my modified demo_gradio.py and hunyuan.py files for your reference. Thank you for your time and support!

Best regards,
kaworukevin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions