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
3f43d8a9
Commit
3f43d8a9
authored
Jan 11, 2023
by
Vladimir Mandic
Committed by
GitHub
Jan 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set descriptions
parent
45a8b758
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
modules/hypernetworks/hypernetwork.py
modules/hypernetworks/hypernetwork.py
+3
-1
modules/textual_inversion/preprocess.py
modules/textual_inversion/preprocess.py
+6
-1
modules/textual_inversion/textual_inversion.py
modules/textual_inversion/textual_inversion.py
+3
-1
No files found.
modules/hypernetworks/hypernetwork.py
View file @
3f43d8a9
...
...
@@ -619,7 +619,9 @@ def train_hypernetwork(hypernetwork_name, learn_rate, batch_size, gradient_step,
epoch_num
=
hypernetwork
.
step
//
steps_per_epoch
epoch_step
=
hypernetwork
.
step
%
steps_per_epoch
pbar
.
set_description
(
f
"[Epoch {epoch_num}: {epoch_step+1}/{steps_per_epoch}]loss: {loss_step:.7f}"
)
description
=
f
"Training hypernetwork [Epoch {epoch_num}: {epoch_step+1}/{steps_per_epoch}]loss: {loss_step:.7f}"
pbar
.
set_description
(
description
)
shared
.
state
.
textinfo
=
description
if
hypernetwork_dir
is
not
None
and
steps_done
%
save_hypernetwork_every
==
0
:
# Before saving, change name to match current checkpoint.
hypernetwork_name_every
=
f
'{hypernetwork_name}-{steps_done}'
...
...
modules/textual_inversion/preprocess.py
View file @
3f43d8a9
...
...
@@ -135,7 +135,8 @@ def preprocess_work(process_src, process_dst, process_width, process_height, pre
params
.
process_caption_deepbooru
=
process_caption_deepbooru
params
.
preprocess_txt_action
=
preprocess_txt_action
for
index
,
imagefile
in
enumerate
(
tqdm
.
tqdm
(
files
)):
pbar
=
tqdm
.
tqdm
(
files
)
for
index
,
imagefile
in
enumerate
(
pbar
):
params
.
subindex
=
0
filename
=
os
.
path
.
join
(
src
,
imagefile
)
try
:
...
...
@@ -143,6 +144,10 @@ def preprocess_work(process_src, process_dst, process_width, process_height, pre
except
Exception
:
continue
description
=
f
"Preprocessing [Image {index}/{len(files)}]"
pbar
.
set_description
(
description
)
shared
.
state
.
textinfo
=
description
params
.
src
=
filename
existing_caption
=
None
...
...
modules/textual_inversion/textual_inversion.py
View file @
3f43d8a9
...
...
@@ -476,7 +476,9 @@ def train_embedding(embedding_name, learn_rate, batch_size, gradient_step, data_
epoch_num
=
embedding
.
step
//
steps_per_epoch
epoch_step
=
embedding
.
step
%
steps_per_epoch
pbar
.
set_description
(
f
"[Epoch {epoch_num}: {epoch_step+1}/{steps_per_epoch}]loss: {loss_step:.7f}"
)
description
=
f
"Training textual inversion [Epoch {epoch_num}: {epoch_step+1}/{steps_per_epoch}]loss: {loss_step:.7f}"
pbar
.
set_description
(
description
)
shared
.
state
.
textinfo
=
description
if
embedding_dir
is
not
None
and
steps_done
%
save_embedding_every
==
0
:
# Before saving, change name to match current checkpoint.
embedding_name_every
=
f
'{embedding_name}-{steps_done}'
...
...
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