水上冰石 2025-12-04 09:27 采纳率: 20%
浏览 10

NOTE: Redirects are currently not supported in Windows or MacOs,如何解决?

报错信息如下:



```c

W1203 23:45:22.160298 21996 Lib\site-packages\torch\distributed\elastic\multiprocessing\redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
E:\stableDiffusion\venv\lib\site-packages\timm\models\layers\__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
  warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
Loading weights [6ce0161689] from E:\stableDiffusion\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Creating model from config: E:\stableDiffusion\stable-diffusion-webui\configs\v1-inference.yaml
E:\stableDiffusion\venv\lib\site-packages\huggingface_hub\file_download.py:942: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 8.2s (prepare environment: 1.0s, import torch: 3.6s, import gradio: 0.8s, setup paths: 1.1s, initialize shared: 0.3s, other imports: 0.3s, load scripts: 0.3s, create ui: 0.4s, gradio launch: 0.4s).
Applying attention optimization: Doggettx... done.
Model loaded in 4.9s (load weights from disk: 0.1s, create model: 0.5s, apply weights to model: 2.9s, calculate empty prompt: 1.2s).


启动之后能进入页面, 但是不能正常使用。

  • 写回答

4条回答 默认 最新

  • 阿里嘎多学长 2025-12-04 09:51
    关注

    阿里嘎多学长整理AIGC生成,因移动端显示问题导致当前答案未能完全显示,请使用PC端查看更加详细的解答过程

    根据你的问题描述,似乎是 Stable Diffusion 在 Windows 或 MacOS 上遇到了问题。具体来说,是关于重定向(Redirects)的支持。

    解决方案:

    1. 检查环境变量:确保你的环境变量配置正确,特别是 PATHPYTHONPATH
    2. 使用相对路径:尝试使用相对路径来引用你的模型或数据,而不是绝对路径。
    3. 检查依赖包:确保你的依赖包(如 torchtorch-distributed 等)版本正确,并且没有冲突。
    4. 重启环境:尝试重启你的环境(如 Jupyter Notebook、Anaconda 等),看看是否能解决问题。
    5. 检查 Stable Diffusion 的文档:确保你遵循了 Stable Diffusion 的文档和指南。

    如果以上解决方案仍然无法解决问题,请提供更多的错误信息和环境配置信息,我将尝试提供更具体的帮助。

    核心代码:

    import os
    import sys
    
    # 检查环境变量
    print(os.environ.get('PATH'))
    print(os.environ.get('PYTHONPATH'))
    
    # 使用相对路径
    model_path = './models/stable_diffusion'
    data_path = './data'
    
    # 检查依赖包
    import torch
    print(torch.__version__)
    
    # 重启环境
    import sys
    sys.exit(0)
    

    请注意,这些代码仅供参考,具体的解决方案可能需要根据你的环境和问题进行调整。

    评论

报告相同问题?

问题事件

  • 创建了问题 12月4日