Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: CodeFormer does not work anymore #585

Open
4 of 6 tasks
jhmangamer opened this issue Feb 18, 2025 · 1 comment
Open
4 of 6 tasks

[Bug]: CodeFormer does not work anymore #585

jhmangamer opened this issue Feb 18, 2025 · 1 comment

Comments

@jhmangamer
Copy link

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

I think the ZLUDA upgrades broke Codeformer, if you try to use it it fails with NVRTC_ERROR_INVALID_PROGRAM. It did work just fine until the zluda upgrades at the end of last year/start of this year got released. I tried a clean install with the current version, did not work. Tried newest ZLUDA Version (https://github.com/lshqqytiger/ZLUDA/releases/), did not work. It worked under HIP SDK 6.1 in the past, I tried HIP SDK 6.1 and 6.2 and does not work under both versions.

Steps to reproduce the problem

  1. Go to extras tab in the webui and try to use CodeFormer (only CodeFormer checkmarked)
  2. Press Generate
  3. Error

What should have happened?

CodeFormer should work.

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

sysinfo-2025-02-18-12-43.json

Console logs

*** Failed face-restoration inference
    Traceback (most recent call last):
      File "D:\Programme\a1111\stable-diffusion-webui-directml\modules\face_restoration_utils.py", line 86, in restore_with_face_helper
        cropped_face_t = restore_face(cropped_face_t)
      File "D:\Programme\a1111\stable-diffusion-webui-directml\modules\codeformer_model.py", line 53, in restore_face
        return self.net(cropped_face_t, weight=w, adain=True)[0]
      File "D:\Programme\a1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "D:\Programme\a1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
        return forward_call(*args, **kwargs)
      File "D:\Programme\a1111\stable-diffusion-webui-directml\venv\lib\site-packages\spandrel_extra_arches\architectures\CodeFormer\arch\codeformer.py", line 702, in forward
        x = block(x)
      File "D:\Programme\a1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "D:\Programme\a1111\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
        return forward_call(*args, **kwargs)
      File "D:\Programme\a1111\stable-diffusion-webui-directml\venv\lib\site-packages\spandrel_extra_arches\architectures\CodeFormer\arch\codeformer.py", line 570, in forward
        x = swish(x)
    RuntimeError: CUDA NVRTC error: NVRTC_ERROR_INVALID_PROGRAM

Additional information

No response

@d33pth0ug4t
Copy link

I had the same problem, adding
--use-cpu codeformer
to your commandline_args should get things humming again. It's a workaround, not a fix, but it's not stupid when it works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants