mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 19:05:05 +08:00
thread safe extra network using list
This commit is contained in:
parent
25de9a785c
commit
f5959c1c30
@ -66,7 +66,8 @@ class ExtraNetworksPageLora(ui_extra_networks.ExtraNetworksPage):
|
||||
return item
|
||||
|
||||
def list_items(self):
|
||||
for index, name in enumerate(networks.available_networks):
|
||||
names = list(networks.available_networks)
|
||||
for index, name in enumerate(names):
|
||||
item = self.create_item(name, index)
|
||||
|
||||
if item is not None:
|
||||
|
@ -31,7 +31,8 @@ class ExtraNetworksPageHypernetworks(ui_extra_networks.ExtraNetworksPage):
|
||||
}
|
||||
|
||||
def list_items(self):
|
||||
for index, name in enumerate(shared.hypernetworks):
|
||||
names = list(shared.hypernetworks)
|
||||
for index, name in enumerate(names):
|
||||
yield self.create_item(name, index)
|
||||
|
||||
def allowed_directories_for_previews(self):
|
||||
|
@ -29,7 +29,8 @@ class ExtraNetworksPageTextualInversion(ui_extra_networks.ExtraNetworksPage):
|
||||
}
|
||||
|
||||
def list_items(self):
|
||||
for index, name in enumerate(sd_hijack.model_hijack.embedding_db.word_embeddings):
|
||||
names = list(sd_hijack.model_hijack.embedding_db.word_embeddings)
|
||||
for index, name in enumerate(names):
|
||||
yield self.create_item(name, index)
|
||||
|
||||
def allowed_directories_for_previews(self):
|
||||
|
Loading…
Reference in New Issue
Block a user