From 9bf0b1ae1f8137fec76ffec84ef6b4e132d1b262 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 28 May 2023 07:46:47 -0400 Subject: [PATCH] allow experimental to override precision --- extensions-builtin/multidiffusion-upscaler-for-automatic1111 | 2 +- modules/devices.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index 51cb83ce2..70b3c5ea3 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit 51cb83ce2a53bf147a9091ed5269dcce8f1662d7 +Subproject commit 70b3c5ea3c9f684d04e7ff59167565974415735c diff --git a/modules/devices.py b/modules/devices.py index 843ed4dd8..b49745bd3 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -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':