stable-diffusion icon indicating copy to clipboard operation
stable-diffusion copied to clipboard

NameError: name 'trainer' is not defined.

Open sebvln opened this issue 3 years ago • 2 comments

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'?

sebvln avatar Jun 07 '23 16:06 sebvln

me too

dreaming-huang avatar Jun 08 '23 19:06 dreaming-huang

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

dreaming-huang avatar Jun 08 '23 19:06 dreaming-huang