mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
new line means break
This commit is contained in:
+2
-1
@@ -23,7 +23,8 @@
|
||||
- Fix **DPM SDE** scheduler
|
||||
- Better support for SD 1.5 **inpainting** models
|
||||
- Add support for **OpenAI Consistency decoder VAE**
|
||||
- Enhance prompt parsing with long prompts and support for *BREAK* keyword
|
||||
- Enhance prompt parsing with long prompts and support for *BREAK* keyword
|
||||
Change-in-behavior: new line in prompt now means *BREAK*
|
||||
- Update to `diffusers==0.23.0`
|
||||
- **Extra networks**
|
||||
- Use multi-threading for 5x load speedup
|
||||
|
||||
@@ -14,7 +14,7 @@ from typing import List
|
||||
import lark
|
||||
import torch
|
||||
from compel import Compel
|
||||
from modules.shared import opts, log
|
||||
from modules.shared import opts, log, backend, Backend
|
||||
|
||||
# a prompt like this: "fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tree:0.75][ in foreground::0.6][ in background:0.25] [shoddy:masterful:0.5]"
|
||||
# will be represented with prompt_schedule like this (assuming steps=100):
|
||||
@@ -320,7 +320,10 @@ def parse_prompt_attention(text):
|
||||
whitespace = ''
|
||||
else:
|
||||
re_attention = re_attention_v1
|
||||
text = text.replace('\\n', ' ')
|
||||
if backend == Backend.DIFFUSERS:
|
||||
text = text.replace('\n', ' BREAK ')
|
||||
else:
|
||||
text = text.replace('\n', ' ')
|
||||
whitespace = ' '
|
||||
|
||||
def multiply_range(start_position, multiplier):
|
||||
|
||||
Reference in New Issue
Block a user