-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Wan] ModuleNotFoundError: No module named 'dependencies.peft' #312
Comments
In addition of the previous message, the precomputation seem very fast now ? 1 minute 34 seconds versus more than 25 minutes before. But right after, I got this error message: ERROR:finetrainers:Error during training: mat1 and mat2 must have the same dtype, but got Float8_e4m3fn and BFloat16 It seem that the optimization trick not work directly without adapting the EDIT: ERROR:finetrainers:Traceback (most recent call last):
File "/home/dorpxam/ai/finetrainers/train.py", line 70, in main
trainer.run()
File "/home/dorpxam/ai/finetrainers/finetrainers/trainer/sft_trainer/trainer.py", line 97, in run
raise e
File "/home/dorpxam/ai/finetrainers/finetrainers/trainer/sft_trainer/trainer.py", line 92, in run
self._train()
File "/home/dorpxam/ai/finetrainers/finetrainers/trainer/sft_trainer/trainer.py", line 470, in _train
pred, target, sigmas = self.model_specification.forward(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/ai/finetrainers/finetrainers/models/wan/base_specification.py", line 316, in forward
pred = transformer(
^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/diffusers/models/transformers/transformer_wan.py", line 423, in forward
temb, timestep_proj, encoder_hidden_states, encoder_hidden_states_image = self.condition_embedder(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/diffusers/models/transformers/transformer_wan.py", line 156, in forward
temb = self.time_embedder(timestep).type_as(encoder_hidden_states)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/diffusers/models/embeddings.py", line 1305, in forward
sample = self.linear_1(sample)
^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/diffusers/hooks/hooks.py", line 148, in new_forward
output = function_reference.forward(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/linear.py", line 125, in forward
return F.linear(input, self.weight, self.bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: mat1 and mat2 must have the same dtype, but got Float8_e4m3fn and BFloat16 EDIT2: Here is the new log: ERROR:finetrainers:Traceback (most recent call last):
File "/home/dorpxam/ai/finetrainers/train.py", line 70, in main
trainer.run()
File "/home/dorpxam/ai/finetrainers/finetrainers/trainer/sft_trainer/trainer.py", line 97, in run
raise e
File "/home/dorpxam/ai/finetrainers/finetrainers/trainer/sft_trainer/trainer.py", line 92, in run
self._train()
File "/home/dorpxam/ai/finetrainers/finetrainers/trainer/sft_trainer/trainer.py", line 470, in _train
pred, target, sigmas = self.model_specification.forward(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/ai/finetrainers/finetrainers/models/wan/base_specification.py", line 316, in forward
pred = transformer(
^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/diffusers/models/transformers/transformer_wan.py", line 420, in forward
hidden_states = self.patch_embedding(hidden_states)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/conv.py", line 725, in forward
return self._conv_forward(input, self.weight, self.bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dorpxam/anaconda3/envs/finetrainers/lib/python3.11/site-packages/torch/nn/modules/conv.py", line 720, in _conv_forward
return F.conv3d(
^^^^^^^^^
RuntimeError: Input type (c10::BFloat16) and bias type (c10::Float8_e4m3fn) should be the same EDIT3: |
Latest update work well and pass the previous error. But the seconds/it count in minutes now (20 minutes), and this is always the same problem of my 16GB. Here the full memory use is something like 34GB (including shared RAM). That's why is incredibly slow.
To attempt to recover this point, I add the
--layerwise_upcasting_modules transformer
and change the optimizer toadamw-bnb-8bit
just for a test. The optimizer pass but thelayerwise_upcasting_modules
crash in thepatches/__init__.py
file.This is just a typo error, adding
.
before dependencies works !Hope that help!
The text was updated successfully, but these errors were encountered: