Provide both xl models

pull/5/head
Guillermo Rodriguez 2023-07-27 13:15:42 -03:00
parent 440bb015cd
commit 713884e192
No known key found for this signature in database
GPG Key ID: EC3AB66D5D83B392
2 changed files with 3 additions and 1 deletions

View File

@ -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'},

View File

@ -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: