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
File size: 634 Bytes
505afd3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | {
"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"
}
} |