diff --git a/horde/classes/stable/worker.py b/horde/classes/stable/worker.py index c1cefa19..22468869 100644 --- a/horde/classes/stable/worker.py +++ b/horde/classes/stable/worker.py @@ -24,13 +24,13 @@ class ImageWorker(Worker): } # TODO: Switch to max_power max_pixels = db.Column(db.BigInteger, default=512 * 512, nullable=False) - allow_img2img = db.Column(db.Boolean, default=True, nullable=False) - allow_painting = db.Column(db.Boolean, default=True, nullable=False) - allow_post_processing = db.Column(db.Boolean, default=True, nullable=False) - allow_controlnet = db.Column(db.Boolean, default=False, nullable=False) - allow_sdxl_controlnet = db.Column(db.Boolean, default=False, nullable=False) - allow_lora = db.Column(db.Boolean, default=False, nullable=False) - limit_max_steps = db.Column(db.Boolean, default=False, nullable=False) + allow_img2img = db.Column(db.Boolean, default=True, nullable=False, index=True) + allow_painting = db.Column(db.Boolean, default=True, nullable=False, index=True) + allow_post_processing = db.Column(db.Boolean, default=True, nullable=False, index=True) + allow_controlnet = db.Column(db.Boolean, default=False, nullable=False, index=True) + allow_sdxl_controlnet = db.Column(db.Boolean, default=False, nullable=False, index=True) + allow_lora = db.Column(db.Boolean, default=False, nullable=False, index=True) + limit_max_steps = db.Column(db.Boolean, default=False, nullable=False, index=True) wtype = "image" def check_in(self, max_pixels, **kwargs): diff --git a/sql_statements/4.43.0.txt b/sql_statements/4.43.0.txt index b472e993..967b9ebe 100644 --- a/sql_statements/4.43.0.txt +++ b/sql_statements/4.43.0.txt @@ -1,8 +1,13 @@ -ALTER TABLE waiting_prompts ADD COLUMN extra_slow_workers BOOLEAN default false; -ALTER TABLE workers ADD COLUMN extra_slow_worker BOOLEAN default false; -ALTER TABLE workers ADD COLUMN limit_max_steps BOOLEAN default false; -ALTER TABLE processing_gens ADD COLUMN job_ttl BOOLEAN default false; +ALTER TABLE waiting_prompts ADD COLUMN extra_slow_workers BOOLEAN NOT NULL default false; +ALTER TABLE workers ADD COLUMN extra_slow_worker BOOLEAN NOT NULL default false; +ALTER TABLE workers ADD COLUMN limit_max_steps BOOLEAN NOT NULL default false; ALTER TABLE processing_gens ADD COLUMN job_ttl INTEGER NOT NULL DEFAULT 150; CREATE INDEX idx_processing_gens_job_ttl ON public.processing_gens USING btree(job_ttl); -CREATE INDEX idx_workers_extra_slow_worker ON public.workers USING btree(extra_slow_worker); CREATE INDEX idx_waiting_prompts_extra_slow_workers ON public.waiting_prompts USING btree(extra_slow_workers); +CREATE INDEX idx_workers_extra_slow_worker ON public.workers USING btree(extra_slow_worker); +CREATE INDEX idx_workers_allow_img2img ON public.workers USING btree(allow_img2img); +CREATE INDEX idx_workers_allow_painting ON public.workers USING btree(allow_painting); +CREATE INDEX idx_workers_allow_post_processing ON public.workers USING btree(allow_post_processing); +CREATE INDEX idx_workers_allow_controlnet ON public.workers USING btree(allow_controlnet); +CREATE INDEX idx_workers_allow_sdxl_controlnet ON public.workers USING btree(allow_sdxl_controlnet); +CREATE INDEX idx_workers_allow_lora ON public.workers USING btree(allow_lora); \ No newline at end of file