Escaping brackets with backslashes in captions
Do we need to escape brackets in tags like tohru (maidragon) for lora training captions like we did with SDXL where they were used for token weighting?
I'm really curious if bracket escaping was used in the training captions for Anima. It would be great to know so I can stick to the same approach for better caption compatibility with the model.
Prompt weighting is a hack for inference. It is possible to implement it for training, but that would be crazy to do, would likely be under an obvious experimental flag, and I don't think anyone has done that.
No weighting means nothing to escape.
Escaping also isn't something that the model would see. Escaping refers to changing how things are interpreted, escaping (avoiding, skipping, ...) certain functionality (prompt weighting in this case). This would mean the model either sees tohru maidragon (no backslashes, brackets not escaped, maidragon vectors scaled up) or tohru (maidragon) (yes backslashes, brackets escaped, maidragon vectors are untouched). It never sees backslashes unless you type in too many.
On top of all that, Anima doesn't play well with the typical prompt weighting methods anyways due to lacking CLIP.
like we did with SDXL
You most likely made a mistake and taught the model that it needs backslashes, which without prompting for tohru \\\(maidragon\\\), it won't receive.
Prompt weighting is a hack for inference. It is possible to implement it for training, but that would be crazy to do, would likely be under an obvious experimental flag, and I don't think anyone has done that.
Weighted captions do actually exist and was implemented in Kohya which required escaping in the captions/tags. I believe SDXL, Flux, and Lumina all support it (with SD3 being the exception). Not sure if it was really ever used for anything though or if it even worked well, but it was pulled off a while ago I guess.
But yeah, as you described, escaping was never necessary in training even for SDXL. It's only necessary in Comfy/A1111 because parentheses are normally used for emphasis; escaping is for tags that have parentheses already as otherwise the UI's assume you're trying to do prompt weighting and will pass the wrong tag instead.