add force dtype on load

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-06-20 09:38:50 +02:00
parent 359280864a
commit 2b81eadecf
7 changed files with 29 additions and 12 deletions
+1 -1
View File
@@ -377,7 +377,7 @@ def test_bf16():
else:
from modules.zluda_installer import default_agent
agent = default_agent
if agent is not None and agent.gfx_version < 0x1100 and agent.arch != rocm.MicroArchitecture.CDNA: # all cards before RDNA 3 except for CDNA cards
if (agent is not None) and (agent.gfx_version < 0x1100) and (agent.arch != rocm.MicroArchitecture.CDNA): # all cards before RDNA 3 except for CDNA cards
bf16_ok = False
return bf16_ok
try:
+2
View File
@@ -40,6 +40,8 @@ def hijack_encode_prompt(*args, **kwargs):
timer.process.add('te', t1-t0)
shared.sd_model = sd_models.apply_balanced_offload(shared.sd_model)
shared.state.end(jobid)
from modules import memstats
log.debug(f'Encode: memory={memstats.memory_stats()}')
return res
+1
View File
@@ -220,6 +220,7 @@ def create_settings(cmd_opts):
"math_sep": OptionInfo("<h2>Execution Precision</h2>", "", gr.HTML),
"precision": OptionInfo("Autocast", "Precision type", gr.Radio, {"choices": ["Autocast", "Full"], "visible": False}),
"cuda_dtype": OptionInfo("Auto", "Device precision type", gr.Radio, {"choices": ["Auto", "FP32", "FP16", "BF16"]}),
"force_dtype": OptionInfo(False, "Force dtype on load", None, None, None),
"no_half": OptionInfo(False, "Force full precision (--no-half)", None, None, None),
"upcast_sampling": OptionInfo(False if sys.platform != "darwin" else True, "Upcast sampling", gr.Checkbox, {"visible": False}),