hollowstrawberry / kohya-colab

Accessible Google Colab notebooks for Stable Diffusion Lora training, based on the work of kohya-ss and Linaqruf
GNU General Public License v3.0
609 stars 91 forks source link

Lora Trainer, RuntimeError: operator torchvision::nms does not exist #230

Open InterspeciesFace opened 2 days ago

InterspeciesFace commented 2 days ago

Trying to use it, getting this message.

Traceback (most recent call last): File "/usr/local/bin/accelerate", line 5, in from accelerate.commands.accelerate_cli import main File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 19, in from accelerate.commands.estimate import estimate_command_parser File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/estimate.py", line 34, in import timm File "/usr/local/lib/python3.10/dist-packages/timm/init.py", line 2, in from .layers import is_scriptable, is_exportable, set_scriptable, set_exportable File "/usr/local/lib/python3.10/dist-packages/timm/layers/init.py", line 8, in from .classifier import create_classifier, ClassifierHead, NormMlpClassifierHead, ClNormMlpClassifierHead File "/usr/local/lib/python3.10/dist-packages/timm/layers/classifier.py", line 15, in from .create_norm import get_norm_layer File "/usr/local/lib/python3.10/dist-packages/timm/layers/create_norm.py", line 14, in from torchvision.ops.misc import FrozenBatchNorm2d File "/usr/local/lib/python3.10/dist-packages/torchvision/init.py", line 10, in from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils # usort:skip File "/usr/local/lib/python3.10/dist-packages/torchvision/_meta_registrations.py", line 164, in def meta_nms(dets, scores, iou_threshold): File "/usr/local/lib/python3.10/dist-packages/torch/library.py", line 654, in register use_lib._register_fake(op_name, func, _stacklevel=stacklevel + 1) File "/usr/local/lib/python3.10/dist-packages/torch/library.py", line 154, in _register_fake handle = entry.abstract_impl.register(func_to_register, source) File "/usr/local/lib/python3.10/dist-packages/torch/_library/abstract_impl.py", line 31, in register if torch._C._dispatch_has_kernel_for_dispatch_key(self.qualname, "Meta"): RuntimeError: operator torchvision::nms does not exist

githubnoot commented 2 days ago

cries in: samesies :*(((((

gwhitez commented 2 days ago

replace dependencies with these !apt -y update -qq !apt -y install aria2 -qq !pip install accelerate==0.25.0 transformers==4.36.2 diffusers[torch]==0.25.0 ftfy==6.1.1 \ opencv-python==4.8.1.78 einops==0.7.0 pytorch-lightning==2.4.0 bitsandbytes==0.44.1 \ prodigyopt==1.0 lion-pytorch==0.0.6 tensorboard safetensors==0.4.2 altair==4.2.2 \ easygui==0.98.3 toml==0.10.2 voluptuous==0.13.1 huggingface-hub==0.20.1 imagesize==1.4.1 \ rich==13.7.1 triton and then that it mistakenly creates a new cell and executes it with this code !pip install torch==2.5.0 Once I finish, run the training again I should be able to train image

stadiffs commented 2 days ago

I got the same error --.,.,.,--

gwhitez commented 2 days ago

I got the same error --.,.,.,--

try again https://colab.research.google.com/drive/1szWeUJ0HcAdOva-C8oNABKnx1LCd-8vC?usp=sharing

fealhefu commented 16 hours ago

I got the same error --.,.,.,--

try again https://colab.research.google.com/drive/1szWeUJ0HcAdOva-C8oNABKnx1LCd-8vC?usp=sharing

When I click it, it said This file does not exist.