This commit is contained in:
lllyasviel
2024-01-25 13:20:43 -08:00
parent a286338859
commit d44608f5f5
6 changed files with 14 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import os
from modules.modelloader import load_file_from_url
from modules.upscaler import Upscaler, UpscalerData
from modules.upscaler import Upscaler, UpscalerData, prepare_free_memory
from ldsr_model_arch import LDSR
from modules import shared, script_callbacks, errors
import sd_hijack_autoencoder # noqa: F401
@@ -49,6 +49,7 @@ class UpscalerLDSR(Upscaler):
return LDSR(model, yaml)
def do_upscale(self, img, path):
prepare_free_memory()
try:
ldsr = self.load_model(path)
except Exception: