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
a71b7b5e
Commit
a71b7b5e
authored
Mar 12, 2023
by
Alex "mcmonkey" Goodwin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
relocate filename length limit to better spot
parent
7fd19fa4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
modules/images.py
modules/images.py
+4
-3
No files found.
modules/images.py
View file @
a71b7b5e
...
@@ -512,9 +512,6 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
...
@@ -512,9 +512,6 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
file_decoration
=
"-"
+
file_decoration
file_decoration
=
"-"
+
file_decoration
file_decoration
=
namegen
.
apply
(
file_decoration
)
+
suffix
file_decoration
=
namegen
.
apply
(
file_decoration
)
+
suffix
if
hasattr
(
os
,
'statvfs'
):
max_name_len
=
os
.
statvfs
(
path
)
.
f_namemax
file_decoration
=
file_decoration
[:
max_name_len
-
5
]
if
add_number
:
if
add_number
:
basecount
=
get_next_sequence_number
(
path
,
basename
)
basecount
=
get_next_sequence_number
(
path
,
basename
)
...
@@ -576,6 +573,10 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
...
@@ -576,6 +573,10 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
os
.
replace
(
temp_file_path
,
filename_without_extension
+
extension
)
os
.
replace
(
temp_file_path
,
filename_without_extension
+
extension
)
fullfn_without_extension
,
extension
=
os
.
path
.
splitext
(
params
.
filename
)
fullfn_without_extension
,
extension
=
os
.
path
.
splitext
(
params
.
filename
)
if
hasattr
(
os
,
'statvfs'
):
max_name_len
=
os
.
statvfs
(
path
)
.
f_namemax
fullfn_without_extension
=
fullfn_without_extension
[:
max_name_len
-
len
(
extension
)]
params
.
filename
=
fullfn_without_extension
+
extension
_atomically_save_image
(
image
,
fullfn_without_extension
,
extension
)
_atomically_save_image
(
image
,
fullfn_without_extension
,
extension
)
image
.
already_saved_as
=
fullfn
image
.
already_saved_as
=
fullfn
...
...
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