justinpinkney / stable-diffusion

MIT License
1.45k stars 266 forks source link

NameError: name 'trainer' is not defined. #77

Open sebvln opened 1 year ago

sebvln commented 1 year ago

Hi, thank you for the repo !

I am trying to fine tune stable-diffusion on collab like this:

!python main.py -t --base configs/stable-diffusion/pokemon.yaml --weights_save_path "./" --gpus 1 --auto_select_gpus True --scale_lr False --num_nodes 1 --check_val_every_n_epoch 10 --finetune_from "$ckpt_path" data.params.batch_size="$BATCH_SIZE" lightning.trainer.accumulate_grad_batches="$ACCUMULATE_BATCHES" data.params.validation.params.n_gpus="$NUM_GPUS"

But got the following error:

Traceback (most recent call last): File "/content/stable-diffusion/main.py", line 939, in if trainer.global_rank == 0: NameError: name 'trainer' is not defined. Did you mean: 'Trainer'?

dreaming-huang commented 1 year ago

me too

dreaming-huang commented 1 year ago

I think this error occur because ours network,maybe proxy canhelp us(I tried then it work)