Instructions to use deepsafe/deepsafe-services with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use deepsafe/deepsafe-services with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("deepsafe/deepsafe-services", 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 video/fake-stormer/model_code/dockerfiles/Dockerfile from deepsafe/deepsafe-services: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/deepsafe/deepsafe-services/resolve/main/video/fake-stormer/model_code/dockerfiles/Dockerfile
- Command line
-
hf download hf://deepsafe/deepsafe-services/video/fake-stormer/model_code/dockerfiles/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/deepsafe/deepsafe-services/resolve/main/video/fake-stormer/model_code/dockerfiles/Dockerfile
1.09 kB
| FROM pytorch/pytorch:1.8.0-cuda11.1-cudnn8-devel | |
| MAINTAINER DatNGUYEN | |
| ENV TZ=Europe/Luxembourg | |
| RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
| RUN apt-key del 7fa2af80 && \ | |
| apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub && \ | |
| apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/7fa2af80.pub | |
| RUN apt-get -y update && \ | |
| apt-get upgrade -y && \ | |
| apt-get install -y libprotobuf-dev protobuf-compiler && \ | |
| apt-get install -y cmake && \ | |
| apt-get install -y git && \ | |
| apt-get install -y libgl1-mesa-dev && \ | |
| apt-get -y update && apt-get install -y libopencv-dev | |
| RUN pip install albumentations==1.1.0 dlib==19.24.0 python-box==7.1.1 imgaug==0.4.0 && \ | |
| pip install imutils==0.5.4 ipython numpy==1.23.3 opencv-python==4.5.1.48 && \ | |
| pip install pandas==1.3.5 Pillow==9.3.0 scikit-image==0.19.3 scipy==1.9.3 simplejson && \ | |
| pip install tensorboardX==2.5.1 natsort==8.4.0 tqdm PyYAML | |
| WORKDIR /workspace | |