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
eb007e58
Commit
eb007e58
authored
Oct 23, 2022
by
w-e-w
Committed by
AUTOMATIC1111
Oct 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use the same datetime object for [date] and [datetime]
parent
5a981310
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
modules/images.py
modules/images.py
+3
-2
No files found.
modules/images.py
View file @
eb007e58
...
...
@@ -302,8 +302,9 @@ def apply_filename_pattern(x, p, seed, prompt):
x
=
re
.
sub
(
r'\[sampler]'
,
sanitize_filename_part
(
sd_samplers
.
samplers
[
p
.
sampler_index
]
.
name
,
replace_spaces
=
False
),
x
,
flags
=
re
.
IGNORECASE
)
x
=
re
.
sub
(
r'\[model_hash]'
,
getattr
(
p
,
"sd_model_hash"
,
shared
.
sd_model
.
sd_model_hash
),
x
,
flags
=
re
.
IGNORECASE
)
x
=
re
.
sub
(
r'\[date]'
,
datetime
.
date
.
today
()
.
isoformat
(),
x
,
flags
=
re
.
IGNORECASE
)
x
=
replace_datetime
(
x
,
datetime
.
datetime
.
now
())
current_time
=
datetime
.
datetime
.
now
()
x
=
re
.
sub
(
r'\[date]'
,
current_time
.
strftime
(
'
%
Y-
%
m-
%
d'
),
x
,
flags
=
re
.
IGNORECASE
)
x
=
replace_datetime
(
x
,
current_time
)
# replace [datetime], [datetime<Format>], [datetime<Format><Time Zone>]
x
=
re
.
sub
(
r'\[job_timestamp]'
,
getattr
(
p
,
"job_timestamp"
,
shared
.
state
.
job_timestamp
),
x
,
flags
=
re
.
IGNORECASE
)
# Apply [prompt] at last. Because it may contain any replacement word.^M
if
prompt
is
not
None
:
...
...
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