backend add outpainting

This commit is contained in:
Qing
2023-08-30 13:28:31 +08:00
parent 0b3a9a68a2
commit c7c309cb89
5 changed files with 354 additions and 13 deletions

View File

@@ -55,6 +55,7 @@ class Config(BaseModel):
# Crop image to this size before doing sd inpainting
# The value is always on the original image scale
use_croper: bool = False
croper_is_outpainting: bool = False
croper_x: int = None
croper_y: int = None
croper_height: int = None
@@ -78,6 +79,10 @@ class Config(BaseModel):
sd_seed: int = 42
sd_match_histograms: bool = False
# out-painting
sd_outpainting_softness: float = 30.0
sd_outpainting_space: float = 50.0
# Configs for opencv inpainting
# opencv document https://docs.opencv.org/4.6.0/d7/d8b/group__photo__inpaint.html#gga8002a65f5a3328fbf15df81b842d3c3ca05e763003a805e6c11c673a9f4ba7d07
cv2_flag: str = "INPAINT_NS"