mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes crash when requesting post-generation upscale/face restoration
- Moves the inpainting paste to before the postprocessing.
This commit is contained in:
parent
6e33ca7e9e
commit
8d171bb044
@ -668,6 +668,15 @@ class InvokeAIWebServer:
|
||||
step_index = 1
|
||||
nonlocal prior_variations
|
||||
|
||||
|
||||
# paste the inpainting image back onto the original
|
||||
if "init_mask" in generation_parameters:
|
||||
image = paste_image_into_bounding_box(
|
||||
Image.open(init_img_path),
|
||||
image,
|
||||
**generation_parameters["bounding_box"],
|
||||
)
|
||||
|
||||
progress.set_current_status("Generation Complete")
|
||||
|
||||
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
||||
@ -756,14 +765,6 @@ class InvokeAIWebServer:
|
||||
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
||||
eventlet.sleep(0)
|
||||
|
||||
# paste the inpainting image back onto the original
|
||||
if "init_mask" in generation_parameters:
|
||||
image = paste_image_into_bounding_box(
|
||||
Image.open(init_img_path),
|
||||
image,
|
||||
**generation_parameters["bounding_box"],
|
||||
)
|
||||
|
||||
# restore the stashed URLS and discard the paths, we are about to send the result to client
|
||||
if "init_img" in all_parameters:
|
||||
all_parameters["init_img"] = init_img_url
|
||||
|
Loading…
Reference in New Issue
Block a user