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

cannot import name 'StableDiffusionInstructPix2PixPipeline' from 'diffusers' #29

Closed
911964 opened this issue Jan 22, 2023 · 2 comments
Closed

Comments

@911964
Copy link

911964 commented Jan 22, 2023

Hi,

After cloning the repository and setting up the environment, I keep getting the following error when trying to run edit_app.py:

(ip2p) PS C:\Users\julia\instruct-pix2pix> python edit_app.py
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ C:\Users\julia\instruct-pix2pix\edit_app.py:9 in │
│ │
│ 6 import gradio as gr │
│ 7 import torch │
│ 8 from PIL import Image, ImageOps │
│ ❱ 9 from diffusers import StableDiffusionInstructPix2PixPipeline │
│ 10 │
│ 11 │
│ 12 help_text = """ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: cannot import name 'StableDiffusionInstructPix2PixPipeline' from 'diffusers'
(C:\Users\julia.conda\envs\ip2p\lib\site-packages\diffusers_init_.py)

Do you have a suggestion for how I could fix this? Thank you very much in advance

@patrickvonplaten
Copy link
Contributor

Hey @911964,

Could you upgrade diffusers to current main?:

pip install git+https://github.com/huggingface/diffusers.git

and then:

from diffusers import StableDiffusionInstructPix2PixPipeline

should work

Repository owner deleted a comment from Kundanagrawalofficial Jan 22, 2023
@holynski
Copy link
Collaborator

Looks like this is an issue setting up the code from the HuggingFace space. Above comment should resolve the issue, so I'm closing for now, but feel free to keep commenting.

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

3 participants