-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternating|Tokens and From:To:When #735
Comments
|
Oh to do it for a single diffusion run you have to use stop/start steps with multiple samplers. As for second one, that sucks. Though this works similarly for me |
I assume you're talking about multiple-sampler retaining noise between each? I cannot imagine doing that in an easy fashion. For a 20 step prompt you'd have to have twenty samplers. I'll have a look at Most surprisingly I've noticed a lot of things that seem to work, but when trying to reduce or test the effects the hypothesis falls apart. The two features of |
Brackets isn't decreased weight, it's decreased steps as far as I am aware. Lowering weight is with parenthesis and just using low weight. Brackets control it's occurrence in the diffusion. So 0.5 would be 50% of the steps, so 10 steps. The issue with ComfyUI is we encode text early to do stuff with it. Combine, mix, etc, to them input into a sampler already encoded. A1111 has text that it encodes on the fly at diffusion time. So each diffusion step it could parse the text differently. |
yeah both features are so powerful...if there is a way to implement them in ComfyUI, that would be great. |
That doesn't make sense considering the I suppose that equally means it doesn't lower the weighting either. I imagine, realistically, the tokens do nothing special but because order/spaces/special characters can be so important that the image is altered slightly and it gives the impression of having an effect. |
To me, the "neon" sign literal portion is being omitted while the colors derived from the initial noise by prompt are the same. Notice int he 0.1 there is less defined "actual" lights, and the signs neon lettering near gone. This is also why I demonstrated weighting the bracketed bit like It may not work as I think it does, but from my testing it seems to, but being just arbitrary without actual defined step control it's very random and hard to control from seed to seed / prompt to prompt. |
I am wondering if there would be value in a custom node that does prepares the prompts but does not encode them until a later node, decoupling these functionalities from the node itself. That could allow for the encoding to occur on or before the sampler in custom nodes or officially supported. I do believe I've found myself wishing more than once to be able to easily append tokens to the prompt without combining the encodings at a later stage for prompt morphing during two/three-resampling stages. |
WAS-NS has text editing nodes to setup prompts before putting through a Text to Conditioning or other Conditioning node. There is also Tokens to save your own custom stuff. The NSP condition nodes under WAS Suite/Conditioning allow you to use As far as true to:from:where, I think we need @comfyanonymous to confirm how to do, or if it even exists. |
Check out my custom node i created. |
I've encountered this exact problem. And I've just developed a solution for that. The idea is to create a Unlike the solution of @taabata, my solution has the potential to support controlnet. However, my solution is messy and requires a lot of nodes (which can be automatically generated using a script included in my repo). The syntax is slightly different form A1111 tho because I don't want to use the Here's the repo: https://github.com/SadaleNet/CLIPTextEncodeA1111-ComfyUI |
Recently someone implemented this. Try this. |
Rather than having a custom node that tries to do everything at once, or having a ton of different nodes for each step, would it not make sense to have a literal "step" parameter in the k-sampler advanced node? It could function like the third argument in a python range method (start, stop, step) and be called something like "increment" to be less confusing. You'd be able to achieve the [cat|dog] effect in a more powerful (but more verbose way) using just 2 KSampler (Advanced) nodes that are offset one by in their start step and their respective prompt nodes. |
I agree with this logic. Being able to step... the step... would allow you do this elegantly with ksampler advanced. @comfyanonymous does this seem logical? |
I don't think this idea would work. It'd require the latent output and latent input of the two KSamplerAdvanced nodes to connect with each others. |
+1 for that feature. I was often using both alternating words ( |
Now ComfyUI supports, |
Is there an example of how to do this with that? I wasn't getting same sort of results, but I am not exactly sure how to use it, just what seems like how to do it. |
The thing is that for more complex prompts and multiple prompts / CLIP encoders setup we'd be quickly flooded with nodes. Sample (and still relatively simple) prompt from A1111:
It's very easy and fun to make that kind of transitions in A1111, and it works pretty well. Doing something like that via extra nodes would basically mean that for every unique combination of the prompt we would have to create duplicates of prompt and conditioning nodes. And imagine doing it with more advanced flows - for example my basic setup for SDXL is 3 positive + 3 negative prompts (one for each text encoder: base G+, base G-, base L+, base L-, refiner+, refiner-). If I wanted to do transitions like in the example above in the ComfyUI, I would have to make few times more nodes just to handle that prompt. And each time I would like to add or remove some transitions in the prompt, I would have to reconfigure whole flow. The prompt2prompt way looks like much better idea to me, to be honest. If anyone would like to (and/or knows how to) implement it in ComfyUI, here is original implementation of this feature from Doggettx, and here is v2 (might be useful as reference). It would probably work best if it was included in the basic ComfyUI functionality (not as custom nodes). |
For the from:when, you would set the start and end for both prompts and then pipe them into a Conditioning (Combine) |
The custom node i created allows for token alternating and prompt editing with control net as well. |
I'm late at the party, but +1 for the request.
@ltdrdata if I get it right, this node can be used as an alternative to
Worst of all, both solutions make a network prompt-dependent. So... is it planned to implement an actual equivalent for this syntax? |
Yeah. It seems that we need develope the wrapper. |
@ltdrdata Sorry if what I'm going to suggest doesn't make sense to you (if it is, disregard this comment): I'm not sure about the specific python implementation of data flow in ComfyUI. But maybe, instead of a new uber-all-in-one node, what we need is something like
|
I'm also late to the party too and I will also +1 this request. Prompt alternating is a great way to achieve some effects that are hard to obtain in a different way. |
Conditioning concat or combine should give results that are close to alternating prompts. |
The issue is, it makes the graph unmanageable. To do it with conditioning concat, we need to manually split a single prompt into multiple nodes... and the split point usually moves within the prompt, which makes the prompting process unnecessarily overcomplicated. |
By adapting the code of the new |
I know that the focus is more on being able to model complex workflows, but being able to write these powerful prompts that easy in A1111 is something I really miss in ComfiyUI. |
It can be done now but it's down to someone mirroring existing markdown for it, or a novel approach for ComfyUI with some new markdown for prompts. I thought about it but I don't really want to look into ever little possible combo to deal with since it's not something I use so elaborately |
This is easily done with my node. |
@shiimizu Thx for the info, I will check it out. |
@shiimizu I was scanning through this thread tonight looking for a way to use Automatic1111 type syntax in ComfyUI and saw your post about your custom node. I'm just wondering if you're still supporting it, if it's still working, and if you feel like it's a good solution to the discussion here. I feel like these A1111 options are so powerful and it's just crazy to me that Comfy refuses to acknowledge it is lacking in this respect. Thank you for your time. :) |
Another solution might be to get ClipTextEncode node to output a schedule of conditionings rather than a single conditioning. Since we already have the ConditioningSetTimestepRange node, I suppose it wouldn't be that hard to do. Then the KSampler would get a schedule of conditionings instead of a single one (per positive/negative prompt). // INPUT: pos_conds, neg_conds where X_conds = [(cond,start,end),...]
for step... :
current_conditioning = get_the_correct_conditioning_from_X_conds(...) // where X is pos or neg
do_the_sampling() |
+1 to this. It's a very important feature for me |
Hi!
I'd love to enquire about the ability to use two really powerful features from other platforms.
Thanks!
The text was updated successfully, but these errors were encountered: