No module named ‘pytorch_lightning.utilities.distributed‘

在按照stable- diffusion中,需要安装很多依赖。如果版本不对,则不能成功运行,标题的问题就是如此。

相关参考:stable- diffusion V1效果咋样呢?V2呢?安装成功记录。

解决方案:

 pip install pytorch_lightning==1.9
 pip install omegaconf
 pip install piexif

但此时还有问题:ModuleNotFoundError: No module named 'fonts.ttf'

这个fonts玩意从0.0.1版本到0.0.3版本都会出问题,卧槽。

ImportError: cannot import name 'Roboto' from 'fonts.ttf'

ModuleNotFoundError: No module named 'fonts'

有人说pip install font-roboto能解决问题,我这里还是不行。

然后再安装fonts解决:pip install fonts -i https://pypi.tuna.tsinghua.edu.cn/simple

继续安装其他依赖包:

pip install realesrgan
pip install inflection
pip install blendmodes
pip install timm
pip install lark

然后将misc文件中,增加如下代码:site-packages/basicsr/utils/misc.py

def get_device():
    if torch.cuda.is_available():
        return torch.device("cuda")
    else:
        return torch.device("cpu")

def gpu_is_available():
        return torch.cuda.is_available()

但是请求结果是404,我勒个去。

gradio版本变化太大了。

module 'gradio' has no attribute 'themes'

TypeError: launch() got an unexpected keyword argument 'ssl_verify'

安装指定版本解决此问题:pip install gradio==3.32.0

然而,modules.devices.NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

如果增加--disable-nan-chec则生成的图全是黑色的,

modules.devices.NansException: A tensor with all NaNs was produced in Unet

这个问题真是难解决啊。我勒个去。

暂时无法解决。

huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '../conf/models/chatglm2-6b/'. Use `repo_type` argument if needed.

这是路径不对,请仔细查看模型的位置及相对位置是否正确。

你可能感兴趣的:(imagednn,pytorch,stable,diffusion,图像生成,大模型,部署,人工智能)