Li Zhenliang

Results 12 comments of Li Zhenliang

> 如图所示修改,请问是这样吗?提示如下: > > 模型只需要下载unet , text_encoder 下载到本地加载试试

> > 感谢您的修复。但是,当我按照这些步骤作时,我收到一个错误:OSError:runwayml/stable-diffusion-v1-5 似乎没有名为 config.json 的文件。 > > 你能告诉我我哪里出了问题吗?整个错误堆栈如下: > > ``` > > /usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1142: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when...

RuntimeError: Error(s) in loading state_dict for BrushNetModel: Unexpected key(s) in state_dict: "brushnet_down_blocks.0.bias", "brushnet_down_blocks.0.weight", ... ... 🔍 Details: Model repo: zhuangjunhao/PowerPaint_v2 File attempting to load: (downloaded via OpenXLab or HuggingFace mirror)PowerPaint_BrushnetE...

解决了, 是 权重类型不匹配导致, from safetensors.torch import load_model,load_file unet = UNet2DConditionModel.from_pretrained( os.path.join(self.checkpoint_dir, "runwayml_stable-diffusion-v1-5"), subfolder="unet", revision=None, torch_dtype=weight_dtype, local_files_only=local_files_only, ) 加载的时候权重类型是torch.float16,但是PowerPaint_Brushnet/diffusion_pytorch_model.safetensors 原始类型是torch.float32(有一个key对应的是torch.float16),load_model()函数会检查模型与权重对应的值类型是否一样,导致加载错误。 以下代码可以正常加载(原理是内部执行自动类型转换加载) brushnet_weights_path = os.path.join( checkpoint_dir, "PowerPaint_Brushnet/diffusion_pytorch_model.safetensors", ) weights = load_file(brushnet_weights_path) self.pipe.brushnet.load_state_dict(weights,...

https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/tree/main/unet

> > elf.pipe.brushnet.load_state_dict > > 请问大佬这块是哪里修改的?app.py文件的191行吗? 188-191 加载PowerPaint_Brushnet/diffusion_pytorch_model.safetensors时候

> > > > elf.pipe.brushnet.load_state_dict > > > > > > > > > 请问大佬这块是哪里修改的?app.py文件的191行吗? > > > > > > 188-191 加载PowerPaint_Brushnet/diffusion_pytorch_model.safetensors时候 > > 好的,谢谢,已跑通,不过我是在远程服务器搭建的,目前上传图片,点击Run。右侧结果会出现Error。。。请问您见过这种情况吗? 你看看终端错误是什么,cuda不足或者其他的问题,web端看不到具体的错误

> 貌似就是一些警告,然后后台有个进度条在跑,不过此时页面已经出现error。 那就是gradio接口显示问题,图片应该已经在lunix服务器内,跟gpt交互一下让他检查下,我之前跑的是没问题的