kabachuha / sd-webui-text2video

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

[TODO] Rename modelscope folder to something else to avoid collision with pip modelscope #211

Open sonicno1 opened 1 year ago

sonicno1 commented 1 year ago

Is there an existing issue for this?

Are you using the latest version of the extension?

What happened?

Error loading script: api_t2v.py and Error loading script: text2vid.py

Steps to reproduce the problem

When starting WebUI, an error is reported after loading the ROOP plugin

What should have happened?

texttovideo plugin to loaded

WebUI and Deforum extension Commit IDs

webui commit id - f865d3e11647dfd6c7b2cdf90dde24680e58acd8 txt2vid commit id -8f0af8c95a3c3a3af09c63cbdbdacc34b7a45f8d

Torch version

Version: torch-2.0.1+cu118

What GPU were you using for launching?

rtx2060 for mobile

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

Local PC setup (Windows)

Settings

windows 11

python 3.10.10

Console logs

Python 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]
Version: v1.4.1
Commit hash: f865d3e11647dfd6c7b2cdf90dde24680e58acd8
Installing requirements

[Auto-Photoshop-SD] Attempting auto-update...
[Auto-Photoshop-SD] switch branch to extension branch.
checkout_result: Your branch is up to date with 'origin/master'.

[Auto-Photoshop-SD] Current Branch.
branch_result: * master

[Auto-Photoshop-SD] Fetch upstream.
fetch_result:
[Auto-Photoshop-SD] Pull upstream.
pull_result: Already up to date.

[auto-sd-paint-ext] Commit hash: 00714355890aefa9a09e7fdb1f9a136c46a17618
[auto-sd-paint-ext] Auto-update disabled.

mediapipe for Batch Face Swap

Installing requirements for scikit_learn

current transparent-background 1.2.4

Infinite-Zoom imageio-ffmpeg

Checking roop requirements
Install insightface==0.7.3
Install onnx==1.14.0
Install onnxruntime==1.15.0
Install opencv-python==4.7.0.72

TemporalKit ffmpeg-python

Launching Web UI with arguments: --api --autolaunch --medvram --xformers --listen --enable-insecure-extension-access
python_server_full_path:  D:\SDWebUI\extensions\Auto-Photoshop-StableDiffusion-Plugin\server/python_server
Civitai Helper: Get Custom Model Folder
Civitai Helper: Load setting from: D:\SDWebUI\extensions\Stable-Diffusion-Webui-Civitai-Helper\setting.json
Civitai Helper: No setting file, use default
[-] ADetailer initialized. version: 23.6.2, num models: 11
[AddNet] Updating model hashes...
100%|████████████████████████████████████████████████████████████████████████████████| 61/61 [00:00<00:00, 7110.18it/s]
[AddNet] Updating model hashes...
100%|████████████████████████████████████████████████████████████████████████████████| 61/61 [00:00<00:00, 6949.30it/s]
dirname:  D:\SDWebUI\localizations
localizations:  {'zh-Hans (Stable)': 'D:\\SDWebUI\\localizations\\zh-Hans (Stable).json', 'zh-Hans (Testing)': 'D:\\SDWebUI\\localizations\\zh-Hans (Testing).json', 'zh_CN-xhox_20230615': 'D:\\SDWebUI\\localizations\\zh_CN-xhox_20230615.json', 'zh_CN_fix': 'D:\\SDWebUI\\localizations\\zh_CN_fix.json', 'zh_CN': 'D:\\SDWebUI\\extensions\\stable-diffusion-webui-localization-zh_CN\\localizations\\zh_CN.json'}
2023-07-19 18:03:34,873 - ControlNet - INFO - ControlNet v1.1.224
ControlNet preprocessor location: D:\SDWebUI\extensions\sd-webui-controlnet\annotator\downloads
2023-07-19 18:03:35,122 - ControlNet - INFO - ControlNet v1.1.224
Loading weights [fc2511737a] from D:\SDWebUI\models\Stable-diffusion\Chilloutmix-Ni-pruned-fp32-fix.safetensors
Creating model from config: D:\SDWebUI\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Couldn't find VAE named vae-ft-mse-840000-ema-pruned.ckpt; using None instead
Textual inversion embeddings loaded(24): AS-Young-neg, Asian-Less-Neg, bad-artist, bad-artist-anime, bad-hands-v4, bad-hands-v5, bad-image-v2-39000, bad-picture-chill-75v, bad_pictures, bad_prompt, bad_prompt_version2, charturnerv2, CyberRealistic_Negative-neg, EasyNegative, EasyNegativeV2, Fixhand, HyperStylizeV6, negative_hand-neg, ng_deepnegative_v1_75t, pureerosface_v1, rmadanegative402_sd15-neg, ulzzang-6500, ulzzang-6500-v1.1, verybadimagenegative_v1.3
Textual inversion embeddings skipped(4): 21charturnerv2, nartfixer, nfixer, nrealfixer
Model loaded in 6.0s (load weights from disk: 0.3s, create model: 0.5s, apply weights to model: 1.2s, apply half(): 1.1s, calculate empty prompt: 2.8s).
sd-webui-prompt-all-in-one background API service started successfully.
2023-07-19 18:03:42,892 - roop - INFO - roop v0.0.2
2023-07-19 18:03:42,895 - roop - INFO - roop v0.0.2
*** Error loading script: api_t2v.py
    Traceback (most recent call last):
      File "D:\SDWebUI\modules\scripts.py", line 274, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "D:\SDWebUI\modules\script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "D:\SDWebUI\extensions\sd-webui-text2video\scripts\api_t2v.py", line 39, in <module>
        from t2v_helpers.args import T2VArgs_sanity_check, T2VArgs, T2VOutputArgs
      File "D:\SDWebUI/extensions/sd-webui-text2video/scripts\t2v_helpers\args.py", line 7, in <module>
        from samplers.samplers_common import available_samplers
      File "D:\SDWebUI/extensions/sd-webui-text2video/scripts\samplers\samplers_common.py", line 3, in <module>
        from samplers.ddim.gaussian_sampler import GaussianDiffusion
      File "D:\SDWebUI/extensions/sd-webui-text2video/scripts\samplers\ddim\gaussian_sampler.py", line 2, in <module>
        from modelscope.t2v_model import _i
    ModuleNotFoundError: No module named 'modelscope.t2v_model'

