sd-webui 文档中的包没提供,跑起来有问题(stable_diffusion 是能正常跑的)
收藏回复举报
sd-webui 文档中的包没提供,跑起来有问题(stable_diffusion 是能正常跑的)
t('forum.solved') 已解决
新人帖
发表于2024-11-27 11:24:37
0 查看

stable_diffusion 是能正常跑的, sd-webui安装时参考 https://gitee.com/ascend/ModelZoo-PyTorch/blob/master/MindIE/MindIE-Torch/built-in/foundation/sd-webui/mindietorch_extension/README.md,官网没找到以下 mindietorch-xxx.whl的包

%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20241127111935.png

其他步骤按文档进行,运行报错。以下是启动到报错的log

  

root@pc:/home/zero/Downloads/weights/stable-diffusion-webui# python3 launch.py --skip-torch-cuda-test --enable-insecure-extension-access --listen --log-startup --disable-safe-unpickle --no-half --skip-prepare-environment 

initial startup: done in 0.010s 

  prepare environment: 

Launching Web UI with arguments: --skip-torch-cuda-test --enable-insecure-extension-access --listen --log-startup --disable-safe-unpickle --no-half --skip-prepare-environment 

launcher: done in 0.001s 

import torch: done in 1.426s 

import torch: done in 1.936s 

import gradio: done in 0.855s 

setup paths: done in 0.666s 

import ldm: done in 0.003s 

import sgm: done in 0.000s 

No module 'xformers'. Proceeding without it. 

Warning: caught exception 'Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx', memory monitor disabled 

initialize shared: done in 0.803s 

other imports: done in 0.432s 

============================================================================== 

You are running torch 2.1.0+cu121. 

The program is tested to work with torch 2.1.2. 

To reinstall the desired version, run with commandline flag --reinstall-torch. 

Beware that this will cause a lot of large files to be downloaded, as well as 

there are reports of issues with training tab on the latest version. 

 

Use --skip-version-check commandline argument to disable this check. 

============================================================================== 

opts onchange: done in 0.000s 

setup SD model: done in 0.000s 

setup codeformer: done in 0.001s 

setup gfpgan: done in 0.006s 

set samplers: done in 0.000s 

list extensions: done in 0.001s 

restore config state file: done in 0.000s 

list SD models: done in 0.019s 

list localizations: done in 0.000s 

  load scripts: 

  custom_code.py: done in 0.001s 

  img2imgalt.py: done in 0.000s 

  loopback.py: done in 0.000s 

  outpainting_mk_2.py: done in 0.000s 

  poor_mans_outpainting.py: done in 0.000s 

  postprocessing_codeformer.py: done in 0.000s 

  postprocessing_gfpgan.py: done in 0.000s 

  postprocessing_upscale.py: done in 0.000s 

  prompt_matrix.py: done in 0.000s 

  prompts_from_file.py: done in 0.000s 

  sd_upscale.py: done in 0.000s 

  xyz_grid.py: done in 0.002s 

  ldsr_model.py: done in 0.246s 

  lora_script.py: done in 4.583s 

  scunet_model.py: done in 0.276s 

  swinir_model.py: done in 0.081s 

  hotkey_config.py: done in 0.000s 

  extra_options_section.py: done in 0.000s 

  hypertile_script.py: done in 0.162s 

  postprocessing_autosized_crop.py: done in 0.000s 

  postprocessing_caption.py: done in 0.000s 

  postprocessing_create_flipped_copies.py: done in 0.000s 

  postprocessing_focal_crop.py: done in 0.002s 

  postprocessing_split_oversized.py: done in 0.000s 

  soft_inpainting.py: done in 0.000s 

  mindie_plugin.py: done in 0.437s 

  comments.py: done in 0.111s 

  refiner.py: done in 0.000s 

  sampler.py: done in 0.000s 

  seed.py: done in 0.000s 

load upscalers: done in 0.003s 

refresh VAE: done in 0.002s 

refresh textual inversion templates: done in 0.000s 

scripts list_optimizers: done in 0.001s 

scripts list_unets: done in 0.000s 

reload hypernetworks: done in 0.001s 

Loading weights [6ce0161689] from /home/zero/Downloads/weights/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors 

initialize extra networks: done in 0.013s 

scripts before_ui_callback: done in 0.004s 

2024-11-27 11:21:46,154 INFO: import MindIEPlugin 

create ui: done in 0.661s 

Running on local URL:  http://0.0.0.0:7860 

 

To create a public link, set `share=True` in `launch()`. 

gradio launch: done in 0.176s 

add APIs: done in 0.010s 

  app_started_callback: 

  lora_script.py: done in 0.000s 

