Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions scripts/convert_diffusers_to_original_stable_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def convert_vae_state_dict(vae_state_dict):
code2idx = {"q": 0, "k": 1, "v": 2}


def convert_text_enc_state_dict_v20(text_enc_dict: dict[str, torch.Tensor]):
def convert_text_enc_state_dict_v20(text_enc_dict):
new_state_dict = {}
capture_qkv_weight = {}
capture_qkv_bias = {}
Expand Down Expand Up @@ -256,12 +256,10 @@ def convert_text_enc_state_dict_v20(text_enc_dict: dict[str, torch.Tensor]):
return new_state_dict


def convert_text_enc_state_dict(text_enc_dict: dict[str, torch.Tensor]):
def convert_text_enc_state_dict(text_enc_dict):
return text_enc_dict


IS_V20_MODEL = True

if __name__ == "__main__":
parser = argparse.ArgumentParser()

Expand Down