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
e368cd28
Commit
e368cd28
authored
Jun 09, 2024
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stylistic changes for #15978
parent
981abbb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
modules/images.py
modules/images.py
+2
-2
No files found.
modules/images.py
View file @
e368cd28
...
@@ -377,7 +377,7 @@ def get_sampler_scheduler(p, sampler):
...
@@ -377,7 +377,7 @@ def get_sampler_scheduler(p, sampler):
class
FilenameGenerator
:
class
FilenameGenerator
:
replacements
=
{
replacements
=
{
'basename'
:
lambda
self
:
'img'
if
self
.
basename
==
''
else
self
.
basename
,
'basename'
:
lambda
self
:
self
.
basename
or
'img'
,
'seed'
:
lambda
self
:
self
.
seed
if
self
.
seed
is
not
None
else
''
,
'seed'
:
lambda
self
:
self
.
seed
if
self
.
seed
is
not
None
else
''
,
'seed_first'
:
lambda
self
:
self
.
seed
if
self
.
p
.
batch_size
==
1
else
self
.
p
.
all_seeds
[
0
],
'seed_first'
:
lambda
self
:
self
.
seed
if
self
.
p
.
batch_size
==
1
else
self
.
p
.
all_seeds
[
0
],
'seed_last'
:
lambda
self
:
NOTHING_AND_SKIP_PREVIOUS_TEXT
if
self
.
p
.
batch_size
==
1
else
self
.
p
.
all_seeds
[
-
1
],
'seed_last'
:
lambda
self
:
NOTHING_AND_SKIP_PREVIOUS_TEXT
if
self
.
p
.
batch_size
==
1
else
self
.
p
.
all_seeds
[
-
1
],
...
@@ -651,7 +651,7 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
...
@@ -651,7 +651,7 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
txt_fullfn (`str` or None):
txt_fullfn (`str` or None):
If a text file is saved for this image, this will be its full path. Otherwise None.
If a text file is saved for this image, this will be its full path. Otherwise None.
"""
"""
namegen
=
FilenameGenerator
(
p
,
seed
,
prompt
,
image
,
zip
=
False
,
basename
=
basename
)
namegen
=
FilenameGenerator
(
p
,
seed
,
prompt
,
image
,
basename
=
basename
)
# WebP and JPG formats have maximum dimension limits of 16383 and 65535 respectively. switch to PNG which has a much higher limit
# WebP and JPG formats have maximum dimension limits of 16383 and 65535 respectively. switch to PNG which has a much higher limit
if
(
image
.
height
>
65535
or
image
.
width
>
65535
)
and
extension
.
lower
()
in
(
"jpg"
,
"jpeg"
)
or
(
image
.
height
>
16383
or
image
.
width
>
16383
)
and
extension
.
lower
()
==
"webp"
:
if
(
image
.
height
>
65535
or
image
.
width
>
65535
)
and
extension
.
lower
()
in
(
"jpg"
,
"jpeg"
)
or
(
image
.
height
>
16383
or
image
.
width
>
16383
)
and
extension
.
lower
()
==
"webp"
:
...
...
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