On training textual inversion #10104
-
Hi all, Thus the training for TI is one image each time? Though the batch can be enlarged, but it is still the same image \times batchsize plus prompt template with placeholder? Or it is similar images with similar visual concept? What I have right now is a collection of different images, with different concepts. Is there a way to train these images together in one batch? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, AFAIK you can't train multiple concepts with textual inversion, also our scripts are mostly basic so we don't even have the option for training multiple concepts for dreambooth loras as other training repositories do. Probably it would be best to train multiple TIs. I must admit that I don't really use textual inversion so asking @linoytsaban if there's something to add or if this is possible. |
Beta Was this translation helpful? Give feedback.
-
Hey @ZhihuaLiuEd! with our scripts you could technically train more than one concept in a single train run when enabling pivotal tuning/ textual inversion - provided your image dataset comes with a caption column such that each caption contains unique identifiers assigned for the concept/s present in the image. This way you can pass in |
Beta Was this translation helpful? Give feedback.
Hey @ZhihuaLiuEd! with our scripts you could technically train more than one concept in a single train run when enabling pivotal tuning/ textual inversion - provided your image dataset comes with a caption column such that each caption contains unique identifiers assigned for the concept/s present in the image. This way you can pass in
--token_abstraction
a comma separated string containing the identifiers for each concept e.g/ -"TOK1,TOK2"
. These identifiers will then be converted to different new tokens whose embeddings will be optimized during training.Generally multiple concept training tends to be quite tricky to nail, personally I haven't explored much multiple concept training wi…