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 image/fsd/weights/config.json from deepsafe/deepsafe-services: direct link, hf CLI and curl.
- Browser
- Download file 634 Bytes
-
https://huggingface.co/deepsafe/deepsafe-services/resolve/main/image/fsd/weights/config.json
- Command line
-
hf download hf://deepsafe/deepsafe-services/image/fsd/weights/config.json
-
curl -L -o config.json https://huggingface.co/deepsafe/deepsafe-services/resolve/main/image/fsd/weights/config.json
634 Bytes
| { | |
| "fre": { | |
| "in_channels": 1, | |
| "out_channels": 8, | |
| "kernel_size": 15, | |
| "weights_file": "fre.pt" | |
| }, | |
| "fsd": { | |
| "kernel_size": 11, | |
| "num_scales": 3, | |
| "max_size": 1024, | |
| "resize_mode": "resize_and_crop" | |
| }, | |
| "gmm": { | |
| "n_components": 5, | |
| "covariance_type": "tied", | |
| "weights_file": "gmm.pt" | |
| }, | |
| "transforms": { | |
| "weights_file": "fsd_transforms.pt" | |
| }, | |
| "scoring": { | |
| "train_mean": -42.25325127289017, | |
| "train_std": 706.0556010649537, | |
| "default_threshold": -2.0 | |
| }, | |
| "attribution": { | |
| "weights_file": "attribution_transforms.pt", | |
| "source_gmms_file": "source_gmms.pt" | |
| } | |
| } |