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: 1,721 Bytes
4b0b144 | 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 | #! /bin/bash
# CUDA_VISIBLE_DEVICES=0 python scripts/test.py --cfg configs/spatial/efn4_fpn_sbi_adv.yaml \
# -i samples/debugs/affine_f_2883.jpg
# CUDA_VISIBLE_DEVICES=0 python scripts/test.py --cfg configs/spatial/vit_sbi_base.yaml \
# -i samples/debugs/affine_f_2883.jpg
CUDA_VISIBLE_DEVICES=0 python scripts/test.py --cfg configs/spatial/vit_sbi_small.yaml \
-i /home/users/XXX/data/FaceForensics++/c0/test/frames/Deepfakes/000_003/000.png
# CUDA_VISIBLE_DEVICES=0,1,2,3 python scripts/test.py --cfg configs/spatial/vit_sbi_large.yaml \
# -i samples/debugs/affine_f_2883.jpg
# CUDA_VISIBLE_DEVICES=0 python scripts/test.py --cfg configs/spatial/swin_sbi_base.yaml \
# -i samples/debugs/affine_f_2883.jpg
# CUDA_VISIBLE_DEVICES=0 python scripts/test.py --cfg configs/spatial/swin_sbi_small.yaml \
# -i samples/debugs/affine_f_2883.jpg
# CUDA_VISIBLE_DEVICES=0 python scripts/test.py --cfg configs/spatial/swin_bi_small.yaml \
# -i samples/debugs/affine_f_2883.jpg
# CUDA_VISIBLE_DEVICES=0,1,2,3 python scripts/test.py --cfg configs/spatial/swin_sbi_tiny.yaml \
# -i samples/debugs/affine_f_2883.jpg
# CUDA_VISIBLE_DEVICES=0,1,2,3 python scripts/test.py --cfg configs/temporal/FakeSFormer_base.yaml \
# -i samples/debugs/affine_f_2883.jpg
|