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
sync from GitHub (c4c7b2c)
Browse files
image/universal/requirements.txt
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
fastapi
|
| 2 |
uvicorn
|
| 3 |
-
pillow
|
| 4 |
-
pydantic
|
| 5 |
-
numpy
|
| 6 |
-
torch
|
| 7 |
-
|
|
|
|
| 8 |
ftfy
|
| 9 |
regex
|
|
|
|
| 1 |
fastapi
|
| 2 |
uvicorn
|
| 3 |
+
pillow
|
| 4 |
+
pydantic
|
| 5 |
+
numpy
|
| 6 |
+
# torch and torchvision installed separately in Dockerfile with CUDA support
|
| 7 |
+
# torch==2.5.1+cu121 (see Dockerfile)
|
| 8 |
+
# torchvision==0.20.1+cu121 (see Dockerfile)
|
| 9 |
ftfy
|
| 10 |
regex
|