mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-09 00:37:11 +08:00
fix formating
This commit is contained in:
parent
b4c7540fbc
commit
75ec851324
@ -108,7 +108,7 @@ class CLIPTextModel_(torch.nn.Module):
|
|||||||
causal_mask = torch.empty(x.shape[1], x.shape[1], dtype=x.dtype, device=x.device).triu_(1)
|
causal_mask = torch.empty(x.shape[1], x.shape[1], dtype=x.dtype, device=x.device).triu_(1)
|
||||||
else:
|
else:
|
||||||
causal_mask = torch.empty(x.shape[1], x.shape[1], dtype=x.dtype, device=x.device).fill_(float("-inf")).triu_(1)
|
causal_mask = torch.empty(x.shape[1], x.shape[1], dtype=x.dtype, device=x.device).fill_(float("-inf")).triu_(1)
|
||||||
|
|
||||||
if mask is not None:
|
if mask is not None:
|
||||||
mask += causal_mask
|
mask += causal_mask
|
||||||
else:
|
else:
|
||||||
|
@ -997,7 +997,7 @@ def is_directml_enabled():
|
|||||||
global directml_enabled
|
global directml_enabled
|
||||||
if directml_enabled:
|
if directml_enabled:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def should_use_fp16(device=None, model_params=0, prioritize_performance=True, manual_cast=False):
|
def should_use_fp16(device=None, model_params=0, prioritize_performance=True, manual_cast=False):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user