Skip to content

[Bug] prompt weighting produces broken results on Anima #1492

@wbruna

Description

@wbruna

Git commit

master-596-90e87bc

Operating System & Version

Debian 13

GGML backends

Vulkan, HIP

Command-line arguments used

sd-cli --diffusion-model UltraReal_anima3.safetensors --llm Qwen3-0.6B-UD-Q4_K_XL.gguf -W 512 -H 768 --vae Qwen_Image-VAE.safetensors --steps 30 --cfg-scale 7 --diffusion-fa -p "Raw smartphone photo shot with a wide-angle lens, candid photo of a Ereshkigal (ereshkigal (fate)), with long blonde hair in twintails (twintails) and parted bangs (parted bangs), tied with red ribbons and a bow (red ribbon, hair ribbon, red bow)."

Steps to reproduce

Originally on LostRuins/koboldcpp#2205

A prompt like:

Raw smartphone photo shot with a wide-angle lens, candid photo of a Ereshkigal (ereshkigal (fate)), with long blonde hair in twintails (twintails) and parted bangs (parted bangs), tied with red ribbons and a bow (red ribbon, hair ribbon, red bow).

produces a garbage image on both Vulkan and ROCm:

Image

But just by removing all parenthesis I get:

Image

What you expected to happen

Both prompts producing images

What actually happened

A garbage result when changing token weights.

Logs / error messages / stack trace

tokenizer logs
[DEBUG] conditioner.hpp:1585 - parse 'Raw smartphone photo shot with a wide-angle lens, candid photo of a Ereshkigal (ereshkigal (fate)), with long blonde hair in twintails (twintails) and parted bangs (parted bangs), tied with red ribbons and a bow (red ribbon, hair ribbon, red bow).' to [['Raw smartphone photo shot with a wide-angle lens, candid photo of a Ereshkigal ', 1], ['ereshkigal ', 1.1], ['fate', 1.21], [', with long blonde hair in twintails ', 1], ['twintails', 1.1], [' and parted bangs ', 1], ['parted bangs', 1.1], [', tied with red ribbons and a bow ', 1], ['red ribbon, hair ribbon, red bow', 1.1], ['.', 1], ]
[DEBUG] bpe_tokenizer.cpp:183  - split prompt "Raw smartphone photo shot with a wide-angle lens, candid photo of a Ereshkigal " to tokens ["Raw", "Ġsmartphone", "Ġphoto", "Ġshot", "Ġwith", "Ġa", "Ġwide", "-angle", "Ġlens", ",", "Ġcandid", "Ġphoto", "Ġof", "Ġa", "ĠE", "resh", "k", "ig", "al", "Ġ", ]
[DEBUG] bpe_tokenizer.cpp:183  - split prompt "ereshkigal " to tokens ["er", "esh", "k", "ig", "al", "Ġ", ]
[DEBUG] bpe_tokenizer.cpp:183  - split prompt "fate" to tokens ["f", "ate", ]
[DEBUG] bpe_tokenizer.cpp:183  - split prompt ", with long blonde hair in twintails " to tokens [",", "Ġwith", "Ġlong", "Ġblonde", "Ġhair", "Ġin", "Ġtw", "int", "ails", "Ġ", ]
[DEBUG] bpe_tokenizer.cpp:183  - split prompt "twintails" to tokens ["tw", "int", "ails", ]
[DEBUG] bpe_tokenizer.cpp:183  - split prompt " and parted bangs " to tokens ["Ġand", "Ġparted", "Ġbang", "s", "Ġ", ]
[DEBUG] bpe_tokenizer.cpp:183  - split prompt "parted bangs" to tokens ["part", "ed", "Ġbang", "s", ]
[DEBUG] bpe_tokenizer.cpp:183  - split prompt ", tied with red ribbons and a bow " to tokens [",", "Ġtied", "Ġwith", "Ġred", "Ġrib", "bons", "Ġand", "Ġa", "Ġbow", "Ġ", ]
[DEBUG] bpe_tokenizer.cpp:183  - split prompt "red ribbon, hair ribbon, red bow" to tokens ["red", "Ġribbon", ",", "Ġhair", "Ġribbon", ",", "Ġred", "Ġbow", ]
[DEBUG] bpe_tokenizer.cpp:183  - split prompt "." to tokens [".", ]
[DEBUG] t5_unigram_tokenizer.cpp:336  - split prompt "Raw smartphone photo shot with a wide-angle lens, candid photo of a Ereshkigal " to tokens ["▁Raw", "▁smartphone", "▁photo", "▁shot", "▁with", "▁", "a", "▁wide", "-", "angle", "▁lens", ",", "▁candid", "▁photo", "▁of", "▁", "a", "▁Er", "e", "s", "h", "ki", "gal", ]
[DEBUG] t5_unigram_tokenizer.cpp:336  - split prompt "ereshkigal " to tokens ["▁", "er", "e", "s", "h", "ki", "gal", ]
[DEBUG] t5_unigram_tokenizer.cpp:336  - split prompt "fate" to tokens ["▁fate", ]
[DEBUG] t5_unigram_tokenizer.cpp:336  - split prompt ", with long blonde hair in twintails " to tokens ["▁", ",", "▁with", "▁long", "▁blonde", "▁hair", "▁in", "▁twin", "tail", "s", ]
[DEBUG] t5_unigram_tokenizer.cpp:336  - split prompt "twintails" to tokens ["▁twin", "tail", "s", ]
[DEBUG] t5_unigram_tokenizer.cpp:336  - split prompt " and parted bangs " to tokens ["▁", "▁and", "▁parte", "d", "▁ban", "g", "s", ]
[DEBUG] t5_unigram_tokenizer.cpp:336  - split prompt "parted bangs" to tokens ["▁parte", "d", "▁ban", "g", "s", ]
[DEBUG] t5_unigram_tokenizer.cpp:336  - split prompt ", tied with red ribbons and a bow " to tokens ["▁", ",", "▁tied", "▁with", "▁red", "▁ribbon", "s", "▁and", "▁", "a", "▁bow", ]
[DEBUG] t5_unigram_tokenizer.cpp:336  - split prompt "red ribbon, hair ribbon, red bow" to tokens ["▁red", "▁ribbon", ",", "▁hair", "▁ribbon", ",", "▁red", "▁bow", ]
[DEBUG] t5_unigram_tokenizer.cpp:336  - split prompt "." to tokens ["▁", ".", ]

Additional context / environment details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions