Instructions to use CompVis/stable-diffusion-v1-4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use CompVis/stable-diffusion-v1-4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", dtype=torch.bfloat16, device_map="cuda") prompt = "A high tech solarpunk utopia in the Amazon rainforest" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
use torch_directml will ModuleNotFoundError: No module named 'torch.privateuseone'
Traceback (most recent call last):
File "C:\ClothesRoomDjangoBackend\OOTDiffusion\run\run_ootd.py", line 95, in
main()
File "C:\ClothesRoomDjangoBackend\OOTDiffusion\run\run_ootd.py", line 35, in main
model = OOTDiffusionHD(device=device)
File "C:\ClothesRoomDjangoBackend\OOTDiffusion\ootd\inference_ootd_hd.py", line 26, in init
).to(self.device)
File "C:\Users\96307.conda\envs\django4\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 864, in to
module.to(device, dtype)
File "C:\Users\96307.conda\envs\django4\lib\site-packages\torch\nn\modules\module.py", line 1174, in to
return self._apply(convert)
File "C:\Users\96307.conda\envs\django4\lib\site-packages\torch\nn\modules\module.py", line 780, in _apply
module._apply(fn)
File "C:\Users\96307.conda\envs\django4\lib\site-packages\torch\nn\modules\module.py", line 780, in _apply
module._apply(fn)
File "C:\Users\96307.conda\envs\django4\lib\site-packages\torch\nn\modules\module.py", line 805, in _apply
param_applied = fn(param)
File "C:\Users\96307.conda\envs\django4\lib\site-packages\torch\nn\modules\module.py", line 1160, in convert
return t.to(
ModuleNotFoundError: No module named 'torch.privateuseone'
if use torch_directml will make this error