chengzeyi / stable-fast

Best inference performance optimization framework for HuggingFace Diffusers on NVIDIA GPUs.
MIT License
1.05k stars 59 forks source link

Getting This To Work With SD.Next #119

Closed gohan2091 closed 4 months ago

gohan2091 commented 5 months ago

I'm trying to get Stable Fast working with SD.Next and I run the following command "python cli/install-sf.py" inside the venv folder of SD.Next (Automatic\Venv) and it goes through the motions of installing but fails with errors. I've included a log. Any ideas?

Screenshot 2024-02-06 034809

gohan2091 commented 5 months ago

Error.txt

chengzeyi commented 5 months ago

@gohan2091 Building on Windows could be a complicated job. You could download pre-built wheels for Windows or try with WSL2.

gohan2091 commented 5 months ago

wheels for Windows

Would you mind directing me where to download wheels for Windows? and if there are different versions, what specific version I need? I have tried Googling and I am getting different things come up and I am a bit confused. Also I am not sure what WSL2 is, could you help?

chengzeyi commented 5 months ago

wheels for Windows

Would you mind directing me where to download wheels for Windows? and if there are different versions, what specific version I need? I have tried Googling and I am getting different things come up and I am a bit confused. Also I am not sure what WSL2 is, could you help?

You should visit the GitHub release page of this project to download.

gohan2091 commented 4 months ago

wheels for Windows

Would you mind directing me where to download wheels for Windows? and if there are different versions, what specific version I need? I have tried Googling and I am getting different things come up and I am a bit confused. Also I am not sure what WSL2 is, could you help?

You should visit the GitHub release page of this project to download.

Sorry I am still a bit confused. Where is that? Is it this page? https://github.com/chengzeyi/stable-fast/releases

because all I see are .whl files. After goolging what they are, I renamed the extension and opened in WinRAR. Now I see some folders but I still have no clue what I am doing. I was expecting to see an .exe file to be honest. Then I go to yout installation page: https://github.com/chengzeyi/stable-fast?tab=readme-ov-file#install-prebuilt-wheels and it asks me to enter a pip command? Isn't this already what I tried? If not, how do I do the command? I mean do I run the command in the venv folder of SD.next? sorry for all the questions!

chengzeyi commented 4 months ago

@gohan2091 .whl files are python binary package files. You could use pip to install them.

gohan2091 commented 4 months ago

@gohan2091 .whl files are python binary package files. You could use pip to install them.

I mentioned that above and stated I did not know how to do that. Can someone here help me please? I have downloaded the whl file and extracted the two folders. I have done these two commands and it doesn't help Screenshot 2024-02-12 165206

then I tried "pip3 install wheel"

and get the same error as I quoted in my first post: ERROR: Could not build wheels for stable-fast, which is required to install pyproject.toml-based projects. I've attached a log.

log.txt

chengzeyi commented 4 months ago

Well, you definitely should read the doc of pip to learn how to install wheels. Your command isn't correct and you could ask someone nearby for help.

gohan2091 commented 4 months ago

Well, you definitely should read the doc of pip to learn how to install wheels. Your command isn't correct and you could ask someone nearby for help.

I actually first posted on the SD.Next Discord but they said I should ask for help here. Now I am here, I am no further along to getting this fixed. I tried multiple things and nothing is working. If anyone is reading this and can help me out, please do.

gohan2091 commented 4 months ago

Anyone here who can help me please?

"Download the wheel corresponding to your system from the Releases Page and install it with pip3 install ." -- How do I do this? I open a CMD window where? from my SD.Next folder? from the venv folder? from my desktop? Where do I put the wheel file to install it? does the wheel file have to be in the same area where I open the CMD window?

Rokkonrol commented 4 months ago

@gohan2091 The file doesn't have to be in any specific directory. You just need to have the virtual environment for SD.Next activated when you install it. Activate the environment and then, as an example:

If the current directory contains the .whl file: pip3 install stable_fast-1.0.3+torch211cu121-cp310-cp310-win_amd64.whl

If the file is located outside of the current directory: pip3 install C:/path/to/stable_fast-1.0.3+torch211cu121-cp310-cp310-win_amd64.whl

gohan2091 commented 4 months ago

@gohan2091 The file doesn't have to be in any specific directory. You just need to have the virtual environment for SD.Next activated when you install it. Activate the environment and then, as an example:

If the current directory contains the .whl file: pip3 install stable_fast-1.0.3+torch211cu121-cp310-cp310-win_amd64.whl

If the file is located outside of the current directory: pip3 install C:/path/to/stable_fast-1.0.3+torch211cu121-cp310-cp310-win_amd64.whl

I really appreciate your help. I am hopeful you can stay with me until I can get this sorted. I am unsure what file I need. Here is my system info on SD.Next. I am using Python 3.11.7, torch 2.2.0 and CUDA 12.1. When I go here https://github.com/chengzeyi/stable-fast/releases what file do I need? cp I assume is the python version? So I would select the 311 version? but then it says it's for CUDA 11.8 and I don't see a 12.1 version for Python 3.11, only for Python 3.10. So from my screenshot below, could you help me first of all with what file I need?

Screenshot 2024-02-22 173251

Rokkonrol commented 4 months ago

@gohan2091 There was a new release posted earlier today containing the file you need ( LINK ). Also yes, cp refers to the Python version.

Download the file labeled stable_fast-1.0.3.dev20240222+torch220cu121-cp311-cp311-win_amd64.whl.

I highlighted the file in the attached photo.

releases_file_2

gohan2091 commented 4 months ago

Ok I have the correct file that you mentioned called stable_fast-1.0.3.dev20240222+torch220cu121-cp311-cp311-win_amd64.whl is saved in the automatic folder (C:\Users\assum\AI\SD.Next\automatic) but something unusal is happening now. I believe this part is where you mention I have to activate in a virtual environment? Usually I go to the automatic folder, click the address bar, type cmd, then I enter the command:

venv\scripts\activate.bat

and it should then show: (venv) C:\Users\USER\SD.Next\automatic>

but it's not doing that (venv) part. I also tried venv\scripts\activate.ps1 but nothing changes. Here is a screenshot:

Screenshot 2024-02-22 212159

Screenshot 2024-02-22 212744

Something is wrong there. Because it doesn't show (venv) I think I am not activated. The activate.bat file is empty and shows 0kb. The activate.ps1 file is 26kb though. I ran it in powershell using the ps1 file:

Screenshot 2024-02-22 213949

I also tried it in the unactivated command window:

Screenshot 2024-02-22 212435

I am going to bed shortly so will check a reply tomorrow. I really appreciate your time with me (and patience). I hope we can get this working together. Looks like I am stuck on the fatal error part now.

gohan2091 commented 4 months ago

Trying to do this on my own and failing badly: Screenshot 2024-02-23 210217

gohan2091 commented 4 months ago

@Rokkonrol have you given up on me? I feel I am very close to having this sorted. Please if you have a moment can we finish what we started?

gohan2091 commented 4 months ago

OK I notice something... I changed the directory a few weeks back from assum\SD.Next to assum\AI\SD.Next and the part about python is reading the old directory. Any ideas why? and how I fix that directory issue? maybe that explains why I can't install the file?

gohan2091 commented 4 months ago

Deleted my venv folder and regenerated it. Now installed Stable Fast fine without any issues Screenshot 2024-02-25 231234 I'll close this now. Thank you @Rokkonrol for linking me to the correct file.