Hi! Thank you for the amazing work. Training on a single GPU is quite slow, and since the project uses accelerate, I was expecting it to run also on multiple GPUs. However, after some small tweaks (removing the --put_in_cpu
flag when training the preoptimized loras, and substituting hypernetwork.train_params()
with hypernetwork.module.train_params()
) I am stuck with this error:
Traceback (most recent call last):
File "/home/hyper_dreambooth/./train_hyperdreambooth.py", line 1323, in <module>
main(args)
File "/home/hyper_dreambooth/./train_hyperdreambooth.py", line 1117, in main
pred_weights = hypernetwork(pixel_values)
File "/home/mambaforge/envs/hyper/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/mambaforge/envs/hyper/lib/python3.9/site-packages/torch/nn/parallel/distributed.py", line 1139, in forward
if torch.is_grad_enabled() and self.reducer._rebuild_buckets():
RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your module has parameters that
were not used in producing loss. You can enable unused parameter detection by passing the keyword argument `find_unused_parameters=True` to `torch.nn.parallel
.DistributedDataParallel`, and by
making sure all `forward` function outputs participate in calculating loss.
If you already have done the above, then the distributed data parallel module wasn't able to locate the output tensors in the return value of your module's `f
orward` function. Please include the loss function and the structure of the return value of `forward` of your module when reporting this issue (e.g. list, dic
t, iterable).
Parameter indices which did not receive grad for rank 3: 1
In addition, you can set the environment variable TORCH_DISTRIBUTED_DEBUG to either INFO or DETAIL to print out information about which particular parameters
did not receive gradient on this rank as part of this error