fix prompt enhance

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-04-26 14:31:32 -04:00
parent 5b68979226
commit 7bfeabd6a4
+4 -2
View File
@@ -104,9 +104,11 @@ class Script(scripts.Script):
self.llm = None
shared.log.debug(f'Prompt enhance: name="{self.model}" unload')
self.model = None
load_args = { 'pretrained_model_name_or_path': model_repo if not gguf_args else model_gguf }
if model_subfolder:
load_args['subfolder'] = model_subfolder,
self.llm = transformers.AutoModelForCausalLM.from_pretrained(
pretrained_model_name_or_path=model_repo if not gguf_args else model_gguf,
subfolder=model_subfolder,
**load_args,
trust_remote_code=True,
torch_dtype=devices.dtype,
cache_dir=shared.opts.hfcache_dir,