Skip to content

Commit

Permalink
Merge pull request #305 from Haidra-Org/exclude-sdxl-models
Browse files Browse the repository at this point in the history
fix: do not attempt to load SDXL models
  • Loading branch information
tazlin authored Sep 29, 2023
2 parents 4233ba6 + 05d51d8 commit 90c755e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions bridgeData_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ models_to_load:
# This is to avoid loading models which you do not want either due to VRAM constraints, or due to NSFW content
models_to_skip:
- "pix2pix"
- "SDXL 1.0" # Not supported in this worker.
#- "stable_diffusion_inpainting" # Inpainting is generally quite heavy along with other models for smaller GPUs.
#- "stable_diffusion_2.1" # Stable diffusion 2.1 has bigger memory requirements than 1.5, so if your card cannot lift, it, disable it
#- "stable_diffusion_2.0" # Same as Stable diffusion 2.1
Expand Down
7 changes: 7 additions & 0 deletions worker/bridge_data/stable_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ def reload_data(self):
if top_n:
self.models_to_load.extend(self.get_top_n_models(top_n))

for i, model_name in enumerate(self.models_to_load):
if "SDXL" in model_name:
del self.models_to_load[i]
logger.error(
f"SDXL models are not supported in this worker version. Removing {model_name}",
)

if self.dynamic_models and not self.number_of_dynamic_models:
logger.warning(
"Dynamic models are enabled but config option `number_of_dynamic_models` isn't set or is 0. "
Expand Down

0 comments on commit 90c755e

Please sign in to comment.