thygate / stable-diffusion-webui-depthmap-script

High Resolution Depth Maps for Stable Diffusion WebUI
MIT License
1.67k stars 154 forks source link

Error completing request #147

Open Alphabravo34000 opened 1 year ago

Alphabravo34000 commented 1 year ago

hello, I can't figure it out this problem.....

Error completing request Arguments: (0, <PIL.Image.Image image mode=RGB size=4244x2448 at 0x2119D917220>, [<tempfile._TemporaryFileWrapper object at 0x000002119D915030>], '', '', 0, 0, 512, 512, False, False, True, True, True, False, False, 1, False, False, False, 2.5, 4, 0, False, 0, 1, True, True, 'u2net', False, False, False, 0, 2) {} Traceback (most recent call last): File "C:\Users\Shadow\stable-diffusion-webui\modules\call_queue.py", line 56, in f res = list(func(*args, *kwargs)) File "C:\Users\Shadow\stable-diffusion-webui\modules\call_queue.py", line 37, in f res = func(args, *kwargs) File "C:\Users\Shadow\stable-diffusion-webui\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 1158, in run_generate outputs, mesh_fi = run_depthmap(None, outpath, imageArr, imageNameArr, compute_device, model_type, net_width, net_height, match_size, invert_depth, boost, save_depth, show_depth, show_heat, combine_output, combine_output_axis, gen_stereo, gen_stereotb, gen_anaglyph, stereo_divergence, stereo_fill, stereo_balance, clipdepth, clipthreshold_far, clipthreshold_near, inpaint, inpaint_vids, fnExt, vid_ssaa, background_removal, background_removed_images, save_background_removal_masks, False) File "C:\Users\Shadow\stable-diffusion-webui\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 448, in run_depthmap images.save_image(Image.fromarray(img_output), path=outpath, basename=basename, seed=None, prompt=None, extension=opts.samples_format, info=info, short_filename=True,no_prompt=True, grid=False, pnginfo_section_name="extras", existing_info=None, forced_filename=None) File "C:\Users\Shadow\stable-diffusion-webui\modules\images.py", line 590, in save_image image = image.resize((round(opts.target_side_length), round(image.height opts.target_side_length / image.width)), LANCZOS) File "C:\Users\Shadow\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 2192, in resize return self._new(self.im.resize(size, resample, box)) ValueError: image has wrong mode

Traceback (most recent call last): File "C:\Users\Shadow\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 987, in postprocess_data if predictions[i] is components._Keywords.FINISHED_ITERATING: IndexError: tuple index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Shadow\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "C:\Users\Shadow\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1078, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "C:\Users\Shadow\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 991, in postprocess_data raise ValueError( ValueError: Number of output components does not match number of values returned from from function f

graemeniedermayer commented 1 year ago

At one point there's size size=4244x2448 and the image is suppose to be 512, 512. It looks like a resizing issue.

Maybe try resizing before submitting the image. Normally auto1111 automatically resize, is this through the api or depth tab?

DoritoTheChips commented 1 year ago

The output image still save itself in the extras-image folder despite the error, at least for me. You can still avoid the error by applying a resolution of 512 x 512 to your input image. (you can change resolution in the Extra tab)