deforum-art / sd-webui-deforum

Deforum extension for AUTOMATIC1111's Stable Diffusion webui
https://deforum.github.io
Other
2.71k stars 390 forks source link

[Bug]:MacOs 3D Deforum Error #686

Open telkinof opened 1 year ago

telkinof commented 1 year ago

Have you read the latest version of the FAQ?

Is there an existing issue for this?

Are you using the latest version of the Deforum extension?

What happened?

when i want to use deforum in 3D mode it gave me this error

User friendly error message: Error: 'NoneType' object has no attribute 'min'. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of .

This message appears with different models during 3D amination mode rendering, no matter txt2txt or img2txt or Init.

im using : M2 MAX Version 13.3.1 Ventura

Steps to reproduce the problem

1- Go to Deforum 2- Press 3D ... it gives the error after first frame

What should have happened?

No response

WebUI and Deforum extension Commit IDs

webui commit id - deforum exten commit id - (commit: 5ab7f213)commit: 5ab7f213

Torch version

python: 3.10.11  •  torch: 2.0.0

On which platform are you launching the webui with the extension?

Local PC setup (Mac)

Deforum settings

https://gist.github.com/telkinof/1405b5c54156074823a800457735bc66

Webui core settings

https://gist.github.com/telkinof/fcf499a71fe17f5586c73b50d7b3f410

Console logs

Last login: Sun May  7 06:18:46 on ttys001
avmac@Amins-MacBook-Pro ~ % cd stable-diffusion-webui 
avmac@Amins-MacBook-Pro stable-diffusion-webui % ./webui.sh 

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on avmac user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.10.11 (main, Apr  7 2023, 07:24:53) [Clang 14.0.0 (clang-1400.0.29.202)]
Commit hash: 5ab7f213bec2f816f9c5644becb32eb72c8ffb89
Installing requirements

