Closed akx closed 12 months ago
WDYT @adieyal?
Attention: 1 lines
in your changes are missing coverage. Please review.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Files | Coverage Δ | |
---|---|---|
src/dynamicprompts/commands/__init__.py | 100.00% <100.00%> (ø) |
|
src/dynamicprompts/commands/wrap_command.py | 100.00% <100.00%> (ø) |
|
src/dynamicprompts/parser/config.py | 100.00% <100.00%> (ø) |
|
src/dynamicprompts/parser/parse.py | 98.37% <100.00%> (+0.07%) |
:arrow_up: |
src/dynamicprompts/samplers/combinatorial.py | 97.56% <100.00%> (+0.15%) |
:arrow_up: |
src/dynamicprompts/samplers/random.py | 96.00% <100.00%> (+0.44%) |
:arrow_up: |
src/dynamicprompts/sampling_result.py | 100.00% <100.00%> (ø) |
|
tests/test_wrapping.py | 100.00% <100.00%> (ø) |
|
tests/utils.py | 100.00% <100.00%> (ø) |
|
tests/wildcard/test_wildcardmanager.py | 100.00% <ø> (ø) |
|
... and 1 more |
:loudspeaker: Thoughts on this report? Let us know!
WDYT @adieyal?
I like the general idea of infill, although it feels a little complicated to use. Is the %
necessary? Can we not assume that ellipses in the wrapper mean infill? I don't think that would break any existing workflows since the wrappers was only used as a separator before.
Do you have any concrete use cases that you've used it for?
I like the general idea of infill, although it feels a little complicated to use. Is the
%
necessary? Can we not assume that ellipses in the wrapper mean infill? I don't think that would break any existing workflows since the wrappers was only used as a separator before.
I agree it's a bit unwieldy. Without some sort of syntax like this, how would the wrapper know what to wrap? The examples from the tests are
%{__wrappers__$${fox|cow}}
(using templates from wildcards to wrap two possible variations)%{happy ... on a meadow$${fox|cow}}
(using a verbatim string to wrap two possible variations)%{ {cool|hot} ...$${fox|cow}}
(using a variation command in the wrapper part too)Do you have any concrete use cases that you've used it for?
I've ported the Fooocus style templates from https://github.com/lllyasviel/Fooocus/tree/main/sdxl_styles to wrapping wildcards, and have had fun with that; please enjoy this stably diffused melon:
@adieyal WDYT, should we merge this? I don't think the %{a...c$$b}
syntax should be breaking any current workflows, even if it is a bit unwieldy (if someone comes up with a lighter-weight syntax later, we could ship that too)?
Hey. I went through it this weekend. I think it's a great feature but I was struggling to get it to work. Kept getting syntax errors with my prompts (although the tests passed so I'm not sure why).
Let's merge it if you're happy that it's ready. I'll add to the docs once I've figured out what I'm doing wrong.
On Mon, 20 Nov 2023, 08:54 Aarni Koskela, @.***> wrote:
@adieyal https://github.com/adieyal WDYT, should we merge this? I don't think the %{a...c$$b} syntax should be breaking any current workflows, even if it is a bit unwieldy (if someone comes up with a lighter-weight syntax later, we could ship that too)?
— Reply to this email directly, view it on GitHub https://github.com/adieyal/dynamicprompts/pull/102#issuecomment-1818337528, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADGXMRQWTW4A46LJU6WW2TYFL5CJAVCNFSM6AAAAAA7AF44CWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJYGMZTONJSHA . You are receiving this because you were mentioned.Message ID: @.***>
This PR adds a new wrap command.
The test says it all:
"%{__wrappers__$${fox|cow}}"
wrappers
withArt Deco, ..., sleek, geometric forms, art deco style
Pop Art, ...., vivid colors, flat color, 2D, strong lines, Pop Art
Art Deco, cow, sleek, geometric forms, art deco style
Art Deco, fox, sleek, geometric forms, art deco style
Pop Art, cow, vivid colors, flat color, 2D, strong lines, Pop Art
Pop Art, fox, vivid colors, flat color, 2D, strong lines, Pop Art
IOW, a marker string (3+ regular dots, or 1+ Unicode ellipsis character) within the
wrapper
component of the wrap command will be replaced with theinner
command's sampling result.This also works for things other than wildcards (despite the branch name):
...