lint(api): improve logging while upscaling
This commit is contained in:
parent
cf6a151548
commit
4d9dc05cd0
|
@ -146,7 +146,7 @@ def make_resrgan(ctx: ServerContext, params: UpscaleParams, tile=0):
|
|||
|
||||
|
||||
def upscale_resrgan(ctx: ServerContext, params: UpscaleParams, source_image: Image) -> Image:
|
||||
print('upscaling image with Real ESRGAN', params)
|
||||
print('upscaling image with Real ESRGAN', params.scale)
|
||||
|
||||
output = np.array(source_image)
|
||||
upsampler = make_resrgan(ctx, params, tile=512)
|
||||
|
@ -157,7 +157,9 @@ def upscale_resrgan(ctx: ServerContext, params: UpscaleParams, source_image: Ima
|
|||
if params.faces:
|
||||
output = upscale_gfpgan(ctx, params, output, upsampler=upsampler)
|
||||
|
||||
return Image.fromarray(output, 'RGB')
|
||||
output = Image.fromarray(output, 'RGB')
|
||||
print('final output image size', output.size)
|
||||
return output
|
||||
|
||||
|
||||
def upscale_gfpgan(ctx: ServerContext, params: UpscaleParams, image, upsampler=None) -> Image:
|
||||
|
|
|
@ -59,8 +59,8 @@ export function ImageCard(props: ImageCardProps) {
|
|||
window.open(output.url, '_blank');
|
||||
}
|
||||
|
||||
return <Card sx={{ maxWidth: size.width }} elevation={2}>
|
||||
<CardMedia sx={{ height: size.height }}
|
||||
return <Card sx={{ maxWidth: 512 }} elevation={2}>
|
||||
<CardMedia sx={{ height: 512 }}
|
||||
component='img'
|
||||
image={output.url}
|
||||
title={params.prompt}
|
||||
|
|
Loading…
Reference in New Issue