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/scripts/test_sbi.sh from deepsafe/deepsafe-services: direct link, hf CLI and curl.
- Browser
- Download file 1.72 kB
-
https://huggingface.co/deepsafe/deepsafe-services/resolve/main/video/fake-stormer/model_code/scripts/test_sbi.sh
- Command line
-
hf download hf://deepsafe/deepsafe-services/video/fake-stormer/model_code/scripts/test_sbi.sh
-
curl -L -o test_sbi.sh https://huggingface.co/deepsafe/deepsafe-services/resolve/main/video/fake-stormer/model_code/scripts/test_sbi.sh
1.72 kB
| # 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 | |