ototadana / sd-face-editor

Face Editor for Stable Diffusion
MIT License
1.02k stars 85 forks source link

Unable to use with Ultimate SD upscale #162

Closed WuKaiYi closed 10 months ago

WuKaiYi commented 1 year ago

prompt for the face: multiple boys,multiple girls,highres,comic Error running postprocess: H:\stable-diffusion-webui\extensions\sd-face-editor\scripts\face_editor_extension.py Traceback (most recent call last): File "H:\stable-diffusion-webui\modules\scripts.py", line 651, in postprocess script.postprocess(p, processed, script_args) File "H:\stable-diffusion-webui\extensions\sd-face-editor\scripts\face_editor_extension.py", line 53, in postprocess ImageProcessor(WorkflowManager.get(option.workflow)).proc_images(o, res, option) File "H:\stable-diffusion-webui\extensions\sd-face-editor\scripts\use_cases\image_processor.py", line 62, in proc_images proc = self.proc_image(p, option, image, res.infotexts[i], (res.width, res.height)) File "H:\stable-diffusion-webui\extensions\sd-face-editor\scripts\use_cases\image_processor.py", line 176, in proc_image proc_image = self.workflow.process(jobs, face, p, option) File "H:\stable-diffusion-webui\extensions\sd-face-editor\scripts\use_cases\workflow_manager.py", line 162, in process image = face_processor.process(face, p, params) File "H:\stable-diffusion-webui\extensions\sd-face-editor\scripts\inferencers\img2img_face_processor.py", line 36, in process proc = process_images(p) File "H:\stable-diffusion-webui\modules\processing.py", line 732, in process_images res = process_images_inner(p) File "H:\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs) File "H:\stable-diffusion-webui\modules\processing.py", line 803, in process_images_inner p.init(p.all_prompts, p.all_seeds, p.all_subseeds) File "H:\stable-diffusion-webui\modules\processing.py", line 1455, in init image_masked.paste(image.convert("RGBA").convert("RGBa"), mask=ImageOps.invert(self.mask_for_overlay.convert('L'))) File "H:\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 1732, in paste self.im.paste(im, box, mask.im) ValueError: images do not match

ototadana commented 1 year ago

Thanks for the error report.

I spent several hours reading the Ultimate SD upscale source code and tried several possible fixes, but unfortunately, I could not find an effective fix.

Until someone finds a way to fix it, I think the best way is not to use them all at the same time, but to follow the two steps: (1) use Face Editor with txt2img or img2img, and (2) use Ultimate SD upscale.

ototadana commented 10 months ago

I noticed that the following fix also resolves this error.

https://github.com/ototadana/sd-face-editor/pull/179