mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
add tunable ops path
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
+5
-2
@@ -295,9 +295,12 @@ def set_cuda_tunable():
|
||||
if opts.torch_tunable_ops != 'default':
|
||||
torch.cuda.tunable.enable(opts.torch_tunable_ops == 'true')
|
||||
torch.cuda.tunable.tuning_enable(opts.torch_tunable_ops == 'true')
|
||||
# torch.cuda.tunable.set_max_tuning_duration(100)
|
||||
torch.cuda.tunable.set_max_tuning_duration(1000) # set to high value as actual is min(duration, iterations)
|
||||
torch.cuda.tunable.set_max_tuning_iterations(opts.torch_tunable_limit)
|
||||
# log.debug(f'Torce tunable: enabled={torch.cuda.tunable.is_enabled()} tuning={torch.cuda.tunable.tuning_is_enabled()} iterations={torch.cuda.tunable.get_max_tuning_iterations()} duration={torch.cuda.tunable.get_max_tuning_duration()}')
|
||||
fn = os.path.join(opts.tunable_dir, 'tunable.csv')
|
||||
torch.cuda.tunable.set_filename(fn)
|
||||
if torch.cuda.tunable.is_enabled():
|
||||
log.debug(f'Torce tunable: enabled={torch.cuda.tunable.is_enabled()} tuning={torch.cuda.tunable.tuning_is_enabled()} iterations={torch.cuda.tunable.get_max_tuning_iterations()} duration={torch.cuda.tunable.get_max_tuning_duration()} fn="{fn}"')
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@ def create_paths(opts):
|
||||
create_path(fix_path('unet_dir'))
|
||||
create_path(fix_path('te_dir'))
|
||||
create_path(fix_path('lora_dir'))
|
||||
create_path(fix_path('tunable_dir'))
|
||||
create_path(fix_path('embeddings_dir'))
|
||||
create_path(fix_path('hypernetwork_dir'))
|
||||
create_path(fix_path('onnx_temp_dir'))
|
||||
|
||||
@@ -665,6 +665,7 @@ options_templates.update(options_section(('system-paths', "System Paths"), {
|
||||
"ckpt_dir": OptionInfo(os.path.join(paths.models_path, 'Stable-diffusion'), "Folder with stable diffusion models", folder=True),
|
||||
"diffusers_dir": OptionInfo(os.path.join(paths.models_path, 'Diffusers'), "Folder with Huggingface models", folder=True),
|
||||
"hfcache_dir": OptionInfo(default_hfcache_dir, "Folder for Huggingface cache", folder=True),
|
||||
"tunable_dir": OptionInfo(os.path.join(paths.models_path, 'tunable'), "Folder for Tunable ops cache", folder=True),
|
||||
"vae_dir": OptionInfo(os.path.join(paths.models_path, 'VAE'), "Folder with VAE files", folder=True),
|
||||
"unet_dir": OptionInfo(os.path.join(paths.models_path, 'UNET'), "Folder with UNET files", folder=True),
|
||||
"te_dir": OptionInfo(os.path.join(paths.models_path, 'Text-encoder'), "Folder with Text encoder files", folder=True),
|
||||
|
||||
Reference in New Issue
Block a user