Replace upscale model with Spandrel

#56
by adamelliotfields - opened
from spandrel import ModelLoader

# for example, with the official xinntao/Real-ESRGAN weights
model = ModelLoader().load_from_file("RealESRGAN_x2plus.pth").cuda().eval()
with torch.inference_mode():
    output = model(input_image_tensor)
adamelliotfields changed discussion status to closed

Sign up or log in to comment