File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
app/services/shared/sqlite_migrator Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,7 @@ class MigrateCallback(Protocol):
17
17
See :class:`Migration` for an example.
18
18
"""
19
19
20
- def __call__ (self , cursor : sqlite3 .Cursor ) -> None :
21
- ...
20
+ def __call__ (self , cursor : sqlite3 .Cursor ) -> None : ...
22
21
23
22
24
23
class MigrationError (RuntimeError ):
Original file line number Diff line number Diff line change @@ -858,9 +858,9 @@ def do_textual_inversion_training(
858
858
# Let's make sure we don't update any embedding weights besides the newly added token
859
859
index_no_updates = torch .arange (len (tokenizer )) != placeholder_token_id
860
860
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
+ )
864
864
865
865
# Checks if the accelerator has performed an optimization step behind the scenes
866
866
if accelerator .sync_gradients :
You can’t perform that action at this time.
0 commit comments