Coder Social home page Coder Social logo

Comments (13)

Zeqiang-Lai avatar Zeqiang-Lai commented on July 23, 2024

See #14 (comment)

from draggan.

crazygonuts avatar crazygonuts commented on July 23, 2024

CUDA and visual studio are already installed. I reinstalled anyways, but am still getting the same error. I am on windows 10.

from draggan.

DuckersMcQuack avatar DuckersMcQuack commented on July 23, 2024

Same here. Worked fine with the old version of this drag gan from a few days ago. new one can't find cuda either. And i have cuda 11 installed, path's setup properly and everything. And works perfectly fine with any other diffusion related image generator.

image
image
image

from draggan.

werwack avatar werwack commented on July 23, 2024

Hello, I have the same issue on my side too. Ideas?
Thank you

from draggan.

raiden2012 avatar raiden2012 commented on July 23, 2024

Try install torch with cuda support if it doesn't. My cmd is
pip install torch==2.0.1+cu118 --extra-index-url https://download.pytorch.org/whl/cu118

from draggan.

crazygonuts avatar crazygonuts commented on July 23, 2024

Try install torch with cuda support if it doesn't. My cmd is pip install torch==2.0.1+cu118 --extra-index-url https://download.pytorch.org/whl/cu118

tried this, torch was already installed so it reinstalled but the error is still there

from draggan.

Anastasia-Zyh avatar Anastasia-Zyh commented on July 23, 2024

Hello, I have the same issue on my side too. any ideas?
Thank you

from draggan.

gonduras avatar gonduras commented on July 23, 2024

same shit

from draggan.

Zeqiang-Lai avatar Zeqiang-Lai commented on July 23, 2024

same shit

The latest version would automatically fallback to pytorch native implementation without custom op, which should not need CUDA toolkit anymore.

What the error messages do you face ?

from draggan.

crazygonuts avatar crazygonuts commented on July 23, 2024

On latest ( 4015f1f ) I am now getting this:

