1
0
Fork 0

fix(api): make stage-specific source image optional in GFPGAN stage (#233)

This commit is contained in:
Sean Sube 2023-03-10 18:15:31 -06:00
parent da3d95ff49
commit 6bdaa4a4ed
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
from logging import getLogger from logging import getLogger
from os import path from os import path
from typing import Optional
import numpy as np import numpy as np
from PIL import Image from PIL import Image
@ -54,7 +55,7 @@ def correct_gfpgan(
source: Image.Image, source: Image.Image,
*, *,
upscale: UpscaleParams, upscale: UpscaleParams,
stage_source: Image.Image, stage_source: Optional[Image.Image] = None,
**kwargs, **kwargs,
) -> Image.Image: ) -> Image.Image:
upscale = upscale.with_args(**kwargs) upscale = upscale.with_args(**kwargs)