Diffusion Single File
comfyui

Will it be possible to make prompt weight adjustment fully work in the future?

#135
by ArranEye - opened

it seems that the qwen cannot read the weight properly, since I change the code in comfy/text_encoders/anima.py and make the out["qwen3_06b"] = qwen_ids , i still can't obtain results similar to those of other models using clip.
Is there any plan to bring the weight adjustment back? Or is there any method that can at least achieve a similar purpose?

You can try using Stable Diffusion-style weighting or natural language emphasis; in my experience, these are effective in most cases.

@kongbai-84 what do you mean? i know because anima has t5 and t5 can accept weight, so (word:1.5) can get some change. but it just some change that don't conform to the result it should be. or you mean some structure like " 1.5 of XXX"?

image (27)

image (28)
You can refer to the image I uploaded and try SD-style weighting or natural language emphasis. In some cases, Qwen can understand weights and guide the model correctly. If weighting isn't effective, try using natural language prompts in English.

image (27)

image (28)
You can refer to the image I uploaded and try SD-style weighting or natural language emphasis. In some cases, Qwen can understand weights and guide the model correctly. If weighting isn't effective, try using natural language prompts in English.

Also using the relevant Danbooru style tag Is important as well as a model was trained on Dan tags too. For example from the tag group:breasts tags:

https://danbooru.donmai.us/wiki_pages/tag_group:breasts_tags

I've used weighted words and it works pretty well However, depending on the checkpoint it can be watered down a bit especially if you're maybe using style LORAs or certain Checkpoints. I find between (word:1.2 to 1.4 to 1.8) works best for me personally. Mainly for breast size and other anatomy features.

These are just my experiences though you're experience may vary. I hope it helps.

@kongbai-84 @kdutt2000 i got it. but i don't think qwen can get weight with default code. out["qwen3_06b"] = [[(k[0], 1.0, k[2]) if return_word_ids else (k[0], 1.0) for k in inner_list] for inner_list in qwen_ids]This section appears to simply remove the weight information input to qwen (Or is this my misunderstanding?)

BTW, does it exist any method to control the artist style like this? In my tests, qwen's handling of the artist was very strange. If there are two or three artists, maybe for the one with higher training level, the (@artist :1.8) method can indeed produce results that make me think, "Oh, this really enhances his painting effect." But when i use more artists, or these artists aren't training enough (maybe?), I still cannot achieve significant differences in generation. Moreover, I found that this weight works more effectively in close-ups, portraits, and half-body compositions. Once the overall composition is close to a full-body shot, it becomes difficult to significantly change the image by modifying the weight.

Another point is that for weight values ​​less than 1.0, using (artist:0.2) when using noobai or novelai will basically not change anything too much. However, here, as long as you add artists in the prompt, no matter how you write the weights, it will cause a significant difference in the results.

SD-format weights can control artist weights in certain situations, but it's quite inconsistent—sometimes it works, and sometimes it doesn't. Currently, it seems that SD-format weighting is effective because Qwen can understand that a colon and a numerical value after certain tags indicate a weight adjustment for that tag, rather than it being implemented through code. At present, the use of artist strings and weights is not yet mature and still requires further optimization.

it seems that SD-format weighting is effective because Qwen can understand that a colon and a numerical value after certain tags indicate a weight adjustment for that tag

this is pretty strange, can Qwen really understand the value for some reason in sometimes? If this is possible, then we should have a way to reinforce and make it truly understand the weights?

" prompt weight"? "anima has t5"? " t5 can accept weight"? Where did you people get your info from? Your own twisted fantasy or that cesspool of CIVITAI?

  1. Prompt weighting uses CLIP text encoder which no model newer than the ancient SDXL uses anymore. They all use LLM: do you say "(Hi:1.2), (nice:1.4) to meet (you:1.1)" when greeting someone you've just met?
  2. Anima uses Qwen_3_06b. That's it. No clip, no other "abliterated","uncensored","unfiltered" useless coping garbage
  3. T5 does NOT accepts weight. You probably used a model requiring both T5 and CLIP and the latter did "something" by using weight, but no, T5 does NOT uses weight, not even if you wished for.

Based on practical results, weights do have a certain effect on anatomical tags and artist styles, which suggests that Qwen can partially understand the concept of weights. Theoretically, it might be possible to make Qwen fully understand weights by selecting a few similar images where specific features are significantly more prominent, and explicitly including weights in the prompts during the tagging process.

@Privac i just don't know, so i'm asking. And the code in comfy/text_encoders/anima.py shows that AnimaTokenizer has Qwen3Tokenizer and T5XXLTokenizer. i really don't know T5 can't accept weight as well.
so, as what i'm actually asking, is it possible for us to reimplement the use of weights? Or is it possible for us to achieve something similar through other ways, to approach those previous models? Because applying weights to artists allows for more stylistic variations.

I find it strange how so many people are saying that weights don't work with Anima, when they very clearly do. Maybe you're just using too small weights? You do need higher numbers than with SDXL models, (...:1.3) doesn't do much. But (...:3.0) most definitely does.
Screenshot 2026-04-24 135828

I find it strange how so many people are saying that weights don't work with Anima, when they very clearly do. Maybe you're just using too small weights? You do need higher numbers than with SDXL models, (...:1.3) doesn't do much. But (...:3.0) most definitely does.
Screenshot 2026-04-24 135828

For real though, there’s always some leakage during training regarding 'prompt weight,' and the model ends up remembering parts of it.

CircleStone Labs org

Prompt weighting does work, at least in ComfyUI. Format is same as SDXL: "you can (emphasize:2) certain words or phrases". The implementation specifically implements weighting by scaling the text encoder vectors that are input to the diffusion model. That is, Qwen3 + LLM adapter gives some vectors that are roughly in T5 embedding space, and it is those vectors that are scaled accord to prompt weights.

Because of how the diffusion model works and does cross attention to the conditioning, you need much higher weights than you would use for SDXL.

@tdrussell
Wow, thanks for author's reply! I did find that prompt weighting works in some cases, but when applied to @ artist, for some artist combinations, providing a weight greater than 2 might not be enough to notice the stylistic differences. In these cases, increasing the weight further might cause the entire image to nearly collapse.

For example, when working with one or two Celluloid artists (such as Akakura and Rella) and an Impasto artist (such as Wlop), in the case of SDXL, increasing the weight of Wlop can clearly show a change in the image towards an Impasto feel. However, in the case of Anima, if using cowboy shot or full body, even with a weight of 2 or 3, it is difficult to see a definite "Oh, this has an Impasto feel."

I want to determine whether this method of freely adjusting @artist weights to achieve a style blending result similar to SDXL and NovelAI will receive better support in the future.

Honestly I feel like this information should be spread more.

I am probably not the only one who was under the impressions that weighting didn't work after trying out values typical for SDXL based models like 1.1, with the usual upper limit being around 1.5. Seems like Anima wants much higher numerical values for the weight like 2 or higher.

Just when I thought I had a gripe about Anima, turns out its not the case!

Sign up or log in to comment