Skip to content

Commit

Permalink
fix: not_nulls
Browse files Browse the repository at this point in the history
  • Loading branch information
db0 committed Sep 13, 2024
1 parent 2871b33 commit e497e9e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
14 changes: 7 additions & 7 deletions horde/classes/stable/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
15 changes: 10 additions & 5 deletions sql_statements/4.43.0.txt
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit e497e9e

Please sign in to comment.