mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
model load exception handling
This commit is contained in:
@@ -22,6 +22,7 @@ Another big one, but now improvements to both **diffusers** and **original** bac
|
||||
- other:
|
||||
- major refactoring of the javascript code
|
||||
includes fixes for text selections and navigation
|
||||
- system info tab now reports on nvidia driver version as well
|
||||
- minor fixes in extra-networks
|
||||
- installer handles origin changes for submodules
|
||||
|
||||
|
||||
Submodule extensions-builtin/sd-extension-system-info updated: 29b6f16023...4f0e81050f
@@ -761,6 +761,8 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
|
||||
model=shared.sd_refiner,
|
||||
prompt=[p.refiner_prompt] if len(p.refiner_prompt) > 0 else prompts,
|
||||
negative_prompt=[p.refiner_negative] if len(p.refiner_negative) > 0 else negative_prompts,
|
||||
num_inference_steps=p.refiner_steps,
|
||||
denoising_start=p.refiner_denoise,
|
||||
image=output.images[0],
|
||||
output_type='np'
|
||||
)
|
||||
|
||||
@@ -382,7 +382,10 @@ def load_model_weights(model: torch.nn.Module, checkpoint_info: CheckpointInfo,
|
||||
shared.opts.data["sd_model_checkpoint"] = checkpoint_info.title
|
||||
if state_dict is None:
|
||||
state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
|
||||
model.load_state_dict(state_dict, strict=False)
|
||||
try:
|
||||
model.load_state_dict(state_dict, strict=False)
|
||||
except Exception as e:
|
||||
shared.log.error(f'Error loading model weights: {checkpoint_info.filename} {e}')
|
||||
del state_dict
|
||||
timer.record("apply")
|
||||
if shared.opts.sd_checkpoint_cache > 0:
|
||||
|
||||
Reference in New Issue
Block a user