mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
allow experimental to override precision
This commit is contained in:
+3
-1
@@ -81,6 +81,8 @@ def torch_gc(force=False):
|
||||
|
||||
|
||||
def test_fp16():
|
||||
if shared.cmd_opts.experimental:
|
||||
return True
|
||||
try:
|
||||
x = torch.tensor([[1.5,.0,.0,.0]]).to(device).half()
|
||||
layerNorm = torch.nn.LayerNorm(4, eps=0.00001, elementwise_affine=True, dtype=torch.float16, device=device)
|
||||
@@ -114,7 +116,7 @@ def set_cuda_params():
|
||||
pass
|
||||
global dtype, dtype_vae, dtype_unet, unet_needs_upcast # pylint: disable=global-statement
|
||||
ok = test_fp16()
|
||||
if shared.cmd_opts.use_directml: # TODO DirectML does not have full autocast capabilities
|
||||
if shared.cmd_opts.use_directml and not shared.cmd_opts.experimental: # TODO DirectML does not have full autocast capabilities
|
||||
shared.opts.no_half = True
|
||||
shared.opts.no_half_vae = True
|
||||
if ok and shared.opts.cuda_dtype == 'FP32':
|
||||
|
||||
Reference in New Issue
Block a user