refactor pipeline loaders to generic methods and introduce te_shared_t5 option

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-08-10 20:49:58 -04:00
parent f45e3342e6
commit 2a85c05689
22 changed files with 347 additions and 811 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ def image_guard(image, policy:str=None) -> str:
attn_implementation='flash_attention_2',
torch_dtype=devices.dtype,
device_map="auto",
cache_dir='/mnt/models/huggingface',
cache_dir=shared.opts.hfcache_dir,
)
processor = transformers.AutoProcessor.from_pretrained(repo_id, cache_dir=shared.opts.hfcache_dir)
shared.log.info(f'NudeNet load: model="{repo_id}"')
+1 -1
View File
@@ -61,7 +61,7 @@ class NudeDetector:
self.model_path = model or hf.hf_hub_download(
repo_id='vladmandic/nudenet',
filename='nudenet.onnx',
cache_dir=shared.opts.diffusers_dir,
cache_dir=shared.opts.hfcache_dir,
)
if session is None:
log.info(f'NudeNet load: model="{self.model_path}" providers={providers}')