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

Stable Diffiusion example does not exist at all #1475

Open
BrickDesignerNL opened this issue Nov 9, 2024 · 1 comment
Open

Stable Diffiusion example does not exist at all #1475

BrickDesignerNL opened this issue Nov 9, 2024 · 1 comment

Comments

@BrickDesignerNL
Copy link

BrickDesignerNL commented Nov 9, 2024

Describe the bug

  1. Missing step to download the examples, add step to the set-up section to first run:
cd olive
py -m pip install -r requirements.txt
  1. then there are examples like for example for whisper, but not for Stable Diffusion
  2. So comming here to get SD running with the already compiled ONNX files by Qualcomm this is a bummer.
  3. Then looking closer; it turns out it;s in a sub-folder:
    olive\examples\directml\stable_diffusion

Expected instruction should be

mkdir python
cd python
py -m venv olive-ai
py -3.10 -m venv C:\Users\<user_name>\python\olive-ai
cd C:\Users\<user_name>\python\olive-ai\
Scripts\activate
py --version # Just a check
py -m pip install --upgrade pip
py -m pip install olive-ai[directml]==0.4.0
git clone https://github.com/microsoft/olive --branch v0.4.0
cd olive
py -m pip install -r requirements.txt
cd examples\directml\stable_diffusion
py -m pip install -r requirements.txt

note that it will uninstall torch-2.5.1 in favor for torch-1.13.1

Other information

Additional context
I came here via https://github.com/microsoft/Stable-Diffusion-WebUI-DirectML?tab=readme-ov-file to get SD 2.1 running with a local WebUI.

It would be great to have instructions in what path the model files from the Qualcomm site need to be put;
Qualcomm provides optimized TextEncoder_Quantized, VAEDecoder_Quantized, UNet_Quantized files for my CPU/GPU/NPU at:
https://aihub.qualcomm.com/models/stable_diffusion_v2_1_quantized?searchTerm=diff

Because I can't find a \model folder in the \olive\examples\directml\stable_diffusion folder after executing the requirements.txt

Can you help?

@xiaoyu-work
Copy link
Contributor

Hi @BrickDesignerNL , you can update the script to load your downloaded model in the user_script.py: TEXT ENCODER,
VAE DECODER and UNET.

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