mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-04-30 08:42:50 -07:00
extra networks UI
rework of hypernets: rather than via settings, hypernets are added directly to prompt as <hypernet:name:weight>
This commit is contained in:
parent
e33cace2c2
commit
40ff6db532
25 changed files with 767 additions and 216 deletions
|
|
@ -50,6 +50,7 @@ class Embedding:
|
|||
self.sd_checkpoint = None
|
||||
self.sd_checkpoint_name = None
|
||||
self.optimizer_state_dict = None
|
||||
self.filename = None
|
||||
|
||||
def save(self, filename):
|
||||
embedding_data = {
|
||||
|
|
@ -182,6 +183,7 @@ class EmbeddingDatabase:
|
|||
embedding.sd_checkpoint_name = data.get('sd_checkpoint_name', None)
|
||||
embedding.vectors = vec.shape[0]
|
||||
embedding.shape = vec.shape[-1]
|
||||
embedding.filename = path
|
||||
|
||||
if self.expected_shape == -1 or self.expected_shape == embedding.shape:
|
||||
self.register_embedding(embedding, shared.sd_model)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue