Instructions to use AbdulElahGwaith/diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AbdulElahGwaith/diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("AbdulElahGwaith/diffusers", 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
Download docker/diffusers-pytorch-xformers-cuda/Dockerfile from AbdulElahGwaith/diffusers: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/AbdulElahGwaith/diffusers/resolve/main/docker/diffusers-pytorch-xformers-cuda/Dockerfile
- Command line
-
hf download hf://AbdulElahGwaith/diffusers/docker/diffusers-pytorch-xformers-cuda/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/AbdulElahGwaith/diffusers/resolve/main/docker/diffusers-pytorch-xformers-cuda/Dockerfile
1.27 kB
| FROM nvidia/cuda:12.1.0-runtime-ubuntu20.04 | |
| LABEL maintainer="Hugging Face" | |
| LABEL repository="diffusers" | |
| ARG PYTHON_VERSION=3.12 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN apt-get -y update \ | |
| && apt-get install -y software-properties-common \ | |
| && add-apt-repository ppa:deadsnakes/ppa && \ | |
| apt-get update | |
| RUN apt install -y bash \ | |
| build-essential \ | |
| git \ | |
| git-lfs \ | |
| curl \ | |
| ca-certificates \ | |
| libglib2.0-0 \ | |
| libsndfile1-dev \ | |
| libgl1 \ | |
| python3 \ | |
| python3-pip \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN curl -LsSf https://astral.sh/uv/install.sh | sh | |
| ENV PATH="/root/.local/bin:$PATH" | |
| ENV VIRTUAL_ENV="/opt/venv" | |
| ENV UV_PYTHON_INSTALL_DIR=/opt/uv/python | |
| RUN uv venv --python ${PYTHON_VERSION} --seed ${VIRTUAL_ENV} | |
| ENV PATH="$VIRTUAL_ENV/bin:$PATH" | |
| # pre-install the heavy dependencies (these can later be overridden by the deps from setup.py) | |
| RUN uv pip install --no-cache-dir \ | |
| torch \ | |
| torchvision \ | |
| torchaudio | |
| RUN uv pip install --no-cache-dir "git+https://github.com/huggingface/diffusers.git@main#egg=diffusers[test]" | |
| # Extra dependencies | |
| RUN uv pip install --no-cache-dir \ | |
| accelerate \ | |
| numpy==1.26.4 \ | |
| pytorch-lightning \ | |
| hf_xet \ | |
| xformers | |
| CMD ["/bin/bash"] | |