Commit dfdc5124 authored by Aarni Koskela's avatar Aarni Koskela

SwinIR: use prefer_half

parent e4dcdcc9
import logging
import sys
import torch
from PIL import Image
from modules import devices, modelloader, script_callbacks, shared, upscaler_utils
......@@ -69,7 +70,7 @@ class UpscalerSwinIR(Upscaler):
model_descriptor = modelloader.load_spandrel_model(
filename,
device=self._get_device(),
dtype=devices.dtype,
prefer_half=(devices.dtype == torch.float16),
expected_architecture="SwinIR",
)
if getattr(shared.opts, 'SWIN_torch_compile', False):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment