mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
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:
@@ -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}"')
|
||||
|
||||
@@ -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}')
|
||||
|
||||
Reference in New Issue
Block a user