try fine tune lora, but disappoint.............

#132
by liudashu - opened

i follow this link: https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_sd3.py

the raw scripts show me some error like 'local variable ... tokenizer_one .....'
then i deleted some line around 1344-1348, then it works, but but but too too too slow. need about 12 hours to train 500 epoches, my gpu is rtx-4090

anybody has better works?

[error by raw scripts]
tokens_one = tokenize_prompt(tokenizer_one, args.instance_prompt)
^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'tokenizer_one' where it is not associated with a value

[deleted scripts]
# Clear the memory here
if not train_dataset.custom_instance_prompts:
# del tokenizers, text_encoders
# # Explicitly delete the objects as well, otherwise only the lists are deleted and the original references remain, preventing garbage collection
# del tokenizer_one, tokenizer_two, tokenizer_three
# del text_encoder_one, text_encoder_two, text_encoder_three
gc.collect()
if torch.cuda.is_available():
torch.cuda.empty_cache()

the same issue

Sign up or log in to comment