Verify architecture for loaded Spandrel models

This commit is contained in:
Aarni Koskela
2023-12-30 16:37:03 +02:00
parent c756133541
commit 4ad0c0c0a8
8 changed files with 22 additions and 5 deletions

View File

@@ -1,9 +1,9 @@
import os
from modules.upscaler_utils import upscale_with_model
from modules.upscaler import Upscaler, UpscalerData
from modules.shared import cmd_opts, opts
from modules import modelloader, errors
from modules.shared import cmd_opts, opts
from modules.upscaler import Upscaler, UpscalerData
from modules.upscaler_utils import upscale_with_model
class UpscalerRealESRGAN(Upscaler):
@@ -40,6 +40,7 @@ class UpscalerRealESRGAN(Upscaler):
info.local_data_path,
device=self.device,
half=(not cmd_opts.no_half and not cmd_opts.upcast_sampling),
expected_architecture="RealESRGAN",
)
return upscale_with_model(
mod,