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
bc43293c
Commit
bc43293c
authored
Jan 04, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix incorrect display/calculation for number of steps for hires fix in progress bars
parent
81490780
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
processing.py
modules/processing.py
+6
-3
sd_samplers.py
modules/sd_samplers.py
+3
-2
shared.py
modules/shared.py
+3
-1
No files found.
modules/processing.py
View file @
bc43293c
...
...
@@ -685,10 +685,13 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
def
init
(
self
,
all_prompts
,
all_seeds
,
all_subseeds
):
if
self
.
enable_hr
:
if
state
.
job_count
==
-
1
:
state
.
job_count
=
self
.
n_iter
*
2
else
:
if
not
state
.
processing_has_refined_job_count
:
if
state
.
job_count
==
-
1
:
state
.
job_count
=
self
.
n_iter
shared
.
total_tqdm
.
updateTotal
((
self
.
steps
+
(
self
.
hr_second_pass_steps
or
self
.
steps
))
*
state
.
job_count
)
state
.
job_count
=
state
.
job_count
*
2
state
.
processing_has_refined_job_count
=
True
if
self
.
hr_resize_x
==
0
and
self
.
hr_resize_y
==
0
:
self
.
extra_generation_params
[
"Hires upscale"
]
=
self
.
hr_scale
...
...
modules/sd_samplers.py
View file @
bc43293c
...
...
@@ -97,8 +97,9 @@ sampler_extra_params = {
def
setup_img2img_steps
(
p
,
steps
=
None
):
if
opts
.
img2img_fix_steps
or
steps
is
not
None
:
steps
=
int
((
steps
or
p
.
steps
)
/
min
(
p
.
denoising_strength
,
0.999
))
if
p
.
denoising_strength
>
0
else
0
t_enc
=
p
.
steps
-
1
requested_steps
=
(
steps
or
p
.
steps
)
steps
=
int
(
requested_steps
/
min
(
p
.
denoising_strength
,
0.999
))
if
p
.
denoising_strength
>
0
else
0
t_enc
=
requested_steps
-
1
else
:
steps
=
p
.
steps
t_enc
=
int
(
min
(
p
.
denoising_strength
,
0.999
)
*
steps
)
...
...
modules/shared.py
View file @
bc43293c
...
...
@@ -153,6 +153,7 @@ class State:
job
=
""
job_no
=
0
job_count
=
0
processing_has_refined_job_count
=
False
job_timestamp
=
'0'
sampling_step
=
0
sampling_steps
=
0
...
...
@@ -194,6 +195,7 @@ class State:
def
begin
(
self
):
self
.
sampling_step
=
0
self
.
job_count
=
-
1
self
.
processing_has_refined_job_count
=
False
self
.
job_no
=
0
self
.
job_timestamp
=
datetime
.
datetime
.
now
()
.
strftime
(
"
%
Y
%
m
%
d
%
H
%
M
%
S"
)
self
.
current_latent
=
None
...
...
@@ -608,7 +610,7 @@ class TotalTQDM:
return
if
self
.
_tqdm
is
None
:
self
.
reset
()
self
.
_tqdm
.
total
=
new_total
self
.
_tqdm
.
total
=
new_total
def
clear
(
self
):
if
self
.
_tqdm
is
not
None
:
...
...
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