stable-diffusion-webui-depthmap-script
stable-diffusion-webui-depthmap-script copied to clipboard
Not working on 9:16 aspect ratio | can also be amd gpu related?
device: cpu Loading model weights from ./models/leres/res101.pth Downloading https://sfu.ca/~yagiz/CVPR21/latest_net_G.pth to ./models/pix2pix/latest_net_G.pth 100%|███████████████████████████████████████████████████████████████████████████████| 304M/304M [00:31<00:00, 10.2MB/s] initialize network with normal loading the model from ./models/pix2pix\latest_net_G.pth Computing depthmap(s) .. 0%| | 0/1 [00:00<?, ?it/s]
wholeImage being processed in : 1568 Adjust factor is: 1.0 Selecting patches ... Target resolution: (3136, 1758, 3) Resulting depthmap resolution will be : (5824, 3265) patches to process: 12 processing patch 0 / 11 | [ 0 1248 2912 2912] processing patch 1 / 11 | [ 0 1872 2912 2912] processing patch 2 / 11 | [ 0 2496 2912 2912] processing patch 3 / 11 | [ 208 3328 2496 2496] processing patch 4 / 11 | [ 921 1545 2318 2318] processing patch 5 / 11 | [ 921 2169 2318 2318] processing patch 6 / 11 | [ 921 2793 2318 2318] processing patch 7 / 11 | [ 921 3417 2318 2318] processing patch 8 / 11 | [ 0 1872 1664 1664] processing patch 9 / 11 | [ 0 2496 1664 1664] processing patch 10 / 11 | [ 0 3120 1664 1664] processing patch 11 / 11 | [ 0 3744 1664 1664] 0%| | 0/1 [01:14<?, ?it/s] Error completing request Arguments: (0, <PIL.Image.Image image mode=RGB size=3264x5824 at 0x1738178E650>, None, '', '', 1, 0, 512, 512, False, True, False, False, 0, 1, False, 1, True, True, False, False, ['left-right', 'red-cyan-anaglyph'], 2.5, 'polylines_sharp', 0, True, True, False, False, False, 'u2net', False, 0, 2, False, None, True, True, True, False) {} Traceback (most recent call last): File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f res = list(func(*args, **kwargs)) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\modules\call_queue.py", line 37, in f res = func(*args, **kwargs) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 1184, in run_generate outputs, mesh_fi, meshsimple_fi = run_depthmap( File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 666, 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\pieter\Downloads\stable-diffusion-webui-directml\modules\images.py", line 635, in save_image image = image.resize((round(image.width * opts.target_side_length / image.height), round(opts.target_side_length)), LANCZOS) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\PIL\Image.py", line 2193, in resize return self._new(self.im.resize(size, resample, box)) ValueError: image has wrong mode
Traceback (most recent call last): File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\routes.py", line 414, in run_predict output = await app.get_blocks().process_api( File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1326, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1229, in postprocess_data self.validate_outputs(fn_index, predictions) # type: ignore File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1204, in validate_outputs raise ValueError( ValueError: An event handler (f) didn't receive enough output values (needed: 5, received: 3). Wanted outputs: [gallery, textbox, model3d, html, html] Received outputs: [None, "", "
Time taken:
DepthMap v0.3.11 (ebf229bd) device: cpu Loading model weights from ./models/leres/res101.pth Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU. All done. Error completing request Arguments: (0, <PIL.Image.Image image mode=RGB size=3240x5760 at 0x1738178D330>, None, '', '', 0, 0, 512, 512, False, True, False, False, 0, 1, False, 1, True, True, False, False, ['left-right', 'red-cyan-anaglyph'], 2.5, 'polylines_sharp', 0, True, True, False, False, False, 'u2net', False, 0, 2, False, None, True, True, True, False) {} Traceback (most recent call last): File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f res = list(func(*args, **kwargs)) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\modules\call_queue.py", line 37, in f res = func(*args, **kwargs) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 1184, in run_generate outputs, mesh_fi, meshsimple_fi = run_depthmap( File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 779, in run_depthmap mesh_fi = run_3dphoto(device, inpaint_imgs, inpaint_depths, inputnames, outpath, fnExt, vid_ssaa, inpaint_vids) UnboundLocalError: local variable 'inpaint_imgs' referenced before assignment
Traceback (most recent call last): File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\routes.py", line 414, in run_predict output = await app.get_blocks().process_api( File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1326, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1229, in postprocess_data self.validate_outputs(fn_index, predictions) # type: ignore File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1204, in validate_outputs raise ValueError( ValueError: An event handler (f) didn't receive enough output values (needed: 5, received: 3). Wanted outputs: [gallery, textbox, model3d, html, html] Received outputs: [None, "", "
Time taken:
DepthMap v0.3.11 (ebf229bd) device: cpu Loading model weights from ./models/leres/res101.pth Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU. All done. Error completing request Arguments: (0, <PIL.Image.Image image mode=RGB size=1280x800 at 0x17383A11D20>, None, '', '', 0, 0, 512, 512, False, True, False, False, 0, 1, False, 1, True, True, False, False, ['left-right', 'red-cyan-anaglyph'], 2.5, 'polylines_sharp', 0, True, True, False, False, False, 'u2net', False, 0, 2, False, None, True, True, True, False) {} Traceback (most recent call last): File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f res = list(func(*args, **kwargs)) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\modules\call_queue.py", line 37, in f res = func(*args, **kwargs) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 1184, in run_generate outputs, mesh_fi, meshsimple_fi = run_depthmap( File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 779, in run_depthmap mesh_fi = run_3dphoto(device, inpaint_imgs, inpaint_depths, inputnames, outpath, fnExt, vid_ssaa, inpaint_vids) UnboundLocalError: local variable 'inpaint_imgs' referenced before assignment
Traceback (most recent call last): File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\routes.py", line 414, in run_predict output = await app.get_blocks().process_api( File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1326, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1229, in postprocess_data self.validate_outputs(fn_index, predictions) # type: ignore File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1204, in validate_outputs raise ValueError( ValueError: An event handler (f) didn't receive enough output values (needed: 5, received: 3). Wanted outputs: [gallery, textbox, model3d, html, html] Received outputs: [None, "", "
Time taken:
DepthMap v0.3.11 (ebf229bd) device: cpu Loading model weights from ./models/leres/res101.pth initialize network with normal loading the model from ./models/pix2pix\latest_net_G.pth Computing depthmap(s) .. 0%| | 0/1 [00:00<?, ?it/s]
wholeImage being processed in : 1344 Adjust factor is: 1.0 Selecting patches ... Target resolution: (2688, 1512, 3) Resulting depthmap resolution will be : (5760, 3240) patches to process: 5 processing patch 0 / 4 | [ 137 137 3086 3086] processing patch 1 / 4 | [ 137 857 3086 3086] processing patch 2 / 4 | [ 0 0 1920 1920] processing patch 3 / 4 | [ 0 720 1920 1920] processing patch 4 / 4 | [ 720 0 1920 1920] 0%| | 0/1 [00:40<?, ?it/s] Error completing request Arguments: (0, <PIL.Image.Image image mode=RGB size=3240x5760 at 0x173812ED780>, None, '', '', 1, 0, 512, 512, False, True, False, False, 0, 1, False, 1, True, True, False, False, ['left-right', 'red-cyan-anaglyph'], 2.5, 'polylines_sharp', 0, True, True, False, False, False, 'u2net', False, 0, 2, False, None, True, True, True, False) {} Traceback (most recent call last): File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f res = list(func(*args, **kwargs)) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\modules\call_queue.py", line 37, in f res = func(*args, **kwargs) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 1184, in run_generate outputs, mesh_fi, meshsimple_fi = run_depthmap( File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 666, 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\pieter\Downloads\stable-diffusion-webui-directml\modules\images.py", line 635, in save_image image = image.resize((round(image.width * opts.target_side_length / image.height), round(opts.target_side_length)), LANCZOS) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\PIL\Image.py", line 2193, in resize return self._new(self.im.resize(size, resample, box)) ValueError: image has wrong mode
Traceback (most recent call last): File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\routes.py", line 414, in run_predict output = await app.get_blocks().process_api( File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1326, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1229, in postprocess_data self.validate_outputs(fn_index, predictions) # type: ignore File "C:\Users\pieter\Downloads\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1204, in validate_outputs raise ValueError( ValueError: An event handler (f) didn't receive enough output values (needed: 5, received: 3). Wanted outputs: [gallery, textbox, model3d, html, html] Received outputs: [None, "", "
Time taken:
ValueError: image has wrong mode
see https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/241#issuecomment-1574171475
ValueError: image has wrong mode
see #241 (comment)
these are my settings
not working yet :/
Any plans on amd gpu support?