Commit
•
562af73
1
Parent(s):
40de55c
chore: Refactor image and mask image path handling in inpainting_batch_inference function
Browse files- api/routers/painting.py +2 -2
api/routers/painting.py
CHANGED
@@ -189,8 +189,8 @@ async def inpainting_batch_inference(
|
|
189 |
raise HTTPException(status_code=400, detail="The number of images, mask images, and requests must match.")
|
190 |
|
191 |
batcher = InpaintingBatcher(max_batch_size=64)
|
192 |
-
image_paths =
|
193 |
-
mask_image_paths =
|
194 |
results = await batcher.process_batch((image_paths, mask_image_paths, requests))
|
195 |
|
196 |
return results
|
|
|
189 |
raise HTTPException(status_code=400, detail="The number of images, mask images, and requests must match.")
|
190 |
|
191 |
batcher = InpaintingBatcher(max_batch_size=64)
|
192 |
+
image_paths = [save_image(image) for image in images]
|
193 |
+
mask_image_paths = [save_image(mask_image) for mask_image in mask_images]
|
194 |
results = await batcher.process_batch((image_paths, mask_image_paths, requests))
|
195 |
|
196 |
return results
|