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
2bb29653
Commit
2bb29653
authored
Mar 06, 2024
by
AUTOMATIC1111
Committed by
GitHub
Mar 06, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15141 from catboxanon/feat/emphasis-infotext-parse
Only override emphasis if actually used in prompt
parents
eee46a50
7785d484
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
modules/infotext_utils.py
modules/infotext_utils.py
+5
-2
No files found.
modules/infotext_utils.py
View file @
2bb29653
...
...
@@ -8,7 +8,7 @@ import sys
import
gradio
as
gr
from
modules.paths
import
data_path
from
modules
import
shared
,
ui_tempdir
,
script_callbacks
,
processing
,
infotext_versions
,
images
from
modules
import
shared
,
ui_tempdir
,
script_callbacks
,
processing
,
infotext_versions
,
images
,
prompt_parser
from
PIL
import
Image
sys
.
modules
[
'modules.generation_parameters_copypaste'
]
=
sys
.
modules
[
__name__
]
# alias for old name
...
...
@@ -356,7 +356,10 @@ Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 965400086, Size: 512x512, Model
if
"Cache FP16 weight for LoRA"
not
in
res
and
res
[
"FP8 weight"
]
!=
"Disable"
:
res
[
"Cache FP16 weight for LoRA"
]
=
False
if
"Emphasis"
not
in
res
:
prompt_attention
=
prompt_parser
.
parse_prompt_attention
(
prompt
)
prompt_attention
+=
prompt_parser
.
parse_prompt_attention
(
negative_prompt
)
prompt_uses_emphasis
=
len
(
prompt_attention
)
!=
len
([
p
for
p
in
prompt_attention
if
p
[
1
]
==
1.0
or
p
[
0
]
==
'BREAK'
])
if
"Emphasis"
not
in
res
and
prompt_uses_emphasis
:
res
[
"Emphasis"
]
=
"Original"
if
"Refiner switch by sampling steps"
not
in
res
:
...
...
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