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]: No module named 'xformers.ops'; 'xformers' is not a package #5993

Closed
1 task done
Aspector1 opened this issue Dec 24, 2022 · 4 comments
Closed
1 task done

[Bug]: No module named 'xformers.ops'; 'xformers' is not a package #5993

Aspector1 opened this issue Dec 24, 2022 · 4 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@Aspector1
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

No module 'xformers'. Proceeding without it.
Cannot import xformers
Traceback (most recent call last):
  File "C:\WBC\stable-diffusion-webui\modules\sd_hijack_optimizations.py", line 18, in <module>
    import xformers.ops
ModuleNotFoundError: No module named 'xformers.ops'; 'xformers' is not a package

Steps to reproduce the problem

  1. Update stable-diffusion-webuit to the latest build
  2. Run the webui-user.bat file
  3. Profit

What should have happened?

Stable diffusion will run along with xformers without any problems.

Commit where the problem happens

5927d3f

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

--force-enable-xformers --medvram --vae-path models/VAE/vae-ft-ema-560000-ema-pruned.ckpt

Additional information, context and logs

No response

@Aspector1 Aspector1 added the bug-report Report of a bug, yet to be confirmed label Dec 24, 2022
@ataa
Copy link

ataa commented Dec 24, 2022

#5959

@AlexxB31
Copy link

AlexxB31 commented May 20, 2023

I get the same error - what is the soultion?

@TaoismDeepLake
Copy link

I get the same error - what is the soultion?

"Change '--force-enable-xformers' to '--xformers'"

@sanromd
Copy link

sanromd commented Jul 28, 2023

I see the same error. I tried running launch.py with the options --xformers and --force-enable-xformers. I also tested --reinstall-xformers. None of these options fixed the problem. If I try to force loading xformers I get the following error:

No module 'xformers'. Proceeding without it.
*** Cannot import xformers
    Traceback (most recent call last):
      File "$PATH_TO_AUTOMATIC!111/modules/sd_hijack_optimizations.py", line 156, in <module>
        import xformers.ops
    ModuleNotFoundError: import of xformers halted; None in sys.modules


However, xformers is installed in the environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

5 participants