-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Error running stable diffusion in colab. #9941
Comments
Hi. As the error states, this does not seem related to Diffusers. Could you try and make sure that torchvision is correctly installed in Colab? If you see that it is being installed/upgraded/downgraded when you do If the torchvision version you are using does not match the one required by Diffusers, or is the latest release (which might be untested to work by us), you could be facing these errors. |
Hey @Mikeskates There is no a bug or a issue in StableDiffusionPipeline is working Fine and checkout Diffusers tutorial here to understand better about diffusers Library. !pip install diffusers accelerate transformers
import torch
from diffusers import StableDiffusionPipeline
from diffusers import DPMSolverMultistepScheduler
pipe = StableDiffusionPipeline.from_pretrained("IDK-ab0ut/Yiffymix_v43",torch_dtype=torch.float16)
pipe = pipe.to("cuda")
pipe.safety_checker = None
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config) For further discussion feel free to ask in discussion tab here |
Thank you SahilCarterr |
Feel free to close the issue if you think it's resolved. |
Describe the bug
I have been using a notebook that I found on a youtube video, so that I could use Stable Diffusion to generate images in colab. and it was working for months. but 5 days ago the same code started generating errors and I can no longer use it. Can someone help me?
This is the error I get...
AttributeError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py in _get_module(self, module_name)
1777 try:
-> 1778 return importlib.import_module("." + module_name, self.name)
1779 except Exception as e:
32 frames
AttributeError: partially initialized module 'torchvision' has no attribute 'extension' (most likely due to a circular import)
The above exception was the direct cause of the following exception:
RuntimeError Traceback (most recent call last)
RuntimeError: Failed to import transformers.models.clip.image_processing_clip because of the following error (look up to see its traceback):
partially initialized module 'torchvision' has no attribute 'extension' (most likely due to a circular import)
The above exception was the direct cause of the following exception:
RuntimeError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/diffusers/utils/import_utils.py in _get_module(self, module_name)
853 return importlib.import_module("." + module_name, self.name)
854 except Exception as e:
--> 855 raise RuntimeError(
856 f"Failed to import {self.name}.{module_name} because of the following error (look up to see its"
857 f" traceback):\n{e}"
RuntimeError: Failed to import diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion because of the following error (look up to see its traceback):
Failed to import transformers.models.clip.image_processing_clip because of the following error (look up to see its traceback):
partially initialized module 'torchvision' has no attribute 'extension' (most likely due to a circular import)
Reproduction
#this is the code I used
!pip install diffusers["torch"] transformers
!pip install accelerate
!pip install git+https://github.com/huggingface/diffusers
import torch
from diffusers import StableDiffusionPipeline
from diffusers import DPMSolverMultistepScheduler
pipe = StableDiffusionPipeline.from_pretrained("IDK-ab0ut/Yiffymix_v43",torch_dtype=torch.float16)
pipe = pipe.to("cuda")
pipe.safety_checker = None
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
#it also doesn't work if I change the checkpoint to a different model. Please help! (I don't know anything about coding)
Logs
No response
System Info
I'm using colab so I don't know if you want their system info or the shitty laptop that I am on. on colab I am using a T4GPU. My laptop is garbage. don't really know it's stats, only that this worked for months and now doesn't.
Who can help?
No response
The text was updated successfully, but these errors were encountered: