From 713884e192a6619a8f17a74a67b461eebf6ccb7f Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Thu, 27 Jul 2023 13:15:42 -0300 Subject: [PATCH] Provide both xl models --- skynet/constants.py | 1 + skynet/utils.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/skynet/constants.py b/skynet/constants.py index 37ccefd..743270f 100755 --- a/skynet/constants.py +++ b/skynet/constants.py @@ -8,6 +8,7 @@ MODELS = { 'prompthero/openjourney': { 'short': 'midj'}, 'runwayml/stable-diffusion-v1-5': { 'short': 'stable'}, 'stabilityai/stable-diffusion-2-1-base': { 'short': 'stable2'}, + 'snowkidy/stable-diffusion-xl-base-0.9': { 'short': 'stablexl0.9'}, 'stabilityai/stable-diffusion-xl-base-1.0': { 'short': 'stablexl'}, 'Linaqruf/anything-v3.0': { 'short': 'hdanime'}, 'hakurei/waifu-diffusion': { 'short': 'waifu'}, diff --git a/skynet/utils.py b/skynet/utils.py index 2dce173..2ec7a6c 100755 --- a/skynet/utils.py +++ b/skynet/utils.py @@ -82,7 +82,8 @@ def pipeline_for(model: str, mem_fraction: float = 1.0, image=False) -> Diffusio if model == 'runwayml/stable-diffusion-v1-5': params['revision'] = 'fp16' - if model == 'stabilityai/stable-diffusion-xl-base-1.0': + if (model == 'stabilityai/stable-diffusion-xl-base-1.0' or + model == 'snowkidy/stable-diffusion-xl-base-0.9'): if image: pipe_class = StableDiffusionXLImg2ImgPipeline else: