https://github.com/romanslack/tensorbin
TensorBin is a scalable open-source platform for uploading, storing, and sharing large AI assets like LoRAs, Stable Diffusion models, and tensors. Built for creators and researchers, it features secure uploads, fast search, and moderation tools with full artistic controlβminus illegal content.
https://github.com/romanslack/tensorbin
Last synced: 9 months ago
JSON representation
TensorBin is a scalable open-source platform for uploading, storing, and sharing large AI assets like LoRAs, Stable Diffusion models, and tensors. Built for creators and researchers, it features secure uploads, fast search, and moderation tools with full artistic controlβminus illegal content.
- Host: GitHub
- URL: https://github.com/romanslack/tensorbin
- Owner: RomanSlack
- License: mit
- Created: 2025-05-26T13:21:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-26T14:20:46.000Z (about 1 year ago)
- Last Synced: 2025-05-26T14:34:45.902Z (about 1 year ago)
- Language: Python
- Size: 71.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TensorBin
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/)
[](https://fastapi.tiangolo.com/)
[](https://nextjs.org/)
[](https://www.postgresql.org/)
[](https://redis.io/)
> **A barebones, self-hosted alternative to CivitAI for sharing AI models and assets**

## π― What is TensorBin?
TensorBin is a **simple, clean, and lightweight** file sharing platform designed specifically for AI practitioners. While CivitAI offers extensive community features, TensorBin focuses on the essentials: **fast uploads, organized storage, and easy sharing** of AI models, datasets, and related files.
### Why TensorBin over CivitAI?
- **π Self-hosted**: Full control over your data and infrastructure
- **β‘ Lightweight**: No bloat, just the features you need
- **π Private**: Perfect for teams, research groups, or personal use
- **π¨ Clean UI**: Minimalist design focused on functionality
- **π± Modern**: Built with contemporary web technologies

## β¨ Features
- **π Smart File Management**: Upload and organize AI models (.safetensors, .ckpt, .pth), images, and datasets
- **π·οΈ Tag System**: Categorize files with custom tags for easy discovery
- **πΌοΈ Image Thumbnails**: Automatic thumbnail generation for visual files
- **π File Details**: Complete metadata including size, type, SHA256, and download counts
- **π Search & Filter**: Find files quickly by name, tags, or file type
- **π₯ Multi-user**: User accounts with individual storage quotas
- **π± Responsive**: Works seamlessly on desktop and mobile
- **π Secure**: JWT authentication with proper file access controls
## π οΈ Tech Stack
- **Backend**: FastAPI + PostgreSQL + Redis + Celery
- **Frontend**: Next.js 14 + TypeScript + Tailwind CSS
- **Authentication**: JWT with refresh tokens
- **File Storage**: Local filesystem with SHA256 deduplication
- **Image Processing**: Pillow for thumbnail generation
## π Quick Start
### Prerequisites
- Python 3.12+
- Node.js 18+
- PostgreSQL 15+
- Redis 7+
### 1. Clone the Repository
```bash
git clone https://github.com/yourusername/tensorbin.git
cd tensorbin
```
### 2. Backend Setup
```bash
cd backend
# Install dependencies
pip install -r requirements.txt
# Start PostgreSQL and Redis (using Docker)
cd postgres_redis_docker
docker compose up -d
# Set up database
psql -h localhost -p 5433 -U tensorbin -d tensorbin
# Run SQL commands from documents/manual_database_setup.sql
# Start backend server
cd ..
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
```
### 3. Frontend Setup
```bash
cd frontend
# Install dependencies
npm install
# Start development server
npm run dev
```
### 4. Access TensorBin
- **Frontend**: http://localhost:3000
- **Backend API**: http://localhost:8000
- **API Docs**: http://localhost:8000/docs
## π Usage
1. **Register**: Create an account at `/auth/register`
2. **Upload**: Drag & drop files or click to upload
3. **Organize**: Add titles and tags to your uploads
4. **Share**: Files are accessible to all registered users
5. **Manage**: View, download, or delete your files from the dashboard
## ποΈ Project Structure
```
tensorbin/
βββ backend/ # FastAPI backend
β βββ app/ # Application code
β βββ uploads/ # File storage
β βββ requirements.txt
βββ frontend/ # Next.js frontend
β βββ app/ # Pages and layouts
β βββ components/ # Reusable components
β βββ utils/ # API utilities
βββ documents/ # Setup documentation
```
## π§ Configuration
### Database Ports (if using Docker)
- PostgreSQL: `localhost:5433`
- Redis: `localhost:6380`
### Environment Variables
Backend configuration is handled in `backend/app/config.py` with sensible defaults for development.
## π License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
---
**TensorBin** - Simple, fast, self-hosted AI model sharing β‘