Skip to content

Commit 33056c5

Browse files
committed
make style
1 parent c8ec68c commit 33056c5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scripts/convert_cogvideox_to_diffusers.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ def update_state_dict_inplace(state_dict: Dict[str, Any], old_key: str, new_key:
134134

135135

136136
def convert_transformer(
137-
ckpt_path: str,
138-
num_layers: int,
139-
num_attention_heads: int,
140-
use_rotary_positional_embeddings: bool,
141-
i2v: bool,
142-
dtype: torch.dtype,
137+
ckpt_path: str,
138+
num_layers: int,
139+
num_attention_heads: int,
140+
use_rotary_positional_embeddings: bool,
141+
i2v: bool,
142+
dtype: torch.dtype,
143143
):
144144
PREFIX_KEY = "model.diffusion_model."
145145

@@ -153,7 +153,7 @@ def convert_transformer(
153153
).to(dtype=dtype)
154154

155155
for key in list(original_state_dict.keys()):
156-
new_key = key[len(PREFIX_KEY):]
156+
new_key = key[len(PREFIX_KEY) :]
157157
for replace_key, rename_key in TRANSFORMER_KEYS_RENAME_DICT.items():
158158
new_key = new_key.replace(replace_key, rename_key)
159159
update_state_dict_inplace(original_state_dict, key, new_key)

0 commit comments

Comments
 (0)