Open journey-zhuang opened 4 months ago
Hey @journey-zhuang , thank you for your interest in our work. Could you provide more details about the error, specifying whether it occurred during the execution of the python script or while using the online demo? Before you respond, we will conduct a comprehensive check; your response will help us better identify the error.
ok, it occurred during the execution of the python script
It looks like an error occurred while loading parameters of style_image_proj_modules.
The style_image_proj_modules are implemented as a ModuleList, containing three projections. Each is initialized using the code below:
ImageProjModel( cross_attention_dim=self.pipe.unet.config.cross_attention_dim, clip_embeddings_dim=self.style_aware_encoder.projection_dim, clip_extra_context_tokens=2, ),
Our StyleShot is based on SD v1.5, requires that the cross_attention_dim parameter match the corresponding value of 768 specified in the SD v1.5 configuration file.
However, it appears that your code specifies a cross_attention_dim of 1024. Please confirm that your base diffusion model is indeed SD v1.5 and adjust the cross_attention_dim to the correct value of 768.
Oh, I accidentally used SD 2.1, It is my fault, thanks to the author for the positive reply!
Hello, I had the following problem when trying to run demo:
RuntimeError: Error(s) in loading state_dict for ModuleList: size mismatch for 0.proj.weight: copying a param with shape torch.Size([1536, 1024]) from checkpoint, the shape in current model is torch.Size([2048, 1024]). size mismatch for 0.proj.bias: copying a param with shape torch.Size([1536]) from checkpoint, the shape in current model is torch.Size([2048]). size mismatch for 0.norm.weight: copying a param with shape torch.Size([768]) from checkpoint, the shape in current model is torch.Size([1024]). size mismatch for 0.norm.bias: copying a param with shape torch.Size([768]) from checkpoint, the shape in current model is torch.Size([1024]). size mismatch for 1.proj.weight: copying a param with shape torch.Size([1536, 1024]) from checkpoint, the shape in current model is torch.Size([2048, 1024]). size mismatch for 1.proj.bias: copying a param with shape torch.Size([1536]) from checkpoint, the shape in current model is torch.Size([2048]). size mismatch for 1.norm.weight: copying a param with shape torch.Size([768]) from checkpoint, the shape in current model is torch.Size([1024]). size mismatch for 1.norm.bias: copying a param with shape torch.Size([768]) from checkpoint, the shape in current model is torch.Size([1024]). size mismatch for 2.proj.weight: copying a param with shape torch.Size([1536, 1024]) from checkpoint, the shape in current model is torch.Size([2048, 1024]). size mismatch for 2.proj.bias: copying a param with shape torch.Size([1536]) from checkpoint, the shape in current model is torch.Size([2048]). size mismatch for 2.norm.weight: copying a param with shape torch.Size([768]) from checkpoint, the shape in current model is torch.Size([1024]). size mismatch for 2.norm.bias: copying a param with shape torch.Size([768]) from checkpoint, the shape in current model is torch.Size([1024]).