thygate / stable-diffusion-webui-depthmap-script

High Resolution Depth Maps for Stable Diffusion WebUI
MIT License
1.72k stars 159 forks source link

AttributeError: 'str' object has no attribute 'df' && Eventhandler (needed: 4, received: 3) #308

Closed 0x1pikachu closed 1 year ago

0x1pikachu commented 1 year ago

Hello guys,

I am getting this error returned when trying to generate a depthmap. Is there anything I can do to fix the issue locally, or do you know what it might be?

Thank you for all the work you're doing!

Applying attention optimization: Doggettx... done. Textual inversion embeddings loaded(0): Model loaded in 5.9s (load weights from disk: 1.7s, create model: 1.0s, apply weights to model: 1.4s, apply half(): 0.5s, load VAE: 0.2s, move model to device: 0.8s). Error completing request Arguments: (True, False, 0, 1, 'CPU', False, None, '', '', True, <PIL.Image.Image image mode=RGB size=512x512 at 0x18720AAAF20>, '0', True, False, False, False, False, False, False, None, 1, 512, False, 512, False, False, 3, False, 3, True, 3, False, 'Horizontal', False, False, 'u2net', False, True, True, False, 0, 2.5, 'polylines_sharp', ['left-right', 'red-cyan-anaglyph'], 0, '∯boost∯clipdepth∯clipdepth_far∯clipdepth_near∯compute_device∯custom_depthmap∯custom_depthmap_img∯depthmap_batch_input_dir∯depthmap_batch_output_dir∯depthmap_batch_reuse∯depthmap_input_image∯depthmap_mode∯do_output_depth∯gen_inpainted_mesh∯gen_inpainted_mesh_demos∯gen_normalmap∯gen_rembg∯gen_simple_mesh∯gen_stereo∯image_batch∯model_type∯net_height∯net_size_match∯net_width∯normalmap_invert∯normalmap_post_blur∯normalmap_post_blur_kernel∯normalmap_pre_blur∯normalmap_pre_blur_kernel∯normalmap_sobel∯normalmap_sobel_kernel∯output_depth_combine∯output_depth_combine_axis∯output_depth_invert∯pre_depth_background_removal∯rembg_model∯save_background_removal_masks∯save_outputs∯simple_mesh_occlude∯simple_mesh_spherical∯stereo_balance∯stereo_divergence∯stereo_fill_algo∯stereo_modes∯stereo_separation') {} Traceback (most recent call last): File "E:\AI-Art\SD\stable-diffusion-webui\modules\call_queue.py", line 55, in f res = list(func(*args, *kwargs)) File "E:\AI-Art\SD\stable-diffusion-webui\modules\call_queue.py", line 35, in f res = func(args, **kwargs) File "E:\AI-Art\SD\stable-diffusion-webui\extensions\stable-diffusion-webui-depthmap-script\src\common_ui.py", line 473, in run_generate outputs, fn_mesh, display_mesh = core_generation_funnel(outpath, inputimages, inputdepthmaps, inputnames, inputs, backbone.gather_ops()) File "E:\AI-Art\SD\stable-diffusion-webui\extensions\stable-diffusion-webui-depthmap-script\src\core.py", line 74, in core_generation_funnel inp = CoreGenerationFunnelInp(inp) File "E:\AI-Art\SD\stable-diffusion-webui\extensions\stable-diffusion-webui-depthmap-script\src\core.py", line 56, in init self.values[name] = values[name] if name in values else name.df AttributeError: 'str' object has no attribute 'df'

Traceback (most recent call last): File "E:\AI-Art\SD\VENV_DIR\lib\site-packages\gradio\routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "E:\AI-Art\SD\VENV_DIR\lib\site-packages\gradio\blocks.py", line 1326, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "E:\AI-Art\SD\VENV_DIR\lib\site-packages\gradio\blocks.py", line 1229, in postprocess_data self.validate_outputs(fn_index, predictions) # type: ignore File "E:\AI-Art\SD\VENV_DIR\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: 4, received: 3). Wanted outputs: [gallery, textbox, model3d, html] Received outputs: [None, "", "

AttributeError: 'str' object has no attribute 'df'

Time taken: 0.00s

Torch active/reserved: 2076/2086 MiB, Sys VRAM: 4448/24576 MiB (18.1%)

"]

graemeniedermayer commented 1 year ago

Edit: This appears to be fixed now.

This is the same as https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/307

This should be fixed quickly.

if you need an immediate solution, you can use git to checkout an older commit in your extensions folder /extensions/stable-diffusion-webui-depthmap-script. This would look something like,

git checkout 381536d00295d276c809c0078daf0a651978215e

and then later when a fix is implemented use

git checkout main


Quick fix would be removing the last ".df" on line 56 of core.py

semjon00 commented 1 year ago

Sorry, my bad. Fixed now - please upgrade.