Fix TAESD previews with PixArt

This commit is contained in:
Disty0
2025-06-06 19:43:00 +03:00
parent 5624671191
commit 2f7aff5250
3 changed files with 12 additions and 3 deletions
+1
View File
@@ -20,6 +20,7 @@
- Meissonic with multiple generators
- Kandinsky V2.2 invalid attention processor
- PixArt Sigma Small and Large loading
- TAESD previews with PixArt
## Update for 2025-06-02
+4
View File
@@ -56,6 +56,10 @@ def get_model_type(pipe):
model_type = 'mochivideo'
elif "Allegro" in name:
model_type = 'allegrovideo'
elif "PixArtSigma" in name:
model_type = 'pixartsigma'
elif "PixArtAlpha" in name:
model_type = 'pixartalpha'
else:
model_type = name
return model_type
+7 -3
View File
@@ -36,7 +36,7 @@ prev_cls = ''
prev_type = ''
prev_model = ''
lock = threading.Lock()
supported = ['sd', 'sdxl', 'f1', 'h1', 'hunyuanvideo', 'wanvideo', 'mochivideo']
supported = ['sd', 'sdxl', 'f1', 'h1', 'hunyuanvideo', 'wanvideo', 'mochivideo', 'pixartsigma', 'pixartalpha']
def warn_once(msg, variant=None):
@@ -55,9 +55,13 @@ def get_model(model_type = 'decoder', variant = None):
cls = shared.sd_model_type
if cls == 'ldm': # original backend
cls = 'sd'
if cls == 'h1': # hidream uses flux vae
elif cls == 'h1': # hidream uses flux vae
cls = 'f1'
if cls not in supported:
elif cls == 'pixartsigma':
cls = 'sdxl'
elif cls == 'pixartalpha':
cls = 'sd'
elif cls not in supported:
warn_once(f'cls={shared.sd_model.__class__.__name__} type={cls} unsuppported', variant=variant)
variant = variant or shared.opts.taesd_variant
folder = os.path.join(paths.models_path, "TAESD")