Open RichFrain opened 11 months ago
you can try this: https://github.com/tencent-ailab/IP-Adapter/issues/164
Dear Author, I followed that. I found that sd["ip_adapter"].keys() is still empty
import torch
ckpt = "checkpoint-50000/pytorch_model.bin"
sd = torch.load(ckpt, map_location="cpu")
image_proj_sd = {}
ip_sd = {}
for k in sd:
if k.startswith("image_proj_model"):
image_proj_sd[k.replace("image_proj_model.", "")] = sd[k]
elif "_ip." in k:
ip_sd[k.replace("unet.", "")] = sd[k]
torch.save({"image_proj": image_proj_sd, "ip_adapter": ip_sd}, "ip_adapter.bin")
Didn't get pytorch_model.bin file after training, I need to convert the model.safetensors file to a pytorch_model.bin file, right?
Dear Author, I followed that. I found that sd["ip_adapter"].keys() is still empty
just like this to read safetensors
I apologize for bothering you so many times because I love this project so much! After I loaded safetensors converted to ip_adapter.bin. The output sd["ip_adapter"].keys() is Figure 2, which is not the same as the official sd["ip_adapter"].keys() output, which is Figure 1, which is official. Loading the converted ip_adapter.bin during testing reports an error.
please refer to https://github.com/tencent-ailab/IP-Adapter/issues/168
sdxl model,KeyError: 'down_blocks.1.attentions.0.transformer_blocks.1.attn2.processor.to_k_ip.weight'
hey , did it get solve?
Hi! This is structure my training data. The training was done according to the instructions. But after I trained and converted the resulting model.safetensors to ip_adapter.bin, I found that sd["ip_adapter"].keys() was empty, I don't know what the problem is.