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
f8210514
Commit
f8210514
authored
May 22, 2023
by
Kohaku-Blueleaf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change karras to kdiffusion
parent
e6269cba
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
25 deletions
+25
-25
modules/processing.py
modules/processing.py
+4
-4
modules/shared.py
modules/shared.py
+1
-1
modules/ui.py
modules/ui.py
+16
-16
scripts/xyz_grid.py
scripts/xyz_grid.py
+4
-4
No files found.
modules/processing.py
View file @
f8210514
...
...
@@ -564,10 +564,10 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
"Steps"
:
p
.
steps
,
"Sampler"
:
p
.
sampler_name
,
"Enable Custom Karras Schedule"
:
p
.
enable_karras
,
"
Karras
Scheduler Type"
:
p
.
k_sched_type
,
"
Karras
Scheduler sigma_max"
:
p
.
sigma_max
,
"
Karras
Scheduler sigma_min"
:
p
.
sigma_min
,
"
Karras
Scheduler rho"
:
p
.
rho
,
"
kdiffusion
Scheduler Type"
:
p
.
k_sched_type
,
"
kdiffusion
Scheduler sigma_max"
:
p
.
sigma_max
,
"
kdiffusion
Scheduler sigma_min"
:
p
.
sigma_min
,
"
kdiffusion
Scheduler rho"
:
p
.
rho
,
"CFG scale"
:
p
.
cfg_scale
,
"Image CFG scale"
:
getattr
(
p
,
'image_cfg_scale'
,
None
),
"Seed"
:
all_seeds
[
index
],
...
...
modules/shared.py
View file @
f8210514
...
...
@@ -47,7 +47,7 @@ ui_reorder_categories = [
"inpaint"
,
"sampler"
,
"checkboxes"
,
"k
arras
_scheduler"
,
"k
diffusion
_scheduler"
,
"hires_fix"
,
"dimensions"
,
"cfg"
,
...
...
modules/ui.py
View file @
f8210514
...
...
@@ -484,7 +484,7 @@ def create_ui():
with
FormRow
(
elem_classes
=
"checkboxes-row"
,
variant
=
"compact"
):
restore_faces
=
gr
.
Checkbox
(
label
=
'Restore faces'
,
value
=
False
,
visible
=
len
(
shared
.
face_restorers
)
>
1
,
elem_id
=
"txt2img_restore_faces"
)
tiling
=
gr
.
Checkbox
(
label
=
'Tiling'
,
value
=
False
,
elem_id
=
"txt2img_tiling"
)
t2i_enable_k_sched
=
gr
.
Checkbox
(
label
=
'Custom K
arras
Scheduler'
,
value
=
False
,
elem_id
=
"txt2img_enable_k_sched"
)
t2i_enable_k_sched
=
gr
.
Checkbox
(
label
=
'Custom K
Diffusion
Scheduler'
,
value
=
False
,
elem_id
=
"txt2img_enable_k_sched"
)
enable_hr
=
gr
.
Checkbox
(
label
=
'Hires. fix'
,
value
=
False
,
elem_id
=
"txt2img_enable_hr"
)
hr_final_resolution
=
FormHTML
(
value
=
""
,
elem_id
=
"txtimg_hr_finalres"
,
label
=
"Upscaled resolution"
,
interactive
=
False
)
...
...
@@ -511,9 +511,9 @@ def create_ui():
with
gr
.
Row
():
hr_negative_prompt
=
gr
.
Textbox
(
label
=
"Negative prompt"
,
elem_id
=
"hires_neg_prompt"
,
show_label
=
False
,
lines
=
3
,
placeholder
=
"Negative prompt for hires fix pass.
\n
Leave empty to use the same negative prompt as in first pass."
,
elem_classes
=
[
"prompt"
])
elif
category
==
"k
arras
_scheduler"
:
with
FormGroup
(
visible
=
False
,
elem_id
=
"txt2img_k
arras
_scheduler"
)
as
t2i_k_sched_options
:
with
FormRow
(
elem_id
=
"txt2img_k
arras
_scheduler_row1"
,
variant
=
"compact"
):
elif
category
==
"k
diffusion
_scheduler"
:
with
FormGroup
(
visible
=
False
,
elem_id
=
"txt2img_k
diffusion
_scheduler"
)
as
t2i_k_sched_options
:
with
FormRow
(
elem_id
=
"txt2img_k
diffusion
_scheduler_row1"
,
variant
=
"compact"
):
t2i_k_sched_type
=
gr
.
Dropdown
(
label
=
"Type"
,
elem_id
=
"t2i_k_sched_type"
,
choices
=
[
'karras'
,
'exponential'
,
'polyexponential'
],
value
=
'karras'
)
t2i_k_sched_sigma_min
=
gr
.
Slider
(
minimum
=
0.0
,
maximum
=
0.5
,
step
=
0.05
,
label
=
'sigma min'
,
value
=
0.1
,
elem_id
=
"txt2img_sigma_min"
)
t2i_k_sched_sigma_max
=
gr
.
Slider
(
minimum
=
5.0
,
maximum
=
50.0
,
step
=
0.1
,
label
=
'sigma max'
,
value
=
10.0
,
elem_id
=
"txt2img_sigma_max"
)
...
...
@@ -677,10 +677,10 @@ def create_ui():
(
hr_negative_prompt
,
"Hires negative prompt"
),
(
hr_prompts_container
,
lambda
d
:
gr
.
update
(
visible
=
True
)
if
d
.
get
(
"Hires prompt"
,
""
)
!=
""
or
d
.
get
(
"Hires negative prompt"
,
""
)
!=
""
else
gr
.
update
()),
(
t2i_enable_k_sched
,
"Enable Custom Karras Schedule"
),
(
t2i_k_sched_type
,
"K
arras
Scheduler Type"
),
(
t2i_k_sched_sigma_max
,
"K
arras
Scheduler sigma_max"
),
(
t2i_k_sched_sigma_min
,
"K
arras
Scheduler sigma_min"
),
(
t2i_k_sched_rho
,
"K
arras
Scheduler rho"
),
(
t2i_k_sched_type
,
"K
Diffusion
Scheduler Type"
),
(
t2i_k_sched_sigma_max
,
"K
Diffusion
Scheduler sigma_max"
),
(
t2i_k_sched_sigma_min
,
"K
Diffusion
Scheduler sigma_min"
),
(
t2i_k_sched_rho
,
"K
Diffusion
Scheduler rho"
),
*
modules
.
scripts
.
scripts_txt2img
.
infotext_fields
]
parameters_copypaste
.
add_paste_fields
(
"txt2img"
,
None
,
txt2img_paste_fields
,
override_settings
)
...
...
@@ -872,11 +872,11 @@ def create_ui():
with
FormRow
(
elem_classes
=
"checkboxes-row"
,
variant
=
"compact"
):
restore_faces
=
gr
.
Checkbox
(
label
=
'Restore faces'
,
value
=
False
,
visible
=
len
(
shared
.
face_restorers
)
>
1
,
elem_id
=
"img2img_restore_faces"
)
tiling
=
gr
.
Checkbox
(
label
=
'Tiling'
,
value
=
False
,
elem_id
=
"img2img_tiling"
)
i2i_enable_k_sched
=
gr
.
Checkbox
(
label
=
'Custom K
arras
Scheduler'
,
value
=
False
,
elem_id
=
"txt2img_enable_k_sched"
)
i2i_enable_k_sched
=
gr
.
Checkbox
(
label
=
'Custom K
Diffusion
Scheduler'
,
value
=
False
,
elem_id
=
"txt2img_enable_k_sched"
)
elif
category
==
"k
arras
_scheduler"
:
with
FormGroup
(
visible
=
False
,
elem_id
=
"img2img_k
arras
_scheduler"
)
as
i2i_k_sched_options
:
with
FormRow
(
elem_id
=
"img2img_k
arras
_scheduler_row1"
,
variant
=
"compact"
):
elif
category
==
"k
diffusion
_scheduler"
:
with
FormGroup
(
visible
=
False
,
elem_id
=
"img2img_k
diffusion
_scheduler"
)
as
i2i_k_sched_options
:
with
FormRow
(
elem_id
=
"img2img_k
diffusion
_scheduler_row1"
,
variant
=
"compact"
):
i2i_k_sched_type
=
gr
.
Dropdown
(
label
=
"Type"
,
elem_id
=
"t2i_k_sched_type"
,
choices
=
[
'karras'
,
'exponential'
,
'polyexponential'
],
value
=
'karras'
)
i2i_k_sched_sigma_min
=
gr
.
Slider
(
minimum
=
0.0
,
maximum
=
0.5
,
step
=
0.05
,
label
=
'sigma min'
,
value
=
0.1
,
elem_id
=
"txt2img_sigma_min"
)
i2i_k_sched_sigma_max
=
gr
.
Slider
(
minimum
=
5.0
,
maximum
=
50.0
,
step
=
0.1
,
label
=
'sigma max'
,
value
=
10.0
,
elem_id
=
"txt2img_sigma_max"
)
...
...
@@ -1091,10 +1091,10 @@ def create_ui():
(
sampler_index
,
"Sampler"
),
(
restore_faces
,
"Face restoration"
),
(
i2i_enable_k_sched
,
"Enable Custom Karras Schedule"
),
(
i2i_k_sched_type
,
"K
arras
Scheduler Type"
),
(
i2i_k_sched_sigma_max
,
"K
arras
Scheduler sigma_max"
),
(
i2i_k_sched_sigma_min
,
"K
arras
Scheduler sigma_min"
),
(
i2i_k_sched_rho
,
"K
arras
Scheduler rho"
),
(
i2i_k_sched_type
,
"K
Diffusion
Scheduler Type"
),
(
i2i_k_sched_sigma_max
,
"K
Diffusion
Scheduler sigma_max"
),
(
i2i_k_sched_sigma_min
,
"K
Diffusion
Scheduler sigma_min"
),
(
i2i_k_sched_rho
,
"K
Diffusion
Scheduler rho"
),
(
cfg_scale
,
"CFG scale"
),
(
image_cfg_scale
,
"Image CFG scale"
),
(
seed
,
"Seed"
),
...
...
scripts/xyz_grid.py
View file @
f8210514
...
...
@@ -220,10 +220,10 @@ axis_options = [
AxisOption
(
"Sigma min"
,
float
,
apply_field
(
"s_tmin"
)),
AxisOption
(
"Sigma max"
,
float
,
apply_field
(
"s_tmax"
)),
AxisOption
(
"Sigma noise"
,
float
,
apply_field
(
"s_noise"
)),
AxisOption
(
"K
arras
Scheduler Type"
,
str
,
apply_field
(
"k_sched_type"
),
choices
=
lambda
:
[
x
for
x
in
sd_samplers_kdiffusion
.
k_diffusion_scheduler
]),
AxisOption
(
"K
arras
Scheduler Sigma Min"
,
float
,
apply_field
(
"sigma_min"
)),
AxisOption
(
"K
arras
Scheduler Sigma Max"
,
float
,
apply_field
(
"sigma_max"
)),
AxisOption
(
"K
arras
Scheduler rho"
,
float
,
apply_field
(
"rho"
)),
AxisOption
(
"K
Diffusion
Scheduler Type"
,
str
,
apply_field
(
"k_sched_type"
),
choices
=
lambda
:
[
x
for
x
in
sd_samplers_kdiffusion
.
k_diffusion_scheduler
]),
AxisOption
(
"K
Diffusion
Scheduler Sigma Min"
,
float
,
apply_field
(
"sigma_min"
)),
AxisOption
(
"K
Diffusion
Scheduler Sigma Max"
,
float
,
apply_field
(
"sigma_max"
)),
AxisOption
(
"K
Diffusion
Scheduler rho"
,
float
,
apply_field
(
"rho"
)),
AxisOption
(
"Eta"
,
float
,
apply_field
(
"eta"
)),
AxisOption
(
"Clip skip"
,
int
,
apply_clip_skip
),
AxisOption
(
"Denoising"
,
float
,
apply_field
(
"denoising_strength"
)),
...
...
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