Skip to content

Commit b6065d6

Browse files
brandonrisingpsychedelicious
authored andcommitted
Run ruff with newest version of ruff
1 parent 04229f4 commit b6065d6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

invokeai/app/services/shared/sqlite_migrator/sqlite_migrator_common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ class MigrateCallback(Protocol):
1717
See :class:`Migration` for an example.
1818
"""
1919

20-
def __call__(self, cursor: sqlite3.Cursor) -> None:
21-
...
20+
def __call__(self, cursor: sqlite3.Cursor) -> None: ...
2221

2322

2423
class MigrationError(RuntimeError):

invokeai/backend/training/textual_inversion_training.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -858,9 +858,9 @@ def do_textual_inversion_training(
858858
# Let's make sure we don't update any embedding weights besides the newly added token
859859
index_no_updates = torch.arange(len(tokenizer)) != placeholder_token_id
860860
with torch.no_grad():
861-
accelerator.unwrap_model(text_encoder).get_input_embeddings().weight[
862-
index_no_updates
863-
] = orig_embeds_params[index_no_updates]
861+
accelerator.unwrap_model(text_encoder).get_input_embeddings().weight[index_no_updates] = (
862+
orig_embeds_params[index_no_updates]
863+
)
864864

865865
# Checks if the accelerator has performed an optimization step behind the scenes
866866
if accelerator.sync_gradients:

0 commit comments

Comments
 (0)