Skip to content

Use a class prompt with txt files? #545

Closed
@dejl

Description

Hi!

How do I use a class prompt when using .txt captions when training a LoRA?
as I understand it the class prompt in the folder name is ignored if it finds caption files, right?

If I put the class prompt (say "woman").. in each caption file, it will then generate samples of a man?,
My understanding is there is a option --in_json which can list the captions and list of images, can I specify the class prompt this way? I've actually tried merge_captions_to_metadata.py and done this, but the output' json is missing other settings, is there a template or format for this file? I'm probably missing something simple here...

Two more questions that are somewhat related...

Is choosing a 3 letter or less rare trigger token best option?
a lot of LoRA on Civitai choose longer words which contain multiple tokens, and I my self have noticed a difference with samples on same seed+settings with different trigger word, ( _ ) maybe if one is training say a dog, it should be _dog , and use the additional networks in webui to adjust the weight? Might that be a good idea if one doesn't require the flexibility of multiple type of "dog" in a generative prompt? or am I completely off...

and about the captions themselves, it's my understanding that it is best to name what you don't want the LoRA to affect, correct? but I've noticed if , as an example... a subject wearing earrings in majority of the dataset, if I put in the caption "wearing earrings", it still , maybe even more so... likes to add in earrings.. I'm sure this bit is just my misunderstanding though, so any clarification is appreciated!

Thanks!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions