mirror of
https://github.com/vladmandic/sdnext.git
synced 2026-01-27 15:02:48 +03:00
34 lines
744 B
Python
34 lines
744 B
Python
def is_compatible(model, pattern='None'):
|
|
if model is None:
|
|
return False
|
|
if hasattr(model, '__class__'):
|
|
return model.__class__.__name__.startswith(pattern)
|
|
return False
|
|
|
|
|
|
def is_sd15(model):
|
|
return is_compatible(model, pattern='StableDiffusion')
|
|
|
|
|
|
def is_sdxl(model):
|
|
return is_compatible(model, pattern='StableDiffusionXL')
|
|
|
|
|
|
def is_f1(model):
|
|
return is_compatible(model, pattern='Flux')
|
|
|
|
|
|
def is_sd3(model):
|
|
return is_compatible(model, pattern='StableDiffusion3Pipeline')
|
|
|
|
|
|
def is_qwen(model):
|
|
return is_compatible(model, pattern='Qwen')
|
|
|
|
|
|
def is_hunyuandit(model):
|
|
return is_compatible(model, pattern='HunyuanDiT')
|
|
|
|
def is_zimage(model):
|
|
return is_compatible(model, pattern='ZImage')
|