CiaraStrawberry / TemporalKit

An all in one solution for adding Temporal Stability to a Stable Diffusion Render via an automatic1111 extension
GNU General Public License v3.0
1.92k stars 125 forks source link

*** Error loading script: sd-TemporalKit-UI.py Traceback (most recent call last): #93

Open maryannelizabethcooper opened 1 year ago

maryannelizabethcooper commented 1 year ago

Installing requirements for TemporalKit extension Launching Web UI with arguments: --xformers --deepdanbooru --autolaunch --no-half-vae *** Error loading script: sd-TemporalKit-UI.py Traceback (most recent call last): File "C:\stable-diffusion-webui\modules\scripts.py", line 382, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "C:\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\stable-diffusion-webui\extensions\TemporalKit\scripts\sd-TemporalKit-UI.py", line 23, in from modules.ui import create_toprow, create_sampler_and_steps_selection ImportError: cannot import name 'create_toprow' from 'modules.ui' (C:\stable-diffusion-webui\modules\ui.py)

I used temporalkit really well, but last night suddenly stoppped.... and then I restarted SD webUI but I got this message... Please Please help me.....

UriahKong commented 1 year ago

这是更新了1.60版本后好多插件都用不了,要等作者修复就行

CrisisBomberman commented 1 year ago

I'm having the same issue, it just needs to be updated for latest automatic 1111

scooller commented 1 year ago

Same here version: v1.6.0  •  python: 3.10.11  •  torch: 2.0.1+cu118  •  xformers: 0.0.20

naduarte2 commented 1 year ago

Same error here after updating from SD Web UI v1.5.2 to 1.6.0.

My way of solving the issue "temporarily" was to install a second SD WebUI with symlinks. Now I have 2 WebUI, 1 updated (v1.6.0) without TemporalKit, and 1 outdated (v1.5.2) with TemporalKit working.

If you want to do the same I did, the steps were:

  1. Download and extract https://github.com/AUTOMATIC1111/stable-diffusion-webui/archive/refs/tags/v1.5.2.zip
  2. Copy/Paste "./extensions/" folder from v1.6.0 to v1.5.2. (to avoid unwanted updates and to have a stable v1.5.2)
  3. Edit webui-user.bat with your paths and configs with venv empty, save it, and Run it.
    set PYTHON=D:\Python\Python3.10.6150.1013\python.exe
    set GIT=C:\Program Files\Git\cmd\git.exe
    set VENV_DIR=
    set COMMANDLINE_ARGS=--autolaunch --xformers --lowvram --opt-sdp-no-mem-attention --opt-split-attention --no-half-vae --theme dark
  4. If everything opened smoothly in v1.5.2, close both the WebUI and CMD.
  5. Delete folders of SD WebUI v1.5.2: ".\embeddings\" , ".\models\" and ".outputs\"
  6. Open CMD as Administrator and create the symlinks to the SD v1.6.0 folders that contains all your downloaded embeddings, models and outputs (to avoid copy/paste, re-download or messing things) with:
    mklink /D "D:\A1111 Web UI Autoinstaller\stable-diffusion-webui-1.5.2\embeddings" "D:\A1111 Web UI Autoinstaller\stable-diffusion-webui\embeddings" 
    mklink /D "D:\A1111 Web UI Autoinstaller\stable-diffusion-webui-1.5.2\models" "D:\A1111 Web UI Autoinstaller\stable-diffusion-webui\models" 
    mklink /D "D:\A1111 Web UI Autoinstaller\stable-diffusion-webui-1.5.2\outputs" "D:\A1111 Web UI Autoinstaller\stable-diffusion-webui\outputs" 
  7. Create a desktop link to v1.5.2\webui-user.bat to open your new v1.5.2 without TemporalKit errors.
  8. You can delete the SDv1.5.2 folder when TemporalKit is fixed to work with v1.6.0.

Obviously you can avoid all of this just making a restore from the WebUI extensions tab. That way you will go back to a previous backup using your own WebUI, but in my case, some extensions were updated and working fine with v1.6.0 and only a few extensions were having issues, so I prefered to have 2 webUIs to avoid any kind of compatibility error, one with all updated (UI+ext) and the other outdated but working as usual (until all the extensions were successfully working with 1.6.0).

Criswa7 commented 1 year ago

I had the same issue with File "C:\Users\crist\AppData\Local\Programs\Python\Python311\Lib\importlibinit.py", line 126, in import_module return _bootstrap.gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\crist\Documents\GEN_IMG\stable-diffusion-webui\venv\Lib\site-packages\huggingface_hub\hf_api.py", line 35, in from huggingface_hub.utils import ( File "C:\Users\crist\Documents\GEN_IMG\stable-diffusion-webui\venv\Lib\site-packages\huggingface_hub\utils_init.py", line 18, in from . import tqdm as _tqdm # _tqdm is the module ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\crist\Documents\GEN_IMG\stable-diffusion-webui\venv\Lib\site-packages\huggingface_hub\utils\tqdm.py", line 63, in from tqdm.auto import tqdm as old_tqdm ModuleNotFoundError: No module named 'tqdm.auto' What I did was delete TemporalKit from the extensions folder and then I deleted the venv folder (it's the virtual environment). Then I ran webui-user again to reinstall everything necessary and now it works.

Alan-Cao-ShengJin commented 5 months ago

change create_toprow by Toprow in line 23 of extensions\TemporalKit\scripts\sd-TemporalKit-UI.py

from modules.ui import create_toprow, create_sampler_and_steps_selection to from modules.ui import Toprow, create_sampler_and_steps_selection

and then copy this function in modules/ui.py

def create_sampler_and_steps_selection(choices, tabname):
    return scripts.scripts_txt2img.script('Sampler').steps, scripts.scripts_txt2img.script('Sampler').sampler_name
lavibeats commented 3 months ago

I have done what was written here but still not working:

*** Error loading script: sd-TemporalKit-UI.py Traceback (most recent call last): File "F:\STABLE-DIFFUSION-COMFYUI\webui\modules\scripts.py", line 508, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "F:\STABLE-DIFFUSION-COMFYUI\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "F:\STABLE-DIFFUSION-COMFYUI\webui\extensions\TemporalKit\scripts\sd-TemporalKit-UI.py", line 23, in from modules.ui import Toprow, create_sampler_and_steps_selection ImportError: cannot import name 'Toprow' from 'modules.ui' (F:\STABLE-DIFFUSION-COMFYUI\webui\modules\ui.py)

version: [v1.9.3]  •  python: 3.10.11  •  torch: 2.1.2+cu121  •  xformers: N/A  •  gradio: 3.41.2  •  checkpoint: [ea1b665634]