fix bugs, fix api, clear code

This commit is contained in:
Tran Xen
2023-07-29 00:24:51 +02:00
parent a511214aaa
commit d755be1325
11 changed files with 450 additions and 254 deletions
+9 -1
View File
@@ -5,6 +5,7 @@ from client_utils import (
PostProcessingOptions,
FaceSwapResponse,
pil_to_base64,
InpaintingWhen,
)
address = "http://127.0.0.1:7860"
@@ -24,7 +25,14 @@ unit2 = FaceSwapUnit(
# Post-processing config :
pp = PostProcessingOptions(
face_restorer_name="CodeFormer", codeformer_weight=0.5, restorer_visibility=1
face_restorer_name="CodeFormer",
codeformer_weight=0.5,
restorer_visibility=1,
upscaler_name="Lanczos",
scale=4,
inpainting_steps=30,
inpainting_denoising_strengh=0.1,
inpainting_when=InpaintingWhen.BEFORE_RESTORE_FACE,
)
# Prepare the request