vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.69k stars 421 forks source link

[Issue]: Batch inpainting not working #2349

Closed tembel123456 closed 1 year ago

tembel123456 commented 1 year ago

Issue Description

Hello, when try BATCH, batch inpainting, with folder with mask's, get these errors... trying with jpg and png extension, images and mask's have the same name...
Mask's generated by Segment anything, after was extension dissabled,

images and mask's have names like 001.png , both the same

running SDNEXT with --safe command line flag and get the same error

Without mask's , batch working

Have last version SDnext,

extensions - Openpose, Faceswaplab, Adetailer

04:25:58-271464 ERROR gradio call: AttributeError ┌──────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────┐ │ C:\automatic\modules\call_queue.py:34 in f │ │ │ │ 33 │ │ │ try: │ │ > 34 │ │ │ │ res = func(*args, *kwargs) │ │ 35 │ │ │ │ progress.record_results(id_task, res) │ │ │ │ C:\automatic\modules\img2img.py:214 in img2img │ │ │ │ 213 │ if p.is_batch: │ │ > 214 │ │ process_batch(p, img2img_batch_files, img2img_batch_input_dir, img2img_batch_out │ │ 215 │ │ processed = processing.Processed(p, [], p.seed, "") │ │ │ │ C:\automatic\extensions-builtin\sd-webui-controlnet\scripts\batch_hijack.py:25 in img2img_process_batch_hijack │ │ │ │ 24 │ │ if not cn_is_batch: │ │ > 25 │ │ │ return getattr(img2img, '__controlnet_original_process_batch')(p, args, **k │ │ 26 │ │ │ │ C:\automatic\modules\img2img.py:81 in process_batch │ │ │ │ 80 │ │ if proc is None: │ │ > 81 │ │ │ proc = processing.process_images(p) │ │ 82 │ │ for n, (image, image_file) in enumerate(itertools.ziplongest(proc.images,batch │ │ │ │ C:\automatic\modules\processing.py:678 in process_images │ │ │ │ 677 │ │ │ with context_hypertile_vae(p), context_hypertile_unet(p): │ │ > 678 │ │ │ │ res = process_images_inner(p) │ │ 679 │ finally: │ │ │ │ C:\automatic\extensions-builtin\sd-webui-controlnet\scripts\batch_hijack.py:42 in processing_process_images_hijack │ │ │ │ 41 │ │ │ # we are not in batch mode, fallback to original function │ │ > 42 │ │ │ return getattr(processing, '__controlnet_original_process_images_inner')(p, │ │ 43 │ │ │ │ C:\automatic\modules\processing.py:769 in process_images_inner │ │ │ │ 768 │ │ with devices.autocast(): │ │ > 769 │ │ │ p.init(p.all_prompts, p.all_seeds, p.all_subseeds) │ │ 770 │ │ if shared.state.job_count == -1: │ │ │ │ C:\automatic\modules\processing.py:1183 in init │ │ │ │ 1182 │ │ if image_mask is not None: │ │ > 1183 │ │ │ image_mask = image_mask.convert('L') │ │ 1184 │ │ │ if self.inpainting_mask_invert: │ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ AttributeError: 'list' object has no attribute 'convert'

Version Platform Description

04:37:09-665446 INFO Starting SD.Next 04:37:09-669436 INFO Python 3.10.6 on Windows 04:37:09-764131 INFO Version: app=sd.next updated=2023-10-18 hash=76d262f1 url=https://github.com/vladmandic/automatic/tree/master 04:37:10-120159 INFO Latest published version: 66f75b6a1114d07e40e27a09cd2f14f78e16eba3 2023-10-18T20:00:23Z 04:37:10-128391 INFO Platform: arch=AMD64 cpu=Intel64 Family 6 Model 165 Stepping 5, GenuineIntel system=Windows release=Windows-10-10.0.19045-SP0 python=3.10.6 04:37:10-132368 INFO nVidia CUDA toolkit detected: nvidia-smi present 04:37:10-195836 WARNING Modified files: ['webui.bat', 'mask_add_0.png', 'mask_gray_test.png'] 04:37:10-229746 INFO Extensions: disabled=['sd-webui-segment-anything'] 04:37:10-230743 INFO Extensions: enabled=['clip-interrogator-ext', 'Lora', 'sd-extension-chainner', 'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg'] extensions-builtin 04:37:10-236727 INFO Verifying requirements 04:37:10-249692 INFO Verifying packages 04:37:10-251687 INFO Verifying repositories 04:37:12-756011 INFO Verifying submodules 04:37:25-513653 INFO Extensions enabled: ['clip-interrogator-ext', 'Lora', 'sd-extension-chainner', 'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg']

Relevant log output

No response

Backend

Original

Model

SD 1.5

Acknowledgements

vladmandic commented 1 year ago

should be fixed now. if issue persists, i'll reopen.