사용 코랩

사용중에 ValueError: Could not find the operator torchvision::nms. Please make sure you have already
registered the operator and (if registered from C++) loaded it via torch.ops.load_library. 오류가 떠서 조진 사람들에게 한정된 오류 해결법임.


해결법

Install Kohya Trainer  

1. 위에 있는 셀의 코드 표시를 눌러 코드를 본다.


def install_dependencies():    requirements_file = os.path.join(repo_dir, "requirements.txt")    model_util        = os.path.join(repo_dir, "library/model_util.py")    gpu_info          = getoutput('nvidia-smi')    t4_xformers_wheel = "https://github.com/Linaqruf/colab-xformers/releases/download/0.0.20/xformers-0.0.20+1d635e1.d20230519-cp310-cp310-linux_x86_64.whl"
    !apt install aria2 lz4    !wget https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4 -O /content/libtcmalloc_minimal.so.4    !pip install -q --upgrade -r {requirements_file}
    !pip install -q xformers==0.0.22.post7

2. 내려가서 이런 코드를 찾는다. 

3. !pip install -q xformers==0.0.22.post7 코드를 !pip install -q xformers==0.0.26.dev767 로 바꾼다. 


여전히 종속성 오류는 지랄나지만, 학습은 할 수 있다.