"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "506a061387f55a234d758aef3edd12115aa40442"
Commit 66e28ef4 authored by comfyanonymous's avatar comfyanonymous
Browse files

Don't use is_bf16_supported to check for fp16 support.

parent 24129d78
...@@ -722,10 +722,13 @@ def should_use_fp16(device=None, model_params=0, prioritize_performance=True, ma ...@@ -722,10 +722,13 @@ def should_use_fp16(device=None, model_params=0, prioritize_performance=True, ma
if is_intel_xpu(): if is_intel_xpu():
return True return True
if torch.cuda.is_bf16_supported(): if torch.version.hip:
return True return True
props = torch.cuda.get_device_properties("cuda") props = torch.cuda.get_device_properties("cuda")
if props.major >= 8:
return True
if props.major < 6: if props.major < 6:
return False return False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment