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

Using the Ascend NPU card, go to the CUDA branch,props = torch.cuda.get_device_properties(device),AssertionError: Torch not compiled with CUDA enabled #6483

Open
jxj801259 opened this issue Jan 16, 2025 · 0 comments
Labels
Potential Bug User is reporting a bug. This should be tested.

Comments

@jxj801259
Copy link

Expected Behavior

Add two lines of code to solve this problem
image
@statelesshz

Actual Behavior

I installed CANN 8.0.RC3, torch_npu 2.1.0
image

Steps to Reproduce

ASCEND_LAUNCH_BLOCKING=1 python main.py --fp16-vae

Debug Logs

To see the GUI go to: http://127.0.0.1:8188
got prompt
model weight dtype torch.float16, manual cast: None
model_type EPS
Using pytorch attention in VAE
Using pytorch attention in VAE
!!! Exception during processing !!! Torch not compiled with CUDA enabled
Traceback (most recent call last):
  File "/home/ma-user/work/ComfyUI-master/execution.py", line 327, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
  File "/home/ma-user/work/ComfyUI-master/execution.py", line 202, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
  File "/home/ma-user/work/ComfyUI-master/execution.py", line 174, in _map_node_over_list
    process_inputs(input_dict, i)
  File "/home/ma-user/work/ComfyUI-master/execution.py", line 163, in process_inputs
    results.append(getattr(obj, func)(**inputs))
  File "/home/ma-user/work/ComfyUI-master/nodes.py", line 568, in load_checkpoint
    out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
  File "/home/ma-user/work/ComfyUI-master/comfy/sd.py", line 827, in load_checkpoint_guess_config
    out = load_state_dict_guess_config(sd, output_vae, output_clip, output_clipvision, embedding_directory, output_model, model_options, te_model_options=te_model_options)
  File "/home/ma-user/work/ComfyUI-master/comfy/sd.py", line 873, in load_state_dict_guess_config
    vae = VAE(sd=vae_sd)
  File "/home/ma-user/work/ComfyUI-master/comfy/sd.py", line 400, in __init__
    dtype = model_management.vae_dtype(self.device, self.working_dtypes)
  File "/home/ma-user/work/ComfyUI-master/comfy/model_management.py", line 788, in vae_dtype
    if d == torch.bfloat16 and (not is_amd()) and should_use_bf16(device):
  File "/home/ma-user/work/ComfyUI-master/comfy/model_management.py", line 1081, in should_use_bf16
    props = torch.cuda.get_device_properties(device)
  File "/home/ma-user/anaconda3/envs/py310_torch2.1/lib/python3.10/site-packages/torch/cuda/__init__.py", line 449, in get_device_properties
    _lazy_init()  # will define _get_device_properties
  File "/home/ma-user/anaconda3/envs/py310_torch2.1/lib/python3.10/site-packages/torch/cuda/__init__.py", line 289, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

Prompt executed in 2.20 seconds

Other

No response

@jxj801259 jxj801259 added the Potential Bug User is reporting a bug. This should be tested. label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Potential Bug User is reporting a bug. This should be tested.
Projects
None yet
Development

No branches or pull requests

1 participant