LarryJane491 / Lora-Training-in-Comfy

This custom node lets you train LoRA directly in ComfyUI!
364 stars 50 forks source link

Missing requirements_win? #18

Open knobiknows opened 7 months ago

knobiknows commented 7 months ago

Traceback (most recent call last): File "E:\ComfyUI_windows_portable\custom_nodes\Lora-Training-in-Comfy\sd-scripts\train_network.py", line 27, in from library import model_util File "E:\ComfyUI_windows_portable\custom_nodes\Lora-Training-in-Comfy\sd-scripts\library\model_util.py", line 15, in from transformers import CLIPTextModel, CLIPTokenizer, CLIPTextConfig, logging ModuleNotFoundError: No module named 'transformers' Traceback (most recent call last): ...

Tried fixing by using pip install transformers. Next attempt then gave 'No module named 'diffusers'' error so I manually installed that. Next attempt then gave 'No module named 'einops'' error so I installed that.

Are these all missing from the requirements_win list or am I doing something else wrong?

Nuked88 commented 7 months ago

Hi! It sounds like the issue is due to the node not using your portable environment but instead using the local one (where the dependencies are not installed). I've just submitted a pull request with my changes, which have been tested on the latest ComfyUI portable Windows environment. You can try that out, but since I'm not sure which node you have installed, it's a good idea to make a backup of the site-packages directory before trying it!

knobiknows commented 7 months ago

transformers and diffusers are not listed in requirements_win.txt so wouldn't have been installed in either environment.

einops is listed in requirements_win.txt so @Nuked88's explanation might fit here. May be related to Issue 5

LoRA trainer was looking for different installation paths and I effectively had to copy it 3 times.

E:\ComfyUI_windows_portable\ComfyUI\custom_nodes\Lora-Training-in-Comfy/sd-scripts/train_network.py

errored out so I had to add the git install described above:

E:\ComfyUI_windows_portable\ComfyUI\custom_nodes\Lora-Training-in-Comfy-main/sd-scripts/train_network.py

This then gave another error, looking for the install minus the 'ComfyUI' folder, so I copied the whole thing once more:

E:\ComfyUI_windows_portable\custom_nodes\Lora-Training-in-Comfy/sd-scripts/train_network.py

transformers and diffusers are not listed in requirements_win.txt (einops is