Startup time: 12.9s (import torch: 3.4s, import gradio: 0.9s, setup paths: 0.7s, initialize shared: 0.8s, other imports: 0.4s, load scripts: 5.9s, create ui: 0.7s, gradio launch: 0.2s). 

Creating model from config: /home/zero/Downloads/weights/stable-diffusion-webui/configs/v1-inference.yaml 

loading stable diffusion model: RuntimeError 

Traceback (most recent call last): 

  File "/usr/local/lib/python3.10/threading.py", line 973, in _bootstrap 

    self._bootstrap_inner() 

  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner 

    self.run() 

  File "/usr/local/lib/python3.10/threading.py", line 953, in run 

    self._target(*self._args, **self._kwargs) 

  File "/home/zero/Downloads/weights/stable-diffusion-webui/modules/initialize.py", line 149, in load_model 

    shared.sd_model  # noqa: B018 

  File "/home/zero/Downloads/weights/stable-diffusion-webui/modules/shared_items.py", line 175, in sd_model 

    return modules.sd_models.model_data.get_sd_model() 

  File "/home/zero/Downloads/weights/stable-diffusion-webui/modules/sd_models.py", line 693, in get_sd_model 

    load_model() 

  File "/home/zero/Downloads/weights/stable-diffusion-webui/modules/sd_models.py", line 845, in load_model 

    load_model_weights(sd_model, checkpoint_info, state_dict, timer) 

  File "/home/zero/Downloads/weights/stable-diffusion-webui/modules/sd_models.py", line 440, in load_model_weights 

    model.load_state_dict(state_dict, strict=False) 

  File "/home/zero/Downloads/weights/stable-diffusion-webui/modules/sd_disable_initialization.py", line 223, in <lambda> 

    module_load_state_dict = self.replace(torch.nn.Module, 'load_state_dict', lambda *args, **kwargs: load_state_dict(module_load_state_dict, *args, **kwargs)) 

  File "/home/zero/Downloads/weights/stable-diffusion-webui/modules/sd_disable_initialization.py", line 221, in load_state_dict 

    original(module, state_dict, strict=strict) 

  File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2138, in load_state_dict 

    load(self, state_dict) 

  File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2126, in load 

    load(child, child_state_dict, child_prefix) 

  File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2126, in load 

    load(child, child_state_dict, child_prefix) 

  File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2126, in load 

    load(child, child_state_dict, child_prefix) 

  [Previous line repeated 1 more time] 

  File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2120, in load 

    module._load_from_state_dict( 

  File "/home/zero/Downloads/weights/stable-diffusion-webui/modules/sd_disable_initialization.py", line 225, in <lambda> 

    linear_load_from_state_dict = self.replace(torch.nn.Linear, '_load_from_state_dict', lambda *args, **kwargs: load_from_state_dict(linear_load_from_state_dict, *args, **kwargs)) 

  File "/home/zero/Downloads/weights/stable-diffusion-webui/modules/sd_disable_initialization.py", line 191, in load_from_state_dict 

    module._parameters[name] = torch.nn.parameter.Parameter(torch.zeros_like(param, device=device, dtype=dtype), requires_grad=param.requires_grad) 

  File "/usr/local/lib/python3.10/site-packages/torch/_meta_registrations.py", line 4507, in zeros_like 

    res = aten.empty_like.default( 

  File "/usr/local/lib/python3.10/site-packages/torch/_ops.py", line 448, in __call__ 

    return self._op(*args, **kwargs or {}) 

  File "/usr/local/lib/python3.10/site-packages/torch/_refs/__init__.py", line 4681, in empty_like 

    return torch.empty_permuted( 

RuntimeError: unknown format type:77 

 

Stable diffusion model failed to load 

Applying attention optimization: InvokeAI... done. 

Exception in thread Thread-3 (load_model): 

Traceback (most recent call last): 

  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner 

    self.run() 

  File "/usr/local/lib/python3.10/threading.py", line 953, in run 

    self._target(*self._args, **self._kwargs) 

  File "/home/zero/Downloads/weights/stable-diffusion-webui/modules/initialize.py", line 154, in load_model 

    devices.first_time_calculation() 

  File "/home/zero/Downloads/weights/stable-diffusion-webui/modules/devices.py", line 276, in first_time_calculation 

    linear = torch.nn.Linear(1, 1).to(device, dtype) 

  File "/usr/local/lib/python3.10/site-packages/torch_npu/utils/_module.py", line 78, in to 

    return self._apply(convert) 

  File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 833, in _apply 

    param_applied = fn(param) 

  File "/usr/local/lib/python3.10/site-packages/torch_npu/utils/_module.py", line 76, in convert 

    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking) 

RuntimeError: unknown format type:-1140785152 

我要发帖子