Closed iamwavecut closed 7 months ago
@horseee plz check
Hi @iamwavecut, Thanks for the PR. Will check this ASAP. Our project started more than 4 months ago. So, we just fixed the version for better reproducibility.
@VainF thanks for quick response. However, it might not work in certain conditions (f.e. model offload), let me draft it for a while and I'll update you later.
Update:
Hi @iamwavecut, thanks again for your code. May I ask where can I find the function pkg_version
? The following snippet works well on my side:
import diffusers
if diffusers.__version__ >= '0.22.0':
from diffusers.models.normalization import AdaGroupNorm
else:
from diffusers.models.attention import AdaGroupNorm
@VainF i've encountered a couple of obstacles trying to apply it to the most recent version of diffusers
, because of massive overlap of code duplication, so, I investigate the opportunity to not overwrite, but to monkey patch actual forward implementation.
It comes with a cost of patch complexity, but, I believe, I would finish it soon, will create new PR then.
Thanks for merging!
I dont know why you only want a certain version of diffusers, but this little check lets you use later versions of diffusers.