Launching Web UI with arguments: --skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
No module 'xformers'. Proceeding without it.
Loading weights [6ce0161689] from /Users/avmac/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors
Creating model from config: /Users/avmac/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying cross attention optimization (InvokeAI).
Textual inversion embeddings loaded(0): 
Model loaded in 2.9s (load weights from disk: 0.2s, create model: 0.6s, apply weights to model: 1.5s, apply half(): 0.2s, move model to device: 0.4s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 5.6s (import torch: 0.7s, import gradio: 0.7s, import ldm: 0.2s, other imports: 0.4s, load scripts: 0.3s, load SD checkpoint: 2.9s, create ui: 0.3s).
Deforum extension for auto1111 webui, v2.4b
Git commit: b0513bac (Sat May  6 23:50:08 2023)
Saving animation frames to:
/Users/avmac/stable-diffusion-webui/outputs/img2img-images/Deforum_20230507062940
Loading MiDaS model from dpt_large-midas-2f21e586.pt...
Animation frame: 0/120  
Seed: 4256122815
Prompt: tiny cute swamp bunny, highly detailed, intricate, ultra hd, sharp photo, crepuscular rays, in focus, by tomasz alen kopera
Neg Prompt: nsfw, nude
Not using an init image (doing pure txt2img)
╭─────┬───┬───────┬────┬────┬────┬────┬────┬────╮
│Steps│CFG│Denoise│Tr X│Tr Y│Tr Z│Ro X│Ro Y│Ro Z│
├─────┼───┼───────┼────┼────┼────┼────┼────┼────┤
│ 25  │7.0│ None  │ 0  │ 0  │1.75│ 0  │ 0  │ 0  │
╰─────┴───┴───────┴────┴────┴────┴────┴────┴────╯
100%|███████████████████████████████████████████| 25/25 [00:08<00:00,  3.06it/s]
Animation frame: 2/120                         | 25/556 [00:06<02:30,  3.52it/s]
Creating in-between cadence frame: 0; tween:0.50;

*START OF TRACEBACK*
Traceback (most recent call last):
  File "/Users/avmac/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum.py", line 111, in run_deforum
    render_animation(args, anim_args, video_args, parseq_args, loop_args, controlnet_args, root.animation_prompts, root)
  File "/Users/avmac/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/render.py", line 295, in render_animation
    depth = depth_model.predict(turbo_next_image, anim_args.midas_weight, root.half_precision)
  File "/Users/avmac/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/depth.py", line 91, in predict
    depth_tensor = self.midas_depth.predict(prev_img_cv2, half_precision)
  File "/Users/avmac/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/depth_midas.py", line 62, in predict
    midas_depth = torch.nn.functional.interpolate(
  File "/Users/avmac/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/functional.py", line 3967, in interpolate
    return torch._C._nn.upsample_bicubic2d(input, output_size, align_corners, scale_factors)
RuntimeError: "compute_indices_weights_cubic" not implemented for 'Half'
*END OF TRACEBACK*

User friendly error message:
Error: "compute_indices_weights_cubic" not implemented for 'Half'. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of \.
Deforum progress:   4%|█                       | 25/556 [00:07<02:41,  3.28it/s]

Additional information

No response

gndqb commented 1 year ago

I get exactly same error after disabling "Use depth warping". Error: ''NoneType' object has no attribute 'min''. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of . Full error message is in your terminal/ cli. Is it related?

narimangafurov commented 1 year ago

have some problem(

nabzahsan commented 1 year ago

it was working just fine yesterday, something happened today I don't understand why

hithereai commented 1 year ago

Try adding --no-half and --precision full cmd args.

ringtmc commented 1 year ago

Same problem either. Use depth warping just keep processing

hithereai commented 1 year ago

We don't officially support deforum on Macs guys. This is an old issue, lots of mac-related issues were closed because we don't have a single mac to test on (and we're not getting a single dime from deforum either).

Try adding --no-half and --precision full cmd args. It's the most you'd get I'm afraid. For now.

jackylu97 commented 1 year ago

I'm getting the same thing on linux after disabling "Use depth warping". Is that expected behavior?

sidbnoida commented 1 year ago

5ab7f213

isn't working even with --no-half --precision-full in mac m1 pro. same error keeps on coming.

sidbnoida commented 1 year ago

Same problem either. Use depth warping just keep processing

is it working with depth warping?

ringtmc commented 1 year ago

Same problem either. Use depth warping just keep processing

is it working with depth warping?

no, but it's Back to normal as I reinstalled webui and deforum extension as well as the vae 3d needs. after a few hours of working well, i quit webui and reopened it. turned on 3d. The depth and fov schedule tab shows processing endlessly..it seems qork pretty well. haha I use win version btw. See this for more help: https://github.com/deforum-art/sd-webui-deforum/wiki/FAQ-&-Troubleshooting

narimangafurov commented 1 year ago

im have macOS Ventura macStudio m1 Ultra, as I understood the problem with default Depth Algorithm, after change to Zoe+Adabins (old) all working.

narimangafurov commented 1 year ago

We don't officially support deforum on Macs guys. This is an old issue, lots of mac-related issues were closed because we don't have a single mac to test on (and we're not getting a single dime from deforum either).

Try adding --no-half and --precision full cmd args. It's the most you'd get I'm afraid. For now.

thanks for the advice. I'll try this

Sp4Rx commented 1 year ago

im have macOS Ventura macStudio m1 Ultra, as I understood the problem with default Depth Algorithm, after change to Zoe+Adabins (old) all working.

Thanks @narimangafurov after changing the depth algorithm it's working. But the image generation takes too much time I have mac book pro m2 chip 2023 model, can anyone help with this?

gndqb commented 1 year ago

But the image generation takes too much time I have mac book pro m2 chip 2023 model, can anyone help with this?

You will need better graphic card to speed up.

FrancisBourre commented 1 year ago

im have macOS Ventura macStudio m1 Ultra, as I understood the problem with default Depth Algorithm, after change to Zoe+Adabins (old) all working.

Thanks @narimangafurov after changing the depth algorithm it's working. But the image generation takes too much time I have mac book pro m2 chip 2023 model, can anyone help with this?

AdaBins is working on M1/M2 and is not slow.

FrancisBourre commented 1 year ago

But the image generation takes too much time I have mac book pro m2 chip 2023 model, can anyone help with this?

You will need better graphic card to speed up.

What do you mean? The GPU is embedded with the CPU on M1/M2 architecture, and there's no way to use an external GPU.

paradis513 commented 1 year ago

im have macOS Ventura macStudio m1 Ultra, as I understood the problem with default Depth Algorithm, after change to Zoe+Adabins (old) all working.

i got same problem, may i know how to change to zoe+adabins?

natedenton commented 1 year ago

I am having exactly the same issue, made all the more annoying by the fact that before I went away a couple of days ago my Mac studio was smashing out 3D without missing a beat on the original settings. I then had that strange freeze and eternal processing and when I have changed the settings to the old ZOe : I know get this Error: 'OpenCV(4.7.0) /Users/xperience/GHA-OCV-Python/_work/opencv-python/opencv-python/opencv/modules/core/src/arithm.cpp:650: error: (-209:Sizes of input arguments do not match) The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array' in function 'arithm_op' '. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of . Full error message is in your terminal/ cli. Totally gutted and just can't understand why it has stopped working ;(

natedenton commented 1 year ago

Try adding --no-half and --precision full cmd args.

Hey how do you add those CMD's please!

narimangafurov commented 1 year ago

Try adding --no-half and --precision full cmd args.

Hey how do you add those CMD's please!

use when runing SD command ./webui.sh --precision full --no-half

reyson commented 1 year ago

It worked after I edited webui_user.sh and added : export COMMANDLINE_ARGS="--skip-torch-cuda-test --use-cpu all --no-half-vae --use-cpu interrogate"