1
0
Fork 0

apply lint

This commit is contained in:
Sean Sube 2023-02-14 00:12:07 -06:00
parent cc7cafabfd
commit 1289c560bd
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
4 changed files with 7 additions and 8 deletions

View File

@ -4,7 +4,6 @@ from os import path
import numpy as np
from PIL import Image
from ..params import DeviceParams, ImageParams, StageParams, UpscaleParams
from ..server.device_pool import JobContext
from ..utils import ServerContext, run_gc

View File

@ -76,9 +76,7 @@ def load_resrgan(
logger.debug("loading Real ESRGAN upscale model from %s", model_path)
# TODO: shouldn't need the PTH file
model_path_pth = path.join(
server.cache_path, ("%s.pth" % params.upscale_model)
)
model_path_pth = path.join(server.cache_path, ("%s.pth" % params.upscale_model))
upsampler = RealESRGANer(
scale=params.scale,
model_path=model_path_pth,

View File

@ -20,7 +20,7 @@ from diffusers import (
try:
from diffusers import DEISMultistepScheduler
except:
except ImportError:
from .stub_scheduler import StubScheduler as DEISMultistepScheduler
from ..params import DeviceParams, Size

View File

@ -1,6 +1,8 @@
from typing import Any
class StubScheduler():
def step(self, model_output: Any, timestep: int, sample: Any, return_dict: bool = True) -> None:
raise NotImplemented("scheduler not available, try updating diffusers")
class StubScheduler:
def step(
self, model_output: Any, timestep: int, sample: Any, return_dict: bool = True
) -> None:
raise NotImplementedError("scheduler not available, try updating diffusers")