mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-01 12:25:06 +08:00
Revert "thread safe extra network list_items"
This reverts commit aab385d01b
.
This commit is contained in:
parent
aab385d01b
commit
25de9a785c
@ -66,9 +66,9 @@ class ExtraNetworksPageLora(ui_extra_networks.ExtraNetworksPage):
|
||||
return item
|
||||
|
||||
def list_items(self):
|
||||
with self.thread_lock:
|
||||
for index, name in enumerate(networks.available_networks):
|
||||
item = self.create_item(name, index)
|
||||
|
||||
if item is not None:
|
||||
yield item
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import os.path
|
||||
import urllib.parse
|
||||
from pathlib import Path
|
||||
from threading import Lock
|
||||
|
||||
from modules import shared, ui_extra_networks_user_metadata, errors, extra_networks
|
||||
from modules.images import read_info_from_image, save_image_with_geninfo
|
||||
@ -95,7 +94,6 @@ class ExtraNetworksPage:
|
||||
self.allow_negative_prompt = False
|
||||
self.metadata = {}
|
||||
self.items = {}
|
||||
self.thread_lock = Lock()
|
||||
|
||||
def refresh(self):
|
||||
pass
|
||||
|
@ -30,8 +30,8 @@ class ExtraNetworksPageCheckpoints(ui_extra_networks.ExtraNetworksPage):
|
||||
}
|
||||
|
||||
def list_items(self):
|
||||
with self.thread_lock:
|
||||
for index, name in enumerate(sd_models.checkpoints_list):
|
||||
names = list(sd_models.checkpoints_list)
|
||||
for index, name in enumerate(names):
|
||||
yield self.create_item(name, index)
|
||||
|
||||
def allowed_directories_for_previews(self):
|
||||
|
@ -31,7 +31,6 @@ class ExtraNetworksPageHypernetworks(ui_extra_networks.ExtraNetworksPage):
|
||||
}
|
||||
|
||||
def list_items(self):
|
||||
with self.thread_lock:
|
||||
for index, name in enumerate(shared.hypernetworks):
|
||||
yield self.create_item(name, index)
|
||||
|
||||
|
@ -29,7 +29,6 @@ class ExtraNetworksPageTextualInversion(ui_extra_networks.ExtraNetworksPage):
|
||||
}
|
||||
|
||||
def list_items(self):
|
||||
with self.thread_lock:
|
||||
for index, name in enumerate(sd_hijack.model_hijack.embedding_db.word_embeddings):
|
||||
yield self.create_item(name, index)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user