Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdxl相关问题 #83

Open
Lil-CC opened this issue Nov 11, 2024 · 1 comment
Open

sdxl相关问题 #83

Lil-CC opened this issue Nov 11, 2024 · 1 comment

Comments

@Lil-CC
Copy link

Lil-CC commented Nov 11, 2024

按SDXL.md完成模型下载后,运行sdxl.py文件时对输入文本做了77的截断,后将stable-diffusion/text_encoder/config.json中"max_position_embeddings"改为248,报错如下
RuntimeError: Error(s) in loading state_dict for CLIPTextModel:
size mismatch for text_model.embeddings.position_embedding.weight: copying a param with shape torch.Size([77, 1024]) from checkpoint, the shape in current model is torch.Size([248, 1024]).
You may consider adding ignore_mismatched_sizes=True in the model from_pretrained method.
请问是需要修改text_encoder/config.json中的"architectures": ["CLIPTextModel"]吗?

@beichenzbc
Copy link
Owner

您好,如果按照我们SDXL.md的要求进行配置后,无需修改任何参数就可以运行python sdxl.py实现248长度的文生图了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants