mkshing / ziplora-pytorch

Implementation of "ZipLoRA: Any Subject in Any Style by Effectively Merging LoRAs"
MIT License
481 stars 33 forks source link

spotted a possible minor type annotation error #2

Closed imchkkim closed 8 months ago

imchkkim commented 8 months ago

hi thx for great work.

I think I spotted a possible minor type annotation error in

ziplora_pytorch/utils.py line 14 where returns

)-> torch.Tensor

get_lora_weights function seems to returns tensors dict ( tensors[key] = f.get_tensor(key) in line 38 )

therefore, I assume the return type of function should be

) -> Dict[str, torch.Tensor]:

also in line 116

tensors: torch.Tensor, key: str, prefix: str = "unet.unet."
# torch.Tensor -> Dict[str, torch.Tensor]
mkshing commented 8 months ago

Thanks! Fixed.