mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
fix accessing options when they are not ready for SwinIR.
This commit is contained in:
parent
8fba733c09
commit
cefb5d6d7d
@ -99,11 +99,15 @@ class UpscalerSwinIR(Upscaler):
|
|||||||
def upscale(
|
def upscale(
|
||||||
img,
|
img,
|
||||||
model,
|
model,
|
||||||
tile=opts.SWIN_tile,
|
tile=None,
|
||||||
tile_overlap=opts.SWIN_tile_overlap,
|
tile_overlap=None,
|
||||||
window_size=8,
|
window_size=8,
|
||||||
scale=4,
|
scale=4,
|
||||||
):
|
):
|
||||||
|
tile = tile or opts.SWIN_tile
|
||||||
|
tile_overlap = tile_overlap or opts.SWIN_tile_overlap
|
||||||
|
|
||||||
|
|
||||||
img = np.array(img)
|
img = np.array(img)
|
||||||
img = img[:, :, ::-1]
|
img = img[:, :, ::-1]
|
||||||
img = np.moveaxis(img, 2, 0) / 255
|
img = np.moveaxis(img, 2, 0) / 255
|
||||||
|
Loading…
Reference in New Issue
Block a user