mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
add force dtype on load
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
+1
-1
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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}),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user