Skip to content

Edit-attention fixes#13533

Merged
AUTOMATIC1111 merged 6 commits into
AUTOMATIC1111:devfrom
missionfloyd:edit-attention-fix
Oct 15, 2023
Merged

Edit-attention fixes#13533
AUTOMATIC1111 merged 6 commits into
AUTOMATIC1111:devfrom
missionfloyd:edit-attention-fix

Conversation

@missionfloyd

@missionfloyd missionfloyd commented Oct 7, 2023

Copy link
Copy Markdown
Collaborator

Currently, if the cursor is inside parentheses or angle brackets that aren't an (emphasis:1.0) block, Ctrl+Up/Down does nothing.

Fixes it by using regular expressions to more accurately check if selected text is inside an emphasis block.

If selected text is inside (parentheses) or [square brackets], as with old-style emphasis blocks, they'll be ((added)) or removed accordingly, or optionally converted to (numeric:1.1).

Checklist:

@SirVeggie

Copy link
Copy Markdown

Instead of adding more parenthesis ((thing)) around the word, maybe it could transform it into (thing:1.2) instead.

Fix square brackets multiplier
@AUTOMATIC1111 AUTOMATIC1111 merged commit a3d9b01 into AUTOMATIC1111:dev Oct 15, 2023
@missionfloyd missionfloyd deleted the edit-attention-fix branch October 15, 2023 09:01
@AUTOMATIC1111

Copy link
Copy Markdown
Owner

this breaks if you attempt to edit b in (a:1.1) b (c:1.1)

@catboxanon

catboxanon commented Oct 20, 2023

Copy link
Copy Markdown
Collaborator

test <lora:name:1> doesn't function correctly when attempting to edit test as well.

The behavior is even worse if it's separated by a newline like this. Increasing/decreasing the weight of test at least twice will clear everything that follows. Fixed by 464fbcd

test ... {a bunch more text here}
<lora:name:1>

@catboxanon catboxanon mentioned this pull request Nov 3, 2023
4 tasks
@w-e-w w-e-w mentioned this pull request Dec 4, 2023
@w-e-w w-e-w mentioned this pull request Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants