Instructions to use cerspense/zeroscope_v2_576w with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use cerspense/zeroscope_v2_576w with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("cerspense/zeroscope_v2_576w", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
AssertionError: Torch not compiled with CUDA enabled
#42
by Aholicknight - opened
I am getting this error when running the provided python code:
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "E:\video-generation\.venv\Lib\site-packages\diffusers\pipelines\text_to_video_synthesis\pipeline_text_to_video_synth.py", line 644, in __call__
prompt_embeds, negative_prompt_embeds = self.encode_prompt(
^^^^^^^^^^^^^^^^^^^
File "E:\video-generation\.venv\Lib\site-packages\diffusers\pipelines\text_to_video_synthesis\pipeline_text_to_video_synth.py", line 290, in encode_prompt
prompt_embeds = self.text_encoder(text_input_ids.to(device), attention_mask=attention_mask)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\video-generation\.venv\Lib\site-packages\torch\cuda\__init__.py", line 293, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
I also used pip install diffusers transformers accelerate torch to install. I also have a NVIDIA GeForce RTX 3060 Ti. Thank you!
pip install transformers accelerate torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu124
Change cu124 to cu121 if nvidia-smi reports you have a lower cuda version.