Stability-AI / stable-fast-3d

SF3D: Stable Fast 3D Mesh Reconstruction with UV-unwrapping and Illumination Disentanglement
https://stable-fast-3d.github.io
Other
1.16k stars 117 forks source link

Added fastapi server and Docker files. #41

Open Banbury opened 2 months ago

Banbury commented 2 months ago

I needed a REST API, that I can deploy with Docker, for my workflow. So I wrote a simple one and the necessary Docker files. Since the model is fast enough for me even on CPU, I didn't make the container compatible with CUDA. It allows me to keep Stable Diffusion on the GPU at the same time as stable-fast-3d. Since I have already done the work for it, I thought you might be interested in it. License is CC0, no strings attached.

Start the server with:

fastapi run server.py

If you have trouble starting the FastAPI server, the reason is most likely the __init_.py file in the root directory. FastAPI tries to import server.py as a module, and that executes __init__.py. I'm not sure, why this is there, but you need to delete or rename it, for the server to start.

wiz-inc-a28a8b7b4c[bot] commented 2 months ago

Wiz Scan Summary

Scan Module Critical High Medium Low Info Total
IaC Misconfigurations 0 1 6 2 2 11
Vulnerabilities 0 0 0 0 0 0
Sensitive Data 0 0 0 0 0 0
Secrets 0 0 0 0 0 0
Total 0 1 6 2 2 11

View scan details in Wiz

Banbury commented 1 month ago

UVUnwrapper uses std::exchange, that doesn't seem to exist in newer versions of gcc. That forced me to downgrade the version of Debian.