Unverified Commit 79ef9e52 authored by manosplitsis's avatar manosplitsis Committed by GitHub
Browse files

Fixed multi-token textual inversion training (#4452)



* added placeholder token concatenation during training

* Update examples/textual_inversion/textual_inversion.py
Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>

---------
Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
parent 801a5e21
......@@ -708,7 +708,7 @@ def main():
data_root=args.train_data_dir,
tokenizer=tokenizer,
size=args.resolution,
placeholder_token=args.placeholder_token,
placeholder_token=(" ".join(tokenizer.convert_ids_to_tokens(placeholder_token_ids))),
repeats=args.repeats,
learnable_property=args.learnable_property,
center_crop=args.center_crop,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment