Comments (12)
Please spare my ignorance, but exactly why would you insert "#" anywhere in the prompt for that matter?
from comfyui.
Please spare my ignorance, but exactly why would you insert "#" anywhere in the prompt for that matter?
I'd also like to know it. I think it's just a hashtag, like those used in social media posts. (that image wasn't generated by me)
I've updated the post with more details.
from comfyui.
I can't recall what square brackets were supposed to do... were they implicit downweighting like how () upweights slightly?
from comfyui.
According to the community manual [] doesn't do anything in prompts. Downweighting is via () with a number less than 1 specified. [] did downweighting in shark, so the equivalent would be (foo:0.9)
Maybe try that and see if it works? It's possible [] used to downweight and was dropped.
from comfyui.
I can't recall what square brackets were supposed to do... were they implicit downweighting like how () upweights slightly?
I couldn't find an official explanation for what square brackets do in Comfyui.
I was assuming it was decreasing attention for the enclosed expression, but when testing with (David Fincher:-1.10) and other values, I couldn't reproduce that same picture. I didn't included this test in issues' description because I don't really know what square brackets are doing here.
But removing them from the prompt causes an almost identical image.
from comfyui.
I just did a once-over on the conditioning parser. [] do nothing.
from comfyui.
The only thing I can think of is that they were being stripped out before... they don't seem to be now, so they could just be literal [] in the final prompt.
from comfyui.
According to the community manual [] doesn't do anything in prompts. Downweighting is via () with a number less than 1 specified. [] did downweighting in shark, so the equivalent would be (foo:0.9)
Maybe try that and see if it works? It's possible [] used to downweight and was dropped.
Thanks for your reply. I had thought about that as well: that [] was downweighting in older buillds, but I didn't mention it because I could find nothing about it.
I had tried using () with different values, but all results are nowhere near the reference image (generated with the older build). All images remain consistent with what the current build generates (front and side of the car can be seen).
Take a look what I get vs what I should get:
I tried also escaping square bracket by using [ EXPRESSION ] , with no success
The next step is using comfyui files from newer build with whole python from the older. I'll do that later.
from comfyui.
Well, I've found out:
If I use the following prompt in the recent comfyui build:
car, filmed by ([David Fincher]:1), ancient, winter in space, a fairy tale
I can reproduce the image generated in older build.
Also, in older build I could get the exact same image by using "the alternate" syntax. Image is the same, comparared pixel by pixel.
Take a look at both results (older build, showing both sintaxes):
So:
this older build's "exclusive" syntax:
car, filmed by [David Fincher], ancient, winter in space, a fairy tale
is the same as newer (and also older!) build's
car, filmed by ([David Fincher]:1), ancient, winter in space, a fairy tale
I was testing for decimal values instead of 1, very confident it wasn't 1 after reaching more similar images, but then I realized the older build I'm using isn't deterministic (pytorch, and --deterministic argument isn't supported), so I switched to xformers and tested in older build, finally reaching the value of 1.
Now I know whether this change is an expected behaviour....
I remember seeing some commit about the change in [] in file paths, but nothing in prompts....
from comfyui.
How absolutely bizzarre...
All I can seem to find is that it has some meaning in ComfyUI-prompt-control custom nodes where it can do various things... most require specific syntax but one just means (I think) "not emphasized" which I suppose is equivalent to (foo bar:1)
!emphasized: "(" prompt? ")"
| "(" prompt ":" prompt ")"
| "[" prompt "]"
I'm guessing all it would do is treat the contained items as a single token for attention purposes where normally they'd be split and locality would be used. Did you try (David Fincher:1) to see if it does the same thing? @comfyanonymous could probably answer this but it's mostly academic I guess if you've found the workaround.
Any chance those were installed in the version you were using? You'll have a "Conditioning (Advanced)" node if it's around I think.
With other syntaxes it can also be used to schedule items contained in the square brackets for temporal weighting in batches
from comfyui.
All I can seem to find is that it has some meaning in ComfyUI-prompt-control custom nodes where it can do various things... most require specific syntax but one just means (I think) "not emphasized" which I suppose is equivalent to (foo bar:1) !emphasized: "(" prompt? ")" | "(" prompt ":" prompt ")" | "[" prompt "]" I'm guessing all it would do is treat the contained items as a single token for attention purposes where normally they'd be split and locality would be used.
Interesting.....
I had tried also using [Fincher], and ([Fincher]:1) yesterday, but in all tests, results were consistent with using a "compound" expression ("David Fincher").
I also did another very interesting test:
Using a clean and recent comfyui, I've copied comfyui files from 31_07_2023 build (so that embedded python would be from recent build), and square bracket behaviour was the one from NEWER builds.
So it seems it's something inside python (maybe torch and its dependencies) that's causing this difference.
At this point, maybe there's not much that can be done in comfyui's side.
Did you try (David Fincher:1) to see if it does the same thing? @comfyanonymous could probably answer this but it's mostly academic I guess if you've found the workaround.
I had tried, but it's different from both [prompt] and ([prompt]:1)
Also, (David Fincher:1) gives different results in both builds, but that's probably some change in attention thing...
See comparison below, newer and older builds:
Recent build:
31_07_2023 build:
Any chance those were installed in the version you were using? You'll have a "Conditioning (Advanced)" node if it's around I think.
No, just checked, this node isn't here. My customnodes folder is currently without any third party node folder, and there's no "Conditioning (Advanced)" node available.
from comfyui.
I've found out what causes difference in behaviour:
It's the pair (pair because of dependency) transformers and tokenizers
With transformers 4.30.2 and tokenizers 0.13.3, [expression] is the same as ([expression]:1)
With transformers 4.39.3 and tokenizers 0.15.2, [expression] is different from ([expression]:1)
Maybe it's the tokenizers alone, but I can't confirm it due to dependency issues.
from comfyui.
Related Issues (20)
- Error occurred when executing DWPreprocessor HOT 2
- 【ipex】Unexpected Keyword Argument 'concat_linear' Error in CheckpointLoaderSimple Execution HOT 1
- Slot Name will auto reset every time. HOT 2
- executing KSampler HOT 1
- I have a problem with inference_core_nodes. for a few days in comfyUI Win64 Stability Matrix HOT 1
- Several custom_nodes not loading, after last update: 9a151b7 HOT 10
- Missing Models and Custom Nodes in ComfyUI, including IP-Adapters (I would like to contribute and try fix this ) HOT 10
- Can nodes be designed like blender? HOT 2
- Please combine the `BasicScheduler` and `AlignYourStepsScheduler` nodes HOT 3
- [intel]Slightly faster latent2rgb previews running 2-3 steps HOT 1
- help 1080ti to run comfy ui -->got query.dtype: struct c10::Half key.dtype: float and value.dtype: float HOT 5
- Spandrel addition brakes restoration nodes using GFPGAN models HOT 11
- Add Tiled VAE Encode for Inpainting
- How to handle an exception in the prompt_worker thread?
- Command line Flag --deterministic breaking KSampler preview
- Add a commented javascript example "Frontend extension" similar to custom_nodes/example_node.py.example
- Some upscale-related custom nodes are checked for errors. HOT 1
- Error occurred when executing CheckpointLoaderSimple: the STRING opcode argument must be quoted HOT 1
- Python Path HOT 1
- [AMD ROCm] No reactions for 3 monthes or more HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from comfyui.