Skip to content

Commit

Permalink
fix: handle custom models in keep_single_inference
Browse files Browse the repository at this point in the history
This should prevent crashes when QR code/CN workflows are used with custom models
  • Loading branch information
tazlin committed May 29, 2024
1 parent 574ef58 commit 2c463ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion horde_worker_regen/process_management/process_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,11 @@ def keep_single_inference(
)
continue

model_info = stable_diffusion_model_reference.root[model]
model_info = stable_diffusion_model_reference.root.get(model)
if model_info is None:
logger.debug(f"Model {model} not found in stable diffusion model reference. Is it a custom model?")
continue

if model_info.baseline == STABLE_DIFFUSION_BASELINE_CATEGORY.stable_diffusion_xl and (
p.can_accept_job()
or p.last_process_state == HordeProcessState.PRELOADING_MODEL
Expand Down

0 comments on commit 2c463ae

Please sign in to comment.