cloneofsimo / lora

Using Low-rank adaptation to quickly fine-tune diffusion models.
https://arxiv.org/abs/2106.09685
Apache License 2.0
7.08k stars 481 forks source link

where is lora_pti??? #235

Open sipie800 opened 1 year ago

sipie800 commented 1 year ago

As readme says,

export MODEL_NAME="runwayml/stable-diffusion-v1-5" export INSTANCE_DIR="./data/data_disney" export OUTPUT_DIR="./exps/output_dsn"

lora_pti \ --pretrained_model_name_or_path=$MODEL_NAME \ --instance_data_dir=$INSTANCE_DIR \ --output_dir=$OUTPUT_DIR \ --train_text_encoder \ --resolution=512 \ --train_batch_size=1 \ --gradient_accumulation_steps=4 \ --scale_lr \ --learning_rate_unet=1e-4 \ --learning_rate_text=1e-5 \ --learning_rate_ti=5e-4 \ --color_jitter \ --lr_scheduler="linear" \ --lr_warmup_steps=0 \ --placeholder_tokens="|" \ --use_template="style"\ --save_steps=100 \ --max_train_steps_ti=1000 \ --max_train_steps_tuning=1000 \ --perform_inversion=True \ --clip_ti_decay \ --weight_decay_ti=0.000 \ --weight_decay_lora=0.001\ --continue_inversion \ --continue_inversion_lr=1e-4 \ --device="cuda:0" \ --lora_rank=1 \

but where is the lora_pti? I can't find it anywhere? please fix it.

todoroki commented 1 year ago

Depends on your envirnment. First, you should run

pip install git+https://github.com/cloneofsimo/lora.git

or maybe you can install it after git clone

git clone https://github.com/cloneofsimo/lora.git && cd lora pip install -e .

and then use 'which' command to find the file.

which lora_pti

in my environment, the lora_pti can be found
$HOME/.pyenv/shims/lora_pti

My environment Ubuntu 22.04 pyenv + virtualenv

eshiofune commented 1 year ago

So for me, what helped (thanks to the comment above) was to first create a virtual environment and then run the commands in the README.