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
771ea212
Commit
771ea212
authored
Mar 24, 2023
by
pieresimakp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added button to grab the width and height from the loaded image in img2img
parent
a9fed7c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
javascript/hints.js
javascript/hints.js
+1
-0
modules/ui.py
modules/ui.py
+5
-2
No files found.
javascript/hints.js
View file @
771ea212
...
@@ -9,6 +9,7 @@ titles = {
...
@@ -9,6 +9,7 @@ titles = {
"
UniPC
"
:
"
Unified Predictor-Corrector Framework for Fast Sampling of Diffusion Models
"
,
"
UniPC
"
:
"
Unified Predictor-Corrector Framework for Fast Sampling of Diffusion Models
"
,
"
DPM adaptive
"
:
"
Ignores step count - uses a number of steps determined by the CFG and resolution
"
,
"
DPM adaptive
"
:
"
Ignores step count - uses a number of steps determined by the CFG and resolution
"
,
"
\
u{1F4D0}
"
:
"
Auto detect size from img2img
"
,
"
Batch count
"
:
"
How many batches of images to create (has no impact on generation performance or VRAM usage)
"
,
"
Batch count
"
:
"
How many batches of images to create (has no impact on generation performance or VRAM usage)
"
,
"
Batch size
"
:
"
How many image to create in a single batch (increases generation performance at cost of higher VRAM usage)
"
,
"
Batch size
"
:
"
How many image to create in a single batch (increases generation performance at cost of higher VRAM usage)
"
,
"
CFG Scale
"
:
"
Classifier Free Guidance Scale - how strongly the image should conform to prompt - lower values produce more creative results
"
,
"
CFG Scale
"
:
"
Classifier Free Guidance Scale - how strongly the image should conform to prompt - lower values produce more creative results
"
,
...
...
modules/ui.py
View file @
771ea212
...
@@ -92,7 +92,7 @@ apply_style_symbol = '\U0001f4cb' # 📋
...
@@ -92,7 +92,7 @@ apply_style_symbol = '\U0001f4cb' # 📋
clear_prompt_symbol
=
'
\U0001F5D1
'
# 🗑️
clear_prompt_symbol
=
'
\U0001F5D1
'
# 🗑️
extra_networks_symbol
=
'
\U0001F3B4
'
# 🎴
extra_networks_symbol
=
'
\U0001F3B4
'
# 🎴
switch_values_symbol
=
'
\U000021C5
'
# ⇅
switch_values_symbol
=
'
\U000021C5
'
# ⇅
detect_image_size_symbol
=
'
\U0001F4D0
'
# 📐
def
plaintext_to_html
(
text
):
def
plaintext_to_html
(
text
):
return
ui_common
.
plaintext_to_html
(
text
)
return
ui_common
.
plaintext_to_html
(
text
)
...
@@ -756,8 +756,10 @@ def create_ui():
...
@@ -756,8 +756,10 @@ def create_ui():
with
gr
.
Column
(
elem_id
=
"img2img_column_size"
,
scale
=
4
):
with
gr
.
Column
(
elem_id
=
"img2img_column_size"
,
scale
=
4
):
width
=
gr
.
Slider
(
minimum
=
64
,
maximum
=
2048
,
step
=
8
,
label
=
"Width"
,
value
=
512
,
elem_id
=
"img2img_width"
)
width
=
gr
.
Slider
(
minimum
=
64
,
maximum
=
2048
,
step
=
8
,
label
=
"Width"
,
value
=
512
,
elem_id
=
"img2img_width"
)
height
=
gr
.
Slider
(
minimum
=
64
,
maximum
=
2048
,
step
=
8
,
label
=
"Height"
,
value
=
512
,
elem_id
=
"img2img_height"
)
height
=
gr
.
Slider
(
minimum
=
64
,
maximum
=
2048
,
step
=
8
,
label
=
"Height"
,
value
=
512
,
elem_id
=
"img2img_height"
)
detect_image_size_btn
=
ToolButton
(
value
=
detect_image_size_symbol
,
elem_id
=
"img2img_detect_image_size_btn"
)
res_switch_btn
=
ToolButton
(
value
=
switch_values_symbol
,
elem_id
=
"img2img_res_switch_btn"
)
res_switch_btn
=
ToolButton
(
value
=
switch_values_symbol
,
elem_id
=
"img2img_res_switch_btn"
)
if
opts
.
dimensions_and_batch_together
:
if
opts
.
dimensions_and_batch_together
:
with
gr
.
Column
(
elem_id
=
"img2img_column_batch"
):
with
gr
.
Column
(
elem_id
=
"img2img_column_batch"
):
batch_count
=
gr
.
Slider
(
minimum
=
1
,
step
=
1
,
label
=
'Batch count'
,
value
=
1
,
elem_id
=
"img2img_batch_count"
)
batch_count
=
gr
.
Slider
(
minimum
=
1
,
step
=
1
,
label
=
'Batch count'
,
value
=
1
,
elem_id
=
"img2img_batch_count"
)
...
@@ -904,6 +906,7 @@ def create_ui():
...
@@ -904,6 +906,7 @@ def create_ui():
img2img_prompt
.
submit
(
**
img2img_args
)
img2img_prompt
.
submit
(
**
img2img_args
)
submit
.
click
(
**
img2img_args
)
submit
.
click
(
**
img2img_args
)
detect_image_size_btn
.
click
(
lambda
i
,
w
,
h
:
i
.
size
if
i
is
not
None
else
(
w
,
h
),
inputs
=
[
init_img
,
width
,
height
],
outputs
=
[
width
,
height
])
res_switch_btn
.
click
(
lambda
w
,
h
:
(
h
,
w
),
inputs
=
[
width
,
height
],
outputs
=
[
width
,
height
])
res_switch_btn
.
click
(
lambda
w
,
h
:
(
h
,
w
),
inputs
=
[
width
,
height
],
outputs
=
[
width
,
height
])
img2img_interrogate
.
click
(
img2img_interrogate
.
click
(
...
...
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