Skip to content
代码片段 群组 项目
提交 d9e4e4d7 编辑于 作者: random_thoughtss's avatar random_thoughtss
浏览文件

Fix non-square full resolution inpainting.

上级 71571e3f
No related branches found
No related tags found
无相关合并请求
......@@ -49,7 +49,7 @@ def expand_crop_region(crop_region, processing_width, processing_height, image_w
ratio_processing = processing_width / processing_height
if ratio_crop_region > ratio_processing:
desired_height = (x2 - x1) * ratio_processing
desired_height = (x2 - x1) / ratio_processing
desired_height_diff = int(desired_height - (y2-y1))
y1 -= desired_height_diff//2
y2 += desired_height_diff - desired_height_diff//2
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册