mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
handle duplicate extensions and redo exception handler
This commit is contained in:
@@ -11,7 +11,7 @@ import torch
|
||||
import tqdm
|
||||
from einops import rearrange, repeat
|
||||
from ldm.util import default
|
||||
from modules import devices, processing, sd_models, shared, sd_samplers, hashes, sd_hijack_checkpoint
|
||||
from modules import devices, processing, sd_models, shared, sd_samplers, hashes, sd_hijack_checkpoint, errors
|
||||
from modules.textual_inversion import textual_inversion, logging
|
||||
from modules.textual_inversion.learn_schedule import LearnRateScheduler
|
||||
from torch import einsum
|
||||
@@ -329,9 +329,8 @@ def load_hypernetwork(name):
|
||||
|
||||
try:
|
||||
hypernetwork.load(path)
|
||||
except Exception:
|
||||
print(f"Error loading hypernetwork {path}", file=sys.stderr)
|
||||
shared.exception()
|
||||
except Exception as e:
|
||||
errors.display(e, f'hypernetwork load: {path}')
|
||||
return None
|
||||
|
||||
return hypernetwork
|
||||
@@ -769,8 +768,8 @@ Last saved hypernetwork: {html.escape(last_saved_file)}<br/>
|
||||
Last saved image: {html.escape(last_saved_image)}<br/>
|
||||
</p>
|
||||
"""
|
||||
except Exception:
|
||||
shared.exception()
|
||||
except Exception as e:
|
||||
errors.display(e, 'hypernetwork train')
|
||||
finally:
|
||||
pbar.leave = False
|
||||
pbar.close()
|
||||
|
||||
Reference in New Issue
Block a user