mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
Merge pull request #3490 from Fundaris/dev
Fix UnboundLocalError on pipeline loading
This commit is contained in:
@@ -560,10 +560,10 @@ def detect_pipeline(f: str, op: str = 'model', warning=True, quiet=False):
|
||||
guess = shared.opts.diffusers_pipeline
|
||||
warn = shared.log.warning if warning else lambda *args, **kwargs: None
|
||||
size = 0
|
||||
pipeline = None
|
||||
if guess == 'Autodetect':
|
||||
try:
|
||||
guess = 'Stable Diffusion XL' if 'XL' in f.upper() else 'Stable Diffusion'
|
||||
pipeline = None
|
||||
# guess by size
|
||||
if os.path.isfile(f) and f.endswith('.safetensors'):
|
||||
size = round(os.path.getsize(f) / 1024 / 1024)
|
||||
|
||||
Reference in New Issue
Block a user