Stable Diffusion运行Deforum报错问题解决

这篇具有很好参考价值的文章主要介绍了Stable Diffusion运行Deforum报错问题解决。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

运行Deforum时,需要在线下载dpt_large-midas-2f21e586.pt

Downloading: "https://github.com/intel-isl/DPT/releases/download/1_0/dpt_large-midas-2f21e586.pt" to C:\sd-webui-aki\sd-webui-aki-v4.1\models\Deforum\dpt_large-midas-2f21e586.pt

可能会遇到报错信息Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of \.

*START OF TRACEBACK*
Traceback (most recent call last):
  File "C:\sd-webui-aki\sd-webui-aki-v4.1\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\run_deforum.py", line 78, in run_deforum
    render_animation(args, anim_args, video_args, parseq_args, loop_args, controlnet_args, root)
  File "C:\sd-webui-aki\sd-webui-aki-v4.1\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\render.py", line 109, in render_animation
    depth_model = DepthModel(root.models_path, device, root.half_precision, keep_in_vram=keep_in_vram, depth_algorithm=anim_args.depth_algorithm, Width=args.W, Height=args.H,
  File "C:\sd-webui-aki\sd-webui-aki-v4.1\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth.py", line 32, in __new__
    cls._instance._initialize(models_path=args[0], device=args[1], half_precision=not cmd_opts.no_half, keep_in_vram=keep_in_vram, depth_algorithm=depth_algorithm, Width=Width, Height=Height, midas_weight=midas_weight)
  File "C:\sd-webui-aki\sd-webui-aki-v4.1\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth.py", line 48, in _initialize
    self._initialize_model()
  File "C:\sd-webui-aki\sd-webui-aki-v4.1\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth.py", line 63, in _initialize_model
    self.midas_depth = MidasDepth(self.models_path, self.device, half_precision=self.half_precision, midas_model_type=self.depth_algorithm)
  File "C:\sd-webui-aki\sd-webui-aki-v4.1\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth_midas.py", line 33, in __init__
*END OF TRACEBACK*
    download_file_with_checksum(url=self.midas_model_url, expected_checksum=self.midas_model_checksum, dest_folder=models_path, dest_filename=self.midas_model_filename)
  File "C:\sd-webui-aki\sd-webui-aki-v4.1\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\general_utils.py", line 128, in download_file_with_checksum
    raise Exception(f"Error while downloading {dest_filename}.]nPlease manually download from: {url}\nAnd place it in: {dest_folder}")

User friendly error message:
Exception: Error while downloading dpt_large-midas-2f21e586.pt.]nPlease manually download from: https://github.com/intel-isl/DPT/releases/download/1_0/dpt_large-midas-2f21e586.pt
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
And place it in: C:\sd-webui-aki\sd-webui-aki-v4.1\models/Deforum
Error: Error while downloading dpt_large-midas-2f21e586.pt.]nPlease manually download from: https://github.com/intel-isl/DPT/releases/download/1_0/dpt_large-midas-2f21e586.pt
And place it in: C:\sd-webui-aki\sd-webui-aki-v4.1\models/Deforum. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of \.

根据log提示,修改C:\sd-webui-aki\sd-webui-aki-v4.1\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers目录下的general_utils.py文件最后的download_file_with_checksum(url, expected_checksum, dest_folder, dest_filename)方法,添加replace替换操作。

def download_file_with_checksum(url, expected_checksum, dest_folder, dest_filename):
    dest_folder=dest_folder.replace("\\", "/")
    expected_full_path = os.path.join(dest_folder, dest_filename)
    expected_full_path=expected_full_path.replace("\\", "/")
    if not os.path.exists(expected_full_path) and not os.path.isdir(expected_full_path):
        load_file_from_url(url=url, model_dir=dest_folder, file_name=dest_filename, progress=True)
        if checksum(expected_full_path) != expected_checksum:
            raise Exception(f"Error while downloading {dest_filename}.]nPlease manually download from: {url}\nAnd place it in: {dest_folder}")

然后重新运行sd-webui,若报错

Loading MiDaS model from dpt_large-midas-2f21e586.pt...
Error verifying pickled file from C:\sd-webui-aki\sd-webui-aki-v4.1\models/Deforum\dpt_large-midas-2f21e586.pt:
Traceback (most recent call last):
  File "C:\sd-webui-aki\sd-webui-aki-v4.1\modules\safe.py", line 82, in check_pt
    with zipfile.ZipFile(filename) as z:
  File "C:\sd-webui-aki\sd-webui-aki-v4.1\python\lib\zipfile.py", line 1269, in __init__
    self._RealGetContents()
  File "C:\sd-webui-aki\sd-webui-aki-v4.1\python\lib\zipfile.py", line 1336, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

则删除Deforum插件,并且删除本地目录 C:\sd-webui-aki\sd-webui-aki-v4.1\models/Deforum\下的dpt_large-midas-2f21e586.pt文件。重新安装Deforum插件,并运行,会重新下载该文件。

最后重新运行即可。文章来源地址https://www.toymoban.com/news/detail-519908.html

到了这里,关于Stable Diffusion运行Deforum报错问题解决的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Stable Diffusion插件Deforum安装后无法显示故障排查

    我使用的是秋叶整合包,在UI界面安装Deforum成功后,重启UI界面始终无法显示Deforum,尝试了网上的各种方法,都没有奏效。 后来想到有可能是Stable Diffusion与Deforum版本兼容性问题,将Deforum版本切换为相对旧的版本,完美解决问题,操作步骤如下: 重启Stable Di发fusion,Deforum显

    2024年02月11日
    浏览(29)
  • stable-diffusion-webui 本地部署git报错问题解决

    运行时python launch.py --autolaunch 产生Error code:1 由于git安全机制问题,导致项目读取不到相应的 stable-diffusion-stability-ai等插件 。 1:依次忽略相关文件夹: 2:直接使用 git bash 打开运行  

    2024年02月11日
    浏览(41)
  • stable diffusion运行问题

    计划本地部署stable diffusion,然后将其软件化为exe(始终认为用gradio属于原型开发,而不是部署落地) 目前比较主流的有秋叶包,提取码:xvro 安装xformer torch 2.0.1+cu118 python 3.10.13 cuda 11.8 SDXL_DEMO SDXLSourceCode

    2023年04月22日
    浏览(25)
  • 运行stable-diffusion出现的问题(1)

    Checkout your internet connection or see how to run the library in offline mode at ‘https://huggingface.co/docs/transformers/installation#offline-mode’. 原因:网络不好,无法进入huggingface下载模型 解决:下载后离线,步骤如下 1.进入网址:https://huggingface.co/docs/transformers/installation#offline-mode 2.点击红框所示

    2024年04月23日
    浏览(24)
  • Stable Diffusion web UI 运行报错 Error while deserializing header: MetadataIncompleteBuffer

    1、改成手动下载文件,注意要想删除 D:codeaisd.webuiwebuimodelsStable-diffusionv1-5-pruned-emaonly.safetensors 文件,每个人路径不一样,看上面的错误日志是上面地址。 2、删除后手动下载,并移动到 D:codeaisd.webuiwebuimodelsStable-diffusion 路径下,同样要根据日志改成你的地址。 3、

    2024年02月13日
    浏览(44)
  • Linux端部署Stable Diffusion报错解决

    【新修正】手把手教你在linux中部署stable-diffusion-webui N卡A卡显卡可用 - 哔哩哔哩 (bilibili.com) 参照如上教程进行部署,感谢作者的教程 实际部署中遇到如下bug,主要是在运行启动脚本的时候 sh start.sh 1、RuntimeError: cannot import name \\\'_compare_version\\\' from \\\'torchmetrics.utilities.imports\\\' 需要降

    2024年02月14日
    浏览(27)
  • Stable Diffusion WebUI安装报错解决

    本人是一个AI新手,最近在研究文生图方面相关内容时看到Stable Diffusion WebUI这个项目,想在本地部署安装试用看下效果,安装过程中遇到了一些问题,此处记录一下 问题1:Python 3.12.1 (tags/v3.12.1:2305ca5, Dec 7 2023, 22:03:25) [MSC v.1937 64 bit (AMD64)] Version: 1.8.0-RC Commit hash: none Installing

    2024年04月10日
    浏览(29)
  • Stable Diffusion本地部署报错解决:RuntimeError: Couldn‘t determine Stable Diffusion‘s hash: xxxxxxx

    升级git版本等都没有解决的话,看这里! 找到stable-diffusion-webuimoduleslaunch_utils.py,打开,搜索 current_hash (当前是第151行): 原内容: 改成: 如果有用记得赞赏一下哟~

    2024年02月09日
    浏览(28)
  • stable diffusion webui安装和运行中出现的bug及解决方式

    webui的运行实在名为 venv 的虚拟环境中进行的,所以通过 launch.py 运行的时候,一定要先通过 source venv/bin/activate 激活虚拟环境 venv 。 1、报错:Couldn’t install gfpgan 原因: 代理的问题,应该是安装的时候挂了代理,所以没办法直接安装。 解决: 感觉停用代理应该可以,但是我

    2024年02月11日
    浏览(23)
  • Stable Diffusion 运行报错 TypeError: unsupported operand type(s) for |: ‘type‘ and ‘type‘

    MacOS 上使用 python 3.8 版本安装运行 Stable Diffusion 时,有如下报错 这是因为之前老版本的 python 3.8 的兼容问题。 解决办法: 1. 方法一:升级 python 版本至 3.9+ 2. 方法二:在 `lora.py` 文件中增加代码:from __future__ import annotations: Problem solved~

    2024年02月11日
    浏览(34)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包