kijai / ComfyUI-SUPIR

SUPIR upscaling wrapper for ComfyUI
Other
1.45k stars 82 forks source link

请问大神,RuntimeError: Current CUDA Device does not support bfloat16. Please switch dtype to float16. 这个问题怎么解决? #1

Closed zhaowtVincent closed 6 months ago

zhaowtVincent commented 6 months ago

File "K:\software\ComfyU\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\software\ComfyU\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\software\ComfyU\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\software\ComfyU\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-SUPIR\nodes.py", line 102, in process samples = self.model.batchify_sample(resized_image, captions_list, num_steps=steps, restoration_scale= restoration_scale, s_churn=s_churn, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\software\ComfyU\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "K:\software\ComfyU\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-SUPIR\SUPIR\models\SUPIR_model.py", line 118, in batchify_sample _z = self.encode_first_stage_with_denoise(x, use_sample=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\software\ComfyU\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "K:\software\ComfyU\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-SUPIR\SUPIR\models\SUPIR_model.py", line 52, in encode_first_stage_with_denoise with torch.autocast("cuda", dtype=self.ae_dtype): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\software\ComfyU\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\amp\autocast_mode.py", line 305, in init raise RuntimeError( RuntimeError: Current CUDA Device does not support bfloat16. Please switch dtype to float16.

kijai commented 6 months ago

I have added detection for dtype now, hopefully it fixes this too.

LeoMusk commented 6 months ago

same issue

kijai commented 6 months ago

same issue

If you update there are new options to set the dtypes manually, might need to re-create the node if you have it in a workflow already.