Skip to content

Commit

Permalink
apply lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 14, 2023
1 parent cc7cafa commit 1289c56
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion api/onnx_web/chain/correct_gfpgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
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
Expand Down
4 changes: 1 addition & 3 deletions api/onnx_web/chain/upscale_resrgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion api/onnx_web/diffusion/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

try:
from diffusers import DEISMultistepScheduler
except:
except ImportError:
from .stub_scheduler import StubScheduler as DEISMultistepScheduler

from ..params import DeviceParams, Size
Expand Down
8 changes: 5 additions & 3 deletions api/onnx_web/diffusion/stub_scheduler.py
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit 1289c56

Please sign in to comment.