(self, inputs)
| 1266 | "like: extend the image into a resolution of 2048x1024, extend the image into 2048x1024. " |
| 1267 | "The input to this tool should be a comma separated string of two, representing the image_path and the resolution of widthxheight") |
| 1268 | def inference(self, inputs): |
| 1269 | image_path, resolution = inputs.split(',') |
| 1270 | width, height = resolution.split('x') |
| 1271 | tosize = (int(width), int(height)) |
| 1272 | image = Image.open(image_path) |
| 1273 | image = ImageOps.crop(image, (10, 10, 10, 10)) |
| 1274 | out_painted_image = self.dowhile(image, tosize, 4, True, False) |
| 1275 | updated_image_path = get_new_image_name(image_path, func_name="outpainting") |
| 1276 | out_painted_image.save(updated_image_path) |
| 1277 | print(f"\nProcessed InfinityOutPainting, Input Image: {image_path}, Input Resolution: {resolution}, " |
| 1278 | f"Output Image: {updated_image_path}") |
| 1279 | return updated_image_path |
| 1280 | |
| 1281 | |
| 1282 |
nothing calls this directly
no test coverage detected