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
47ed9b2d
Commit
47ed9b2d
authored
Apr 08, 2024
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow list or callables in generation_params
parent
6efdfe32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
modules/processing.py
modules/processing.py
+10
-0
No files found.
modules/processing.py
View file @
47ed9b2d
...
@@ -756,6 +756,16 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
...
@@ -756,6 +756,16 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
"User"
:
p
.
user
if
opts
.
add_user_name_to_info
else
None
,
"User"
:
p
.
user
if
opts
.
add_user_name_to_info
else
None
,
}
}
for
key
,
value
in
generation_params
.
items
():
try
:
if
isinstance
(
value
,
list
):
generation_params
[
key
]
=
value
[
index
]
elif
callable
(
value
):
generation_params
[
key
]
=
value
(
**
locals
())
except
Exception
:
errors
.
report
(
f
'Error creating infotext for key "{key}"'
,
exc_info
=
True
)
generation_params
[
key
]
=
None
if
all_hr_prompts
:
=
all_hr_prompts
or
getattr
(
p
,
'all_hr_prompts'
,
None
):
if
all_hr_prompts
:
=
all_hr_prompts
or
getattr
(
p
,
'all_hr_prompts'
,
None
):
generation_params
[
'Hires prompt'
]
=
all_hr_prompts
[
index
]
if
all_hr_prompts
[
index
]
!=
all_prompts
[
index
]
else
None
generation_params
[
'Hires prompt'
]
=
all_hr_prompts
[
index
]
if
all_hr_prompts
[
index
]
!=
all_prompts
[
index
]
else
None
if
all_hr_negative_prompts
:
=
all_hr_negative_prompts
or
getattr
(
p
,
'all_hr_negative_prompts'
,
None
):
if
all_hr_negative_prompts
:
=
all_hr_negative_prompts
or
getattr
(
p
,
'all_hr_negative_prompts'
,
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