Spaces:
Runtime error
Runtime error
Download app.py from radames/Real-Time-SD-Turbo: direct link, hf CLI and curl.
- Browser
- Download file 541 Bytes
-
https://huggingface.co/spaces/radames/Real-Time-SD-Turbo/resolve/cf3ff1a1d5270b32ea74f8694df3ad077490b096/app.py
- Command line
-
hf download hf://spaces/radames/Real-Time-SD-Turbo@cf3ff1a1d5270b32ea74f8694df3ad077490b096/app.py
-
curl -L -o app.py https://huggingface.co/spaces/radames/Real-Time-SD-Turbo/resolve/cf3ff1a1d5270b32ea74f8694df3ad077490b096/app.py
541 Bytes
| from fastapi import FastAPI | |
| from config import args | |
| from device import device, torch_dtype | |
| from app_init import init_app | |
| from user_queue import user_data | |
| from util import get_pipeline_class | |
| print("DEVICE:", device) | |
| print("TORCH_DTYPE:", torch_dtype) | |
| print("PIPELINE:", args.pipeline) | |
| print("SAFETY_CHECKER:", args.safety_checker) | |
| print("TORCH_COMPILE:", args.torch_compile) | |
| app = FastAPI() | |
| pipeline_class = get_pipeline_class(args.pipeline) | |
| pipeline = pipeline_class(args, device, torch_dtype) | |
| init_app(app, user_data, args, pipeline) | |