From f6952ed9e3d48c84c3f22d33546aade7716a0b86 Mon Sep 17 00:00:00 2001 From: db0 Date: Sat, 5 Oct 2024 21:46:56 +0200 Subject: [PATCH] fix: ensure ttl is always at least 150s --- horde/classes/stable/processing_generation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/horde/classes/stable/processing_generation.py b/horde/classes/stable/processing_generation.py index ba2a21ee..9b94d6f8 100644 --- a/horde/classes/stable/processing_generation.py +++ b/horde/classes/stable/processing_generation.py @@ -168,6 +168,8 @@ def set_job_ttl(self): # Flux is way slower than Stable Diffusion if any(model_reference.get_model_baseline(mn) in ["flux_1"] for mn in self.wp.get_model_names()): self.job_ttl = self.job_ttl * 3 + if self.job_ttl < 150: + self.job_ttl = 150 if self.worker.extra_slow_worker is True: self.job_ttl = self.job_ttl * 3 db.session.commit()