Don't override user set device_map

This commit is contained in:
Disty0
2025-05-27 21:45:52 +03:00
parent b1b29e9001
commit d3e3fb98b0
+1 -1
View File
@@ -529,7 +529,7 @@ def get_dit_args(load_config:dict={}, module:str=None, device_map:bool=False, al
config['device_map'] = 'cpu'
elif shared.opts.device_map == 'gpu':
config['device_map'] = devices.device
elif module not in {'TE', 'LLM'}: # Transformers loads the entire model into GPU at once and OOMs
elif shared.opts.device_map == 'default' and module not in {'TE', 'LLM'}: # Transformers loads the entire model into GPU at once and OOMs
if 'Model' in shared.opts.sdnq_quantize_weights or (module is not None and module in shared.opts.sdnq_quantize_weights) or module == 'any':
config['device_map'] = devices.device
if allow_quant: