ai-toolkit icon indicating copy to clipboard operation
ai-toolkit copied to clipboard

ModuleNotFoundError: No module named 'oyaml'

Open oliverban opened this issue 1 year ago • 4 comments

I've successfully trained 5 loras but now I am getting this when trying to run a job, any ideas?

C:\Users\Oliver\Documents\Github\ai-toolkit>python run.py config/trainFlux.yml
Traceback (most recent call last):
  File "C:\Users\Oliver\Documents\Github\ai-toolkit\run.py", line 22, in <module>
    from toolkit.job import get_job
  File "C:\Users\Oliver\Documents\Github\ai-toolkit\toolkit\job.py", line 3, in <module>
    from toolkit.config import get_config
  File "C:\Users\Oliver\Documents\Github\ai-toolkit\toolkit\config.py", line 5, in <module>
    import oyaml as yaml
ModuleNotFoundError: No module named 'oyaml'

I've tried reinstalling requirements and git pull shows already updated.

EDIT: It seems I can delete the VENV, re-install everything from that point on, run ONE (1) job and then the error comes back if I cancel or finish it and want to start a new one.

oliverban avatar Aug 14 '24 04:08 oliverban

bump!

oliverban avatar Aug 14 '24 13:08 oliverban

just do pip install oyaml

sumanthdonapati avatar Aug 14 '24 19:08 sumanthdonapati

check your file extension

WarAnakin avatar Aug 14 '24 20:08 WarAnakin

just do pip install oyaml

I already did.

check your file extension

It is correct.

FIXED IT BY: uninstall oyaml, install pandas, force install and upgrade oyaml again, this worked for me.

oliverban avatar Aug 16 '24 00:08 oliverban

I had the same problem, did you solve it?

487306 avatar Aug 17 '24 19:08 487306

Thank you, we've solved this step. But it's not running yet.. from transformers import T5Tokenizer, T5EncoderModel, UMT5EncoderModel ImportError: cannot import name 'UMT5EncoderModel' from 'transformers' (D:\SD\sd-webui-aki-v4.8\sd-webui-aki-v4.8\python\lib\site-packages\transformers_init_.py)

487306 avatar Aug 17 '24 20:08 487306

This generally happens when the venv is not activated or the requirements are not installed. Try to run through the install process again and watch for errors and report back if it still doesn't work.

Midding UMT5EncoderModel module is from transformers needing to be updated to newer version. run pip install --upgrade -r requirements.txt inside the venv.

jaretburkett avatar Aug 19 '24 03:08 jaretburkett