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
973ae873
Commit
973ae873
authored
May 17, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'pieresimakp/img2img-detect-image-size' into dev
parents
61ee563d
fb72066e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
javascript/hints.js
javascript/hints.js
+1
-0
modules/ui.py
modules/ui.py
+4
-0
No files found.
javascript/hints.js
View file @
973ae873
...
...
@@ -9,6 +9,7 @@ titles = {
"
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
"
,
"
\
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 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
"
,
...
...
modules/ui.py
View file @
973ae873
...
...
@@ -75,6 +75,7 @@ clear_prompt_symbol = '\U0001f5d1\ufe0f' # 🗑️
extra_networks_symbol
=
'
\U0001F3B4
'
# 🎴
switch_values_symbol
=
'
\U000021C5
'
# ⇅
restore_progress_symbol
=
'
\U0001F300
'
# 🌀
detect_image_size_symbol
=
'
\U0001F4D0
'
# 📐
def
plaintext_to_html
(
text
):
...
...
@@ -772,6 +773,7 @@ def create_ui():
height
=
gr
.
Slider
(
minimum
=
64
,
maximum
=
2048
,
step
=
8
,
label
=
"Height"
,
value
=
512
,
elem_id
=
"img2img_height"
)
with
gr
.
Column
(
elem_id
=
"img2img_dimensions_row"
,
scale
=
1
,
elem_classes
=
"dimensions-tools"
):
res_switch_btn
=
ToolButton
(
value
=
switch_values_symbol
,
elem_id
=
"img2img_res_switch_btn"
)
detect_image_size_btn
=
ToolButton
(
value
=
detect_image_size_symbol
,
elem_id
=
"img2img_detect_image_size_btn"
)
with
gr
.
Tab
(
label
=
"Resize by"
)
as
tab_scale_by
:
scale_by
=
gr
.
Slider
(
minimum
=
0.05
,
maximum
=
4.0
,
step
=
0.05
,
label
=
"Scale"
,
value
=
1.0
,
elem_id
=
"img2img_scale"
)
...
...
@@ -965,6 +967,8 @@ def create_ui():
show_progress
=
False
,
)
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
])
img2img_interrogate
.
click
(
fn
=
lambda
*
args
:
process_interrogate
(
interrogate
,
*
args
),
**
interrogate_args
,
...
...
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