Crash on corner case for image mask
jug-dev opened this issue · 1 comments
jug-dev commented
ERROR | 2023-05-06 20:04:56.381221 | worker.jobs.stable_diffusion:start_job:225 - Something went wrong when processing request. Please check your trace.log file for the full stack trace. Payload: {'prompt': 'PROMPT REDACTED', 'height': 768, 'width': 768, 'ddim_steps': 35, 'sampler_name': 'k_euler', 'cfg_scale': 10.0, 'seed': '965542614', 'tiling': False, 'karras': True, 'n_iter': 1, 'source_image': <PIL.Image.Image image mode=RGB size=512x512 at 0x2248D0ABFA0>, 'source_mask': <PIL.Image.Image image mode=RGB size=768x768 at 0x2248D0A9FF0>, 'control_type': 'depth', 'init_as_control': False, 'return_control_map': False, 'model': 'Grapefruit Hentai', 'source_processing': 'img2img', 'control_strength': 0.75, 'request_type': 'img2img'}
TRACE | 2023-05-06 20:04:56.395269 | worker.jobs.stable_diffusion:start_job:231 - Traceback (most recent call last):
File "D:\AI\AI-Horde-Worker\worker\jobs\stable_diffusion.py", line 210, in start_job
self.image = generator(gen_payload)
File "D:\AI\AI-Horde-Worker\conda\envs\windows\lib\site-packages\hordelib\horde.py", line 443, in basic_inference
self._resize_sources_to_request(payload)
File "D:\AI\AI-Horde-Worker\conda\envs\windows\lib\site-packages\hordelib\horde.py", line 385, in _resize_sources_to_request
payload["source_image"] = self._add_image_alpha_channel(payload["source_image"], payload["source_mask"])
File "D:\AI\AI-Horde-Worker\conda\envs\windows\lib\site-packages\hordelib\horde.py", line 344, in _add_image_alpha_channel
source_image.putalpha(alpha_data)
File "D:\AI\AI-Horde-Worker\conda\envs\windows\lib\site-packages\PIL\Image.py", line 1890, in putalpha
self.im.putband(alpha.im, band)
ValueError: images do not match
jug-dev commented
Fixed in Haidra-Org/hordelib#229