Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
0c5fa9a6
Commit
0c5fa9a6
authored
Oct 16, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not reload embeddings from disk when doing textual inversion
parent
be1596ce
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
modules/processing.py
modules/processing.py
+3
-2
modules/textual_inversion/textual_inversion.py
modules/textual_inversion/textual_inversion.py
+1
-0
No files found.
modules/processing.py
View file @
0c5fa9a6
...
@@ -53,7 +53,7 @@ def get_correct_sampler(p):
...
@@ -53,7 +53,7 @@ def get_correct_sampler(p):
return
sd_samplers
.
samplers_for_img2img
return
sd_samplers
.
samplers_for_img2img
class
StableDiffusionProcessing
:
class
StableDiffusionProcessing
:
def
__init__
(
self
,
sd_model
=
None
,
outpath_samples
=
None
,
outpath_grids
=
None
,
prompt
=
""
,
styles
=
None
,
seed
=-
1
,
subseed
=-
1
,
subseed_strength
=
0
,
seed_resize_from_h
=-
1
,
seed_resize_from_w
=-
1
,
seed_enable_extras
=
True
,
sampler_index
=
0
,
batch_size
=
1
,
n_iter
=
1
,
steps
=
50
,
cfg_scale
=
7.0
,
width
=
512
,
height
=
512
,
restore_faces
=
False
,
tiling
=
False
,
do_not_save_samples
=
False
,
do_not_save_grid
=
False
,
extra_generation_params
=
None
,
overlay_images
=
None
,
negative_prompt
=
None
,
eta
=
None
):
def
__init__
(
self
,
sd_model
=
None
,
outpath_samples
=
None
,
outpath_grids
=
None
,
prompt
=
""
,
styles
=
None
,
seed
=-
1
,
subseed
=-
1
,
subseed_strength
=
0
,
seed_resize_from_h
=-
1
,
seed_resize_from_w
=-
1
,
seed_enable_extras
=
True
,
sampler_index
=
0
,
batch_size
=
1
,
n_iter
=
1
,
steps
=
50
,
cfg_scale
=
7.0
,
width
=
512
,
height
=
512
,
restore_faces
=
False
,
tiling
=
False
,
do_not_save_samples
=
False
,
do_not_save_grid
=
False
,
extra_generation_params
=
None
,
overlay_images
=
None
,
negative_prompt
=
None
,
eta
=
None
,
do_not_reload_embeddings
=
False
):
self
.
sd_model
=
sd_model
self
.
sd_model
=
sd_model
self
.
outpath_samples
:
str
=
outpath_samples
self
.
outpath_samples
:
str
=
outpath_samples
self
.
outpath_grids
:
str
=
outpath_grids
self
.
outpath_grids
:
str
=
outpath_grids
...
@@ -80,6 +80,7 @@ class StableDiffusionProcessing:
...
@@ -80,6 +80,7 @@ class StableDiffusionProcessing:
self
.
extra_generation_params
:
dict
=
extra_generation_params
or
{}
self
.
extra_generation_params
:
dict
=
extra_generation_params
or
{}
self
.
overlay_images
=
overlay_images
self
.
overlay_images
=
overlay_images
self
.
eta
=
eta
self
.
eta
=
eta
self
.
do_not_reload_embeddings
=
do_not_reload_embeddings
self
.
paste_to
=
None
self
.
paste_to
=
None
self
.
color_corrections
=
None
self
.
color_corrections
=
None
self
.
denoising_strength
:
float
=
0
self
.
denoising_strength
:
float
=
0
...
@@ -364,7 +365,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
...
@@ -364,7 +365,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
def
infotext
(
iteration
=
0
,
position_in_batch
=
0
):
def
infotext
(
iteration
=
0
,
position_in_batch
=
0
):
return
create_infotext
(
p
,
all_prompts
,
all_seeds
,
all_subseeds
,
comments
,
iteration
,
position_in_batch
)
return
create_infotext
(
p
,
all_prompts
,
all_seeds
,
all_subseeds
,
comments
,
iteration
,
position_in_batch
)
if
os
.
path
.
exists
(
cmd_opts
.
embeddings_dir
):
if
os
.
path
.
exists
(
cmd_opts
.
embeddings_dir
)
and
not
p
.
do_not_reload_embeddings
:
model_hijack
.
embedding_db
.
load_textual_inversion_embeddings
()
model_hijack
.
embedding_db
.
load_textual_inversion_embeddings
()
infotexts
=
[]
infotexts
=
[]
...
...
modules/textual_inversion/textual_inversion.py
View file @
0c5fa9a6
...
@@ -296,6 +296,7 @@ def train_embedding(embedding_name, learn_rate, batch_size, data_root, log_direc
...
@@ -296,6 +296,7 @@ def train_embedding(embedding_name, learn_rate, batch_size, data_root, log_direc
sd_model
=
shared
.
sd_model
,
sd_model
=
shared
.
sd_model
,
do_not_save_grid
=
True
,
do_not_save_grid
=
True
,
do_not_save_samples
=
True
,
do_not_save_samples
=
True
,
do_not_reload_embeddings
=
True
,
)
)
if
preview_from_txt2img
:
if
preview_from_txt2img
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment