add more job state updates and update history tab

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-09-13 10:54:04 -04:00
parent 4e74172f3a
commit d351fdb98f
26 changed files with 69 additions and 77 deletions
+3 -1
View File
@@ -4,7 +4,7 @@ import threading
from typing import Union
from diffusers import StableDiffusionPipeline, StableDiffusionXLPipeline, FluxPipeline, StableDiffusion3Pipeline, ControlNetModel
from modules.control.units import detect
from modules.shared import log, opts, cmd_opts, listdir
from modules.shared import log, opts, cmd_opts, state, listdir
from modules import errors, sd_models, devices, model_quant
from modules.processing import StableDiffusionProcessingControl
@@ -308,6 +308,7 @@ class ControlNet():
log.error(f'Control {what} model load: id="{model_id}" unknown base model')
return
self.reset()
jobid = state.begin(f'Load {what}')
if model_path.endswith('.safetensors'):
self.load_safetensors(model_id, model_path, cls, config)
else:
@@ -365,6 +366,7 @@ class ControlNet():
t1 = time.time()
self.model_id = model_id
log.info(f'Control {what} model loaded: id="{model_id}" path="{model_path}" cls={cls.__name__} time={t1-t0:.2f}')
state.end(jobid)
return f'{what} loaded model: {model_id}'
except Exception as e:
log.error(f'Control {what} model load: id="{model_id}" {e}')