apply lint
This commit is contained in:
parent
cc7cafabfd
commit
1289c560bd
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue