mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
fix taesd for original backend
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
## Update for 2023-08-05
|
||||
|
||||
Another minor update, but it unlocks some cool new items...
|
||||
|
||||
- diffusers:
|
||||
- vaesd live preview (sd and sd-xl)
|
||||
- fix inpainting (sd and sd-xl)
|
||||
|
||||
Submodule extensions-builtin/sd-dynamic-thresholding updated: 5349f00872...c60fe071e5
Submodule extensions-builtin/sd-webui-controlnet updated: 4b815cc351...af34f51449
@@ -1000,4 +1000,5 @@ class Shared(sys.modules[__name__].__class__): # this class is here to provide s
|
||||
|
||||
sd_model = None
|
||||
sd_refiner = None
|
||||
sd_model_type = ''
|
||||
sys.modules[__name__].__class__ = Shared
|
||||
|
||||
@@ -5,6 +5,7 @@ Tiny AutoEncoder for Stable Diffusion
|
||||
https://github.com/madebyollin/taesd
|
||||
"""
|
||||
import os
|
||||
from PIL import Image
|
||||
from modules import devices, paths_internal
|
||||
from modules.taesd.taesd import TAESD
|
||||
|
||||
@@ -42,8 +43,11 @@ def model(model_class = 'sd', model_type = 'decoder'):
|
||||
def decode(latents):
|
||||
from modules import shared
|
||||
model_class = shared.sd_model_type
|
||||
if model_class == 'ldm':
|
||||
model_class = 'sd'
|
||||
if 'sd' not in model_class:
|
||||
return None
|
||||
shared.log.warning(f'TAESD unsupported model type: {model_class}')
|
||||
return Image.new('RGB', (8, 8), color = (0, 0, 0))
|
||||
vae = taesd_models[f'{model_class}-decoder']
|
||||
if vae is None:
|
||||
model_path = os.path.join(paths_internal.models_path, "TAESD", f"tae{model_class}_decoder.pth")
|
||||
|
||||
Reference in New Issue
Block a user