No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1'
D:\AIModels\Art\GAN\DragGAN\venv\lib\site-packages\torch\utils\cpp_extension.py:359: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
D:\AIModels\Art\GAN\DragGAN\stylegan2\op\fused_act.py:22: UserWarning: Fail to build torch extension, switch to native implementation
  warnings.warn(
D:\AIModels\Art\GAN\DragGAN\stylegan2\op\upfirdn2d.py:21: UserWarning: Fail to build torch extension, switch to native implementation
  warnings.warn(
Traceback (most recent call last):
  File "D:\AIModels\Art\GAN\DragGAN\gradio_app.py", line 10, in <module>
    from stylegan2.inversion import inverse_image
  File "D:\AIModels\Art\GAN\DragGAN\stylegan2\inversion.py", line 12, in <module>
    from .lpips import util
  File "D:\AIModels\Art\GAN\DragGAN\stylegan2\lpips\util.py", line 11, in <module>
    from . import dist_model
  File "D:\AIModels\Art\GAN\DragGAN\stylegan2\lpips\dist_model.py", line 12, in <module>
    from .base_model import BaseModel
  File "D:\AIModels\Art\GAN\DragGAN\stylegan2\lpips\base_model.py", line 6, in <module>
    from IPython import embed
ModuleNotFoundError: No module named 'IPython'

from draggan.

Zeqiang-Lai avatar Zeqiang-Lai commented on July 23, 2024

On latest ( 4015f1f ) I am now getting this:

No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1'
D:\AIModels\Art\GAN\DragGAN\venv\lib\site-packages\torch\utils\cpp_extension.py:359: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
D:\AIModels\Art\GAN\DragGAN\stylegan2\op\fused_act.py:22: UserWarning: Fail to build torch extension, switch to native implementation
  warnings.warn(
D:\AIModels\Art\GAN\DragGAN\stylegan2\op\upfirdn2d.py:21: UserWarning: Fail to build torch extension, switch to native implementation
  warnings.warn(
Traceback (most recent call last):
  File "D:\AIModels\Art\GAN\DragGAN\gradio_app.py", line 10, in <module>
    from stylegan2.inversion import inverse_image
  File "D:\AIModels\Art\GAN\DragGAN\stylegan2\inversion.py", line 12, in <module>
    from .lpips import util
  File "D:\AIModels\Art\GAN\DragGAN\stylegan2\lpips\util.py", line 11, in <module>
    from . import dist_model
  File "D:\AIModels\Art\GAN\DragGAN\stylegan2\lpips\dist_model.py", line 12, in <module>
    from .base_model import BaseModel
  File "D:\AIModels\Art\GAN\DragGAN\stylegan2\lpips\base_model.py", line 6, in <module>
    from IPython import embed
ModuleNotFoundError: No module named 'IPython'
pip install IPython

this should fix it. we will update the package soon

from draggan.

DuckersMcQuack avatar DuckersMcQuack commented on July 23, 2024

On latest ( 4015f1f ) I am now getting this:

No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1'
D:\AIModels\Art\GAN\DragGAN\venv\lib\site-packages\torch\utils\cpp_extension.py:359: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
D:\AIModels\Art\GAN\DragGAN\stylegan2\op\fused_act.py:22: UserWarning: Fail to build torch extension, switch to native implementation
  warnings.warn(
D:\AIModels\Art\GAN\DragGAN\stylegan2\op\upfirdn2d.py:21: UserWarning: Fail to build torch extension, switch to native implementation
  warnings.warn(
Traceback (most recent call last):
  File "D:\AIModels\Art\GAN\DragGAN\gradio_app.py", line 10, in <module>
    from stylegan2.inversion import inverse_image
  File "D:\AIModels\Art\GAN\DragGAN\stylegan2\inversion.py", line 12, in <module>
    from .lpips import util
  File "D:\AIModels\Art\GAN\DragGAN\stylegan2\lpips\util.py", line 11, in <module>
    from . import dist_model
  File "D:\AIModels\Art\GAN\DragGAN\stylegan2\lpips\dist_model.py", line 12, in <module>
    from .base_model import BaseModel
  File "D:\AIModels\Art\GAN\DragGAN\stylegan2\lpips\base_model.py", line 6, in <module>
    from IPython import embed
ModuleNotFoundError: No module named 'IPython'
pip install IPython

this should fix it. we will update the package soon

Just did, still the same as the lads above.

from draggan.

ovanderz avatar ovanderz commented on July 23, 2024

I'm getting the same error. Looking into the cpp_extension.py I get this;

def get_compiler_abi_compatibility_and_version(compiler) -> Tuple[bool, TorchVersion]:
r'''
Determine if the given compiler is ABI-compatible with PyTorch alongside
its version.

Args:
    compiler (str): The compiler executable name to check (e.g. ``g++``).
        Must be executable in a shell process.

Returns:
    A tuple that contains a boolean that defines if the compiler is (likely) ABI-incompatible with PyTorch,
    followed by a `TorchVersion` string that contains the compiler version separated by dots.
'''
if not _is_binary_build():
    return (True, TorchVersion('0.0.0'))
if os.environ.get('TORCH_DONT_CHECK_COMPILER_ABI') in ['ON', '1', 'YES', 'TRUE', 'Y']:
    return (True, TorchVersion('0.0.0'))

# First check if the compiler is one of the expected ones for the particular platform.
if not check_compiler_ok_for_platform(compiler):
    warnings.warn(WRONG_COMPILER_WARNING.format(
        user_compiler=compiler,
        pytorch_compiler=_accepted_compilers_for_platform()[0],
        platform=sys.platform))
    return (False, TorchVersion('0.0.0'))

if IS_MACOS:
    # There is no particular minimum version we need for clang, so we're good here.
    return (True, TorchVersion('0.0.0'))
try:
    if IS_LINUX:
        minimum_required_version = MINIMUM_GCC_VERSION
        versionstr = subprocess.check_output([compiler, '-dumpfullversion', '-dumpversion'])
        version = versionstr.decode(*SUBPROCESS_DECODE_ARGS).strip().split('.')
    else:
        minimum_required_version = MINIMUM_MSVC_VERSION
        compiler_info = subprocess.check_output(compiler, stderr=subprocess.STDOUT)
        match = re.search(r'(\d+)\.(\d+)\.(\d+)', compiler_info.decode(*SUBPROCESS_DECODE_ARGS).strip())
        version = ['0', '0', '0'] if match is None else list(match.groups())
except Exception:
    _, error, _ = sys.exc_info()
    warnings.warn(f'Error checking compiler version for {compiler}: {error}')
    return (False, TorchVersion('0.0.0'))

if tuple(map(int, version)) >= minimum_required_version:
    return (True, TorchVersion('.'.join(version)))

compiler = f'{compiler} {".".join(version)}'
warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))

return (False, TorchVersion('.'.join(version)))

It seems to me like there isn't an ABI compatability option for Windows (maybe?) (I'm a noob. does this make any sense?)

from draggan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.