Open theoldsong opened 2 months ago
卸载了triton又报错,缺少triton模块
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.3.0+cu121 with CUDA 1201 (you have 2.3.1+cu118)
Python 3.8.10 (you have 3.8.19)
Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won't be available.
Set XFORMERS_MORE_DETAILS=1 for more details
A matching Triton is not available, some optimizations will not be enabled
Traceback (most recent call last):
File "D:\anaconda3\envs\supir\lib\site-packages\xformers__init.py", line 55, in _is_triton_available
from xformers.triton.softmax import softmax as triton_softmax # noqa
File "D:\anaconda3\envs\supir\lib\site-packages\xformers\triton\softmax.py", line 11, in
triton在Python 3.8.10下无法直接安装,建议用Python3.10版本
if you cant make it work here a tutorial
模型下了半天,结果还是各种报错,看Issues里有人说triton不用装,结果不装报错,triton好像只支持linux,找了一个大佬封装的win版本,结果又报错,这个必须cuda12.1才能用吗? WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.3.0+cu121 with CUDA 1201 (you have 2.3.1+cu118) Python 3.8.10 (you have 3.8.19) Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers) Memory-efficient attention, SwiGLU, sparse and more won't be available. Set XFORMERS_MORE_DETAILS=1 for more details A matching Triton is not available, some optimizations will not be enabled Traceback (most recent call last): File "D:\anaconda3\envs\supir\lib\site-packages\xformers__init.py", line 55, in _is_triton_available from xformers.triton.softmax import softmax as triton_softmax # noqa File "D:\anaconda3\envs\supir\lib\site-packages\xformers\triton\softmax.py", line 11, in
import triton
File "D:\anaconda3\envs\supir\lib\site-packages\triton__init.py", line 10, in
from .runtime import Config, autotune, heuristics, JITFunction, KernelInterface
File "D:\anaconda3\envs\supir\lib\site-packages\triton\runtime__init.py", line 1, in
from .autotuner import Config, Heuristics, autotune, heuristics # noqa: F401
File "D:\anaconda3\envs\supir\lib\site-packages\triton\runtime\autotuner.py", line 7, in
from ..testing import do_bench
File "D:\anaconda3\envs\supir\lib\site-packages\triton\testing.py", line 9, in
import triton._C.libtriton.triton as _triton
ImportError: DLL load failed while importing libtriton: 找不到指定的模块。
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ E:\python\SUPIR\gradio_demo.py:6 in │
│ │
│ 3 import gradio as gr │
│ 4 from gradio_imageslider import ImageSlider │
│ 5 import argparse │
│ ❱ 6 from SUPIR.util import HWC3, upscale_image, fix_resize, convert_dtype │
│ 7 import numpy as np │
│ 8 import torch │
│ 9 from SUPIR.util import create_SUPIR_model, load_QF_ckpt │
│ │
│ E:\python\SUPIR\SUPIR\util.py:8 in │
│ │
│ 5 from PIL import Image │
│ 6 from torch.nn.functional import interpolate │
│ 7 from omegaconf import OmegaConf │
│ ❱ 8 from sgm.util import instantiate_from_config │
│ 9 │
│ 10 │
│ 11 def get_state_dict(d): │
│ │
│ E:\python\SUPIR\sgm__init.py:1 in │
│ │
│ ❱ 1 from .models import AutoencodingEngine, DiffusionEngine │
│ 2 from .util import get_configs_path, instantiate_from_config │
│ 3 │
│ 4 version = "0.1.0" │
│ │
│ E:\python\SUPIR\sgm\models\init__.py:1 in │
│ │
│ ❱ 1 from .autoencoder import AutoencodingEngine │
│ 2 from .diffusion import DiffusionEngine │
│ 3 │
│ │
│ E:\python\SUPIR\sgm\models\autoencoder.py:12 in │
│ │
│ 9 from packaging import version │
│ 10 from safetensors.torch import load_file as load_safetensors │
│ 11 │
│ ❱ 12 from ..modules.diffusionmodules.model import Decoder, Encoder │
│ 13 from ..modules.distributions.distributions import DiagonalGaussianDistribution │
│ 14 from ..modules.ema import LitEma │
│ 15 from ..util import default, get_obj_from_str, instantiate_from_config │
│ │
│ E:\python\SUPIR\sgm\modules\ init.py:1 in │
│ │
│ ❱ 1 from .encoders.modules import GeneralConditioner │
│ 2 from .encoders.modules import GeneralConditionerWithControl │
│ 3 from .encoders.modules import PreparedConditioner │
│ 4 │
│ │
│ E:\python\SUPIR\sgm\modules\encoders\modules.py:22 in │
│ │
│ 19 ) │
│ 20 │
│ 21 from ...modules.autoencoding.regularizers import DiagonalGaussianRegularizer │
│ ❱ 22 from ...modules.diffusionmodules.model import Encoder │
│ 23 from ...modules.diffusionmodules.openaimodel import Timestep │
│ 24 from ...modules.diffusionmodules.util import extract_into_tensor, make_beta_schedule │
│ 25 from ...modules.distributions.distributions import DiagonalGaussianDistribution │
│ │
│ E:\python\SUPIR\sgm\modules\diffusionmodules\ init__.py:6 in │
│ │
│ 3 from .loss import StandardDiffusionLoss │
│ 4 from .model import Decoder, Encoder, Model │
│ 5 from .openaimodel import UNetModel │
│ ❱ 6 from .sampling import BaseDiffusionSampler │
│ 7 from .wrappers import OpenAIWrapper │
│ 8 │
│ │
│ E:\python\SUPIR\sgm\modules\diffusionmodules\sampling.py:20 in │
│ │
│ 17 │ to_sigma, │
│ 18 ) │
│ 19 from ...util import append_dims, default, instantiate_from_config │
│ ❱ 20 from k_diffusion.sampling import get_sigmas_karras, BrownianTreeNoiseSampler │
│ 21 │
│ 22 DEFAULT_GUIDER = {"target": "sgm.modules.diffusionmodules.guiders.IdentityGuider"} │
│ 23 │
│ │
│ D:\anaconda3\envs\supir\lib\site-packages\k_diffusion\ init.py:1 in │
│ │
│ ❱ 1 from . import augmentation, config, evaluation, external, gns, layers, models, sampling, │
│ 2 from .layers import Denoiser │
│ 3 │
│ │
│ D:\anaconda3\envs\supir\lib\site-packages\k_diffusion\evaluation.py:6 in │
│ │
│ 3 from pathlib import Path │
│ 4 │
│ 5 from cleanfid.inception_torchscript import InceptionV3W │
│ ❱ 6 import clip │
│ 7 import torch │
│ 8 from torch import nn │
│ 9 from torch.nn import functional as F │
│ │
│ D:\anaconda3\envs\supir\lib\site-packages\clip\ init__.py:1 in │
│ │
│ ❱ 1 from .clip import * │
│ 2 │
│ │
│ D:\anaconda3\envs\supir\lib\site-packages\clip\clip.py:6 in │
│ │
│ 3 import urllib │
│ 4 import warnings │
│ 5 from typing import Any, Union, List │
│ ❱ 6 from pkg_resources import packaging │
│ 7 │
│ 8 import torch │
│ 9 from PIL import Image │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: cannot import name 'packaging' from 'pkg_resources'
(D:\anaconda3\envs\supir\lib\site-packages\pkg_resources\ init__.py)