Open slavasav opened 10 months ago
I must add that ADetailer still managers to fix the face, so not sure if the exception breaks anything in the flow.
I don't think it relates to ADetailer at all now, I think this line is the culprit: https://github.com/ThereforeGames/unprompted/blob/2d4a184597791875054bfc4fa65def296e789c9b/shortcodes/stable_diffusion/txt2mask.py#L498
It keeps the previous mask and when the size has changed it cannot be inverted. The fix would be to clear the current image_mask on next txt2mask call.
Due diligence
Describe the bug
Using the bodysnatcher template with fidelity_v1 in img2img, it fails to create the mask with exception in Pillow: OSError: not supported for this image mode. Using Adetailer with face detection, a prompt and "Inpaint only masked" mode. If I disable ADetailer - there is no exception. Looking through Pillow issues and latest fixed it does not seem that Pillow is the problem. Unprompted extension folder is renamed to _unpropmpted, so should go first.
The usecase is to use bodysnatcher and then replace the face with a more detailed lora using ADetailer prompt.
Also take note of the WARNING - [normal_map.processor_res] Invalid value(-1), using default value 512.
Prompt
[call "common\functions\bodysnatcher" prefix=photo subject=woman simple_description="best light, beauty" class=woman interrogate=1 max_image_size=0 inference_preset=general_v2 body_controlnet_preset=fidelity_v1 face_controlnet_preset=none keep_hands=1 keep_feet=1 mask_method=clipseg manual_mask_mode=subtract mask_informs_size=1 mask_size_limit=768.0 background_mode=0 bypass_zoom_enhance=1 zoom_enhance_base_cfg=10 zoom_enhance_inherit_negative=1 show_original=0 color_correct_method=hm-mkl-hm color_correct_timing=pre color_correct_strength=1 debug=0 name='Bodysnatcher v1.5.0']
Log output
Unprompted version
v10.6.0
WebUI version
v1.7.0
Other comments
No response