---
*** Error loading script: text2vid.py
    Traceback (most recent call last):
      File "D:\SDWebUI\modules\scripts.py", line 274, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "D:\SDWebUI\modules\script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "D:\SDWebUI\extensions\sd-webui-text2video\scripts\text2vid.py", line 24, in <module>
        from t2v_helpers.render import run
      File "D:\SDWebUI/extensions/sd-webui-text2video/scripts\t2v_helpers\render.py", line 5, in <module>
        from modelscope.process_modelscope import process_modelscope
    ModuleNotFoundError: No module named 'modelscope.process_modelscope'

---
Applying attention optimization: xformers... done.
*Deforum ControlNet support: enabled*
Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 51.7s (import torch: 5.8s, import gradio: 1.5s, import ldm: 0.9s, other imports: 1.5s, load scripts: 20.8s, create ui: 19.9s, gradio launch: 0.8s, add APIs: 0.2s).
preload_extensions_git_metadata for 69 extensions took 21.98s

Additional information

No response

sonicno1 commented 1 year ago

"t2v_interface/Model/visible": true, "t2v_interface/Model/value": "", "t2v_interface/Sampling method (ModelScope)/visible": true, "t2v_interface/Sampling method (ModelScope)/value": "DDIM_Gaussian", "t2v_interface/ETA (DDIM Only)/visible": true, "t2v_interface/ETA (DDIM Only)/value": 0.0, "t2v_interface/Available Models/visible": true, "t2v_interface/Available Models/value": [], "t2v_interface/LoRA Weight/visible": true, "t2v_interface/LoRA Weight/value": 1, "t2v_interface/LoRA Weight/minimum": 0, "t2v_interface/LoRA Weight/maximum": 1, "t2v_interface/LoRA Weight/step": 0.05, "t2v_interface/Refresh Models/visible": true, "t2v_interface/Enable Bias/visible": true, "t2v_interface/Enable Bias/value": true, "t2v_interface/Enable Linears/visible": true, "t2v_interface/Enable Linears/value": true, "t2v_interface/Enable Convolutions/visible": true, "t2v_interface/Enable Convolutions/value": true, "t2v_interface/Enable Embeddings/visible": true, "t2v_interface/Enable Embeddings/value": true, "t2v_interface/Enable Time/visible": true, "t2v_interface/Enable Time/value": true, "t2v_interface/Alpha Multiplier/visible": true, "t2v_interface/Alpha Multiplier/value": 1.0, "t2v_interface/cfg_scale/visible": true, "t2v_interface/cfg_scale/value": 12.5, "t2v_interface/cfg_scale/minimum": 1, "t2v_interface/cfg_scale/maximum": 100, "t2v_interface/cfg_scale/step": 1, "t2v_interface/frames/visible": true, "t2v_interface/frames/value": 24, "t2v_interface/frames/minimum": 2, "t2v_interface/frames/maximum": 125, "t2v_interface/frames/step": 1, "t2v_interface/Seed/minimum": -1, "t2v_interface/Seed/maximum": 1000000, "t2v_interface/Seed/step": 1, "t2v_interface/width/visible": true, "t2v_interface/width/value": 256, "t2v_interface/width/minimum": 64, "t2v_interface/width/maximum": 1024, "t2v_interface/width/step": 64, "t2v_interface/height/visible": true, "t2v_interface/height/value": 256, "t2v_interface/height/minimum": 64, "t2v_interface/height/maximum": 1024, "t2v_interface/height/step": 64, "t2v_interface/eta/visible": true, "t2v_interface/eta/value": 0.0, "t2v_interface/VAE Mode/visible": true, "t2v_interface/VAE Mode/value": "GPU (half precision)"

sonicno1 commented 1 year ago

I only installed the texttovideo plugin and it still doesn't work, And I also emptied the configuration file, it still reports an error.

howardgriffin commented 12 months ago

Same problem, how to resolve it ?

howardgriffin commented 12 months ago

I run 'pip uninstall modelscope', it works well.

sonicno1 commented 12 months ago

uninstall modelscope

jasoncow007 commented 11 months ago

but if I want to keep modelscope for a reason, how to resolve this?

kabachuha commented 11 months ago

👀

Alright, I'll just rename it to resolve the collision

chozzz commented 6 months ago

As per @howardgriffin said, uninstalling modelscope from pip works for me. It turns out that text2video is trying to import modelscope from its own internal directory, since the name is ambiguous with pip package, it failed.