Skip to content

Conversation

@apolinario
Copy link
Collaborator

@apolinario apolinario commented Dec 13, 2022

This fixes the text_enc_dict: dict[str, torch.Tensor] that is erroring out:

Traceback (most recent call last):
  File "convert_diffusers_to_original_stable_diffusion.py", line 212, in <module>
      def convert_text_enc_state_dict_v20(text_enc_dict: dict[str, torch.Tensor]):
TypeError: 'type' object is not subscriptable

Another solution would be to add a from typing import Dict, but since we don't type check anywhere I think removing the dict[str, torch.Tensor] as done in this PR makes more sense.

cc @lawfordp2017

@apolinario
Copy link
Collaborator Author

apolinario commented Dec 13, 2022

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 13, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@apolinario apolinario merged commit b417042 into main Dec 13, 2022
sliard pushed a commit to sliard/diffusers that referenced this pull request Dec 21, 2022
…usion.py` (huggingface#1681)

* Fix type checking remainders

* Remove IS_V20_MODEL flag always being True

Co-authored-by: apolinario <[email protected]>
@kashif kashif deleted the fix-diffusers-to-ckpt branch March 19, 2023 12:20
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

Successfully merging this pull request may close these issues.

4 participants