Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
ab05a74e
Commit
ab05a74e
authored
Oct 29, 2022
by
Muhammad Rizqi Nur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add cleanup after training"
This reverts commit
3ce2bfdf
.
parent
a27d19de
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
186 additions
and
200 deletions
+186
-200
hypernetwork.py
modules/hypernetworks/hypernetwork.py
+96
-105
textual_inversion.py
modules/textual_inversion/textual_inversion.py
+90
-95
No files found.
modules/hypernetworks/hypernetwork.py
View file @
ab05a74e
...
...
@@ -398,8 +398,6 @@ def train_hypernetwork(hypernetwork_name, learn_rate, batch_size, data_root, log
forced_filename
=
"<none>"
pbar
=
tqdm
.
tqdm
(
enumerate
(
ds
),
total
=
steps
-
ititial_step
)
try
:
for
i
,
entries
in
pbar
:
hypernetwork
.
step
=
i
+
ititial_step
if
len
(
loss_dict
)
>
0
:
...
...
@@ -512,13 +510,6 @@ Last saved hypernetwork: {html.escape(last_saved_file)}<br/>
Last saved image: {html.escape(last_saved_image)}<br/>
</p>
"""
finally
:
if
weights
:
for
weight
in
weights
:
weight
.
requires_grad
=
False
if
unload
:
shared
.
sd_model
.
cond_stage_model
.
to
(
devices
.
device
)
shared
.
sd_model
.
first_stage_model
.
to
(
devices
.
device
)
report_statistics
(
loss_dict
)
checkpoint
=
sd_models
.
select_checkpoint
()
...
...
modules/textual_inversion/textual_inversion.py
View file @
ab05a74e
...
...
@@ -283,8 +283,6 @@ def train_embedding(embedding_name, learn_rate, batch_size, data_root, log_direc
embedding_yet_to_be_embedded
=
False
pbar
=
tqdm
.
tqdm
(
enumerate
(
ds
),
total
=
steps
-
ititial_step
)
try
:
for
i
,
entries
in
pbar
:
embedding
.
step
=
i
+
ititial_step
...
...
@@ -398,9 +396,6 @@ Last saved embedding: {html.escape(last_saved_file)}<br/>
Last saved image: {html.escape(last_saved_image)}<br/>
</p>
"""
finally
:
if
embedding
and
embedding
.
vec
is
not
None
:
embedding
.
vec
.
requires_grad
=
False
checkpoint
=
sd_models
.
select_checkpoint
()
...
...
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