kabachuha / sd-webui-text2video

Auto1111 extension implementing text2video diffusion models (like ModelScope or VideoCrafter) using only Auto1111 webui dependencies
Other
1.28k stars 106 forks source link

[Bug]: Exception occurred: can't delete attribute 'sd_model' #156

Closed sanatorios closed 1 year ago

sanatorios commented 1 year ago

Is there an existing issue for this?

Are you using the latest version of the extension?

What happened?

Today I tried to set up the text2video model but it's having this bug in the cmd: AttributeError: can't delete attribute 'sd_model' Exception occurred: can't delete attribute 'sd_model'.

FULL LOG: Already up to date. venv "C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui\venv\Scripts\Python.exe" Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] Version: v1.2.1 Commit hash: 89f9faa63388756314e8a1d96cf86bf5e0663045 Installing requirements

Installing requirements 1 for Infinite-Zoom

Installing imageio-ffmpeg requirement for depthmap script Installing pyqt5 requirement for depthmap script

Launching Web UI with arguments: --xformers [AddNet] Updating model hashes... 100%|████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 8253.80it/s] [AddNet] Updating model hashes... 100%|███████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 12003.73it/s] ControlNet v1.1.166 ControlNet v1.1.166 Loading weights [4711ff4dd2] from C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui\models\Stable-diffusion\v2-1_768-nonema-pruned.ckpt Deforum ControlNet support: enabled Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch(). Startup time: 22.8s (import torch: 8.5s, import gradio: 1.9s, import ldm: 0.9s, other imports: 2.1s, list SD models: 0.2s, setup codeformer: 0.2s, load scripts: 6.2s, create ui: 2.6s, gradio launch: 0.2s). Creating model from config: C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\configs\stable-diffusion\v2-inference-v.yaml LatentDiffusion: Running in v-prediction mode DiffusionWrapper has 865.91 M params. Applying xformers cross attention optimization. Textual inversion embeddings loaded(1): glitch Model loaded in 18.5s (load weights from disk: 11.4s, find config: 1.0s, create model: 0.2s, apply weights to model: 0.6s, apply half(): 0.6s, move model to device: 1.3s, load textual inversion embeddings: 3.4s). text2video — The model selected is: ModelScope text2video extension for auto1111 webui Git commit: 26822483 (Thu May 4 18:26:12 2023) Traceback (most recent call last): File "C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui/extensions/sd-webui-text2video/scripts\t2v_helpers\render.py", line 24, in run vids_pack = process_modelscope(args_dict) File "C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui/extensions/sd-webui-text2video/scripts\modelscope\process_modelscope.py", line 45, in process_modelscope del shared.sd_model AttributeError: can't delete attribute 'sd_model' Exception occurred: can't delete attribute 'sd_model'

Steps to reproduce the problem

1.Go to Automatic webui1111

  1. Press Generate on text2video extension ...

What should have happened?

It shoud generate a video. No issues encountered previously as today.

FULL LOG: Already up to date. venv "C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui\venv\Scripts\Python.exe" Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] Version: v1.2.1 Commit hash: 89f9faa63388756314e8a1d96cf86bf5e0663045 Installing requirements

Installing requirements 1 for Infinite-Zoom

Installing imageio-ffmpeg requirement for depthmap script Installing pyqt5 requirement for depthmap script

Launching Web UI with arguments: --xformers [AddNet] Updating model hashes... 100%|████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 8253.80it/s] [AddNet] Updating model hashes... 100%|███████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 12003.73it/s] ControlNet v1.1.166 ControlNet v1.1.166 Loading weights [4711ff4dd2] from C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui\models\Stable-diffusion\v2-1_768-nonema-pruned.ckpt Deforum ControlNet support: enabled Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch(). Startup time: 22.8s (import torch: 8.5s, import gradio: 1.9s, import ldm: 0.9s, other imports: 2.1s, list SD models: 0.2s, setup codeformer: 0.2s, load scripts: 6.2s, create ui: 2.6s, gradio launch: 0.2s). Creating model from config: C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\configs\stable-diffusion\v2-inference-v.yaml LatentDiffusion: Running in v-prediction mode DiffusionWrapper has 865.91 M params. Applying xformers cross attention optimization. Textual inversion embeddings loaded(1): glitch Model loaded in 18.5s (load weights from disk: 11.4s, find config: 1.0s, create model: 0.2s, apply weights to model: 0.6s, apply half(): 0.6s, move model to device: 1.3s, load textual inversion embeddings: 3.4s). text2video — The model selected is: ModelScope text2video extension for auto1111 webui Git commit: 26822483 (Thu May 4 18:26:12 2023) Traceback (most recent call last): File "C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui/extensions/sd-webui-text2video/scripts\t2v_helpers\render.py", line 24, in run vids_pack = process_modelscope(args_dict) File "C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui/extensions/sd-webui-text2video/scripts\modelscope\process_modelscope.py", line 45, in process_modelscope del shared.sd_model AttributeError: can't delete attribute 'sd_model' Exception occurred: can't delete attribute 'sd_model'

WebUI and Deforum extension Commit IDs

webui commit id - 89f9faa63388756314e8a1d96cf86bf5e0663045 txt2vid commit id - 26822483

Torch version

torch: 2.0.1+cu118  

What GPU were you using for launching?

2080TI

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

Local PC setup (Windows)

Settings

settings: Image 2247

Console logs

FULL LOG: 
Already up to date.
venv "C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)]
Version: v1.2.1
Commit hash: 89f9faa63388756314e8a1d96cf86bf5e0663045
Installing requirements

Installing requirements 1 for Infinite-Zoom

Installing imageio-ffmpeg requirement for depthmap script
Installing pyqt5 requirement for depthmap script

Launching Web UI with arguments: --xformers
[AddNet] Updating model hashes...
100%|████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 8253.80it/s]
[AddNet] Updating model hashes...
100%|███████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 12003.73it/s]
ControlNet v1.1.166
ControlNet v1.1.166
Loading weights [4711ff4dd2] from C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui\models\Stable-diffusion\v2-1_768-nonema-pruned.ckpt
*Deforum ControlNet support: enabled*
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 22.8s (import torch: 8.5s, import gradio: 1.9s, import ldm: 0.9s, other imports: 2.1s, list SD models: 0.2s, setup codeformer: 0.2s, load scripts: 6.2s, create ui: 2.6s, gradio launch: 0.2s).
Creating model from config: C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\configs\stable-diffusion\v2-inference-v.yaml
LatentDiffusion: Running in v-prediction mode
DiffusionWrapper has 865.91 M params.
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(1): glitch
Model loaded in 18.5s (load weights from disk: 11.4s, find config: 1.0s, create model: 0.2s, apply weights to model: 0.6s, apply half(): 0.6s, move model to device: 1.3s, load textual inversion embeddings: 3.4s).
text2video — The model selected is:  ModelScope
 text2video extension for auto1111 webui
Git commit: 26822483 (Thu May  4 18:26:12 2023)
Traceback (most recent call last):
  File "C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui/extensions/sd-webui-text2video/scripts\t2v_helpers\render.py", line 24, in run
    vids_pack = process_modelscope(args_dict)
  File "C:\Users\Dario\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui/extensions/sd-webui-text2video/scripts\modelscope\process_modelscope.py", line 45, in process_modelscope
    del shared.sd_model
AttributeError: can't delete attribute 'sd_model'
Exception occurred: can't delete attribute 'sd_model'

Additional information

Not sure about what happened.

github-actions[bot] commented 1 year ago

This issue has been closed due to incorrect formatting. Please address the following mistakes and reopen the issue:

kabachuha commented 1 year ago

@sanatorios sorry for the bot 😬

kabachuha commented 1 year ago

The webui updated and the logs format changed a bit. Should be fixed now

github-actions[bot] commented 1 year ago

Thanks for addressing your formatting mistakes. The issue has been reopened now.

beepbeepplop commented 1 year ago

have this too

sanatorios commented 1 year ago

sorry, it's giving:

text2video extension for auto1111 webui Git commit: 2a7b60d6 (Sun May 14 16:36:00 2023) Traceback (most recent call last): File "C:\Users\s\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui/extensions/sd-webui-text2video/scripts\t2v_helpers\render.py", line 24, in run vids_pack = process_modelscope(args_dict) File "C:\Users\s\Desktop\WEBUI_STABLEDFFF\AI\stable-diffusion-webui/extensions/sd-webui-text2video/scripts\modelscope\process_modelscope.py", line 45, in process_modelscope del shared.sd_model AttributeError: can't delete attribute 'sd_model' Exception occurred: can't delete attribute 'sd_model'

thank you so much for the quickness!

nabelekm commented 1 year ago

Just delete the line: del shared.sd_model from \process_modelscope.py

sanatorios commented 1 year ago

thanks, I appreciate it. working now

RONNYKHALIL commented 1 year ago

Just delete the line: del shared.sd_model from \process_modelscope.py

thanks, this did the trick for me at least

Iskarioto commented 1 year ago

Just delete the line: del shared.sd_model from \process_modelscope.py

Thank you so much, Its working now

andyoulovexy commented 1 year ago

Just delete the line: del shared.sd_model from \process_modelscope.py

still not work