Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
w-e-w committed Sep 12, 2023
1 parent e785402 commit 74b80e7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions extensions-builtin/Lora/ui_extra_networks_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def create_item(self, name, index=None, enable_filter=True):
return item

def list_items(self):
# instantiate a list to protect against concurrent modification
names = list(networks.available_networks)
for index, name in enumerate(names):
item = self.create_item(name, index)
Expand Down
1 change: 1 addition & 0 deletions modules/ui_extra_networks_checkpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def create_item(self, name, index=None, enable_filter=True):
}

def list_items(self):
# instantiate a list to protect against concurrent modification
names = list(sd_models.checkpoints_list)
for index, name in enumerate(names):
item = self.create_item(name, index)
Expand Down
1 change: 1 addition & 0 deletions modules/ui_extra_networks_hypernets.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def create_item(self, name, index=None, enable_filter=True):
}

def list_items(self):
# instantiate a list to protect against concurrent modification
names = list(shared.hypernetworks)
for index, name in enumerate(names):
item = self.create_item(name, index)
Expand Down
1 change: 1 addition & 0 deletions modules/ui_extra_networks_textual_inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def create_item(self, name, index=None, enable_filter=True):
}

def list_items(self):
# instantiate a list to protect against concurrent modification
names = list(sd_hijack.model_hijack.embedding_db.word_embeddings)
for index, name in enumerate(names):
item = self.create_item(name, index)
Expand Down

0 comments on commit 74b80e7

Please sign in to comment.