This software is in its Alpha testing phase, indicating it is an early version that may still contain bugs and is not feature-complete. Alpha testing allows users to explore new features and contribute to the development process through feedback. However, using Alpha software in live environments carries risks, including potential instability and data loss. While engaging with Alpha versions can be exciting due to their novelty, it's crucial to proceed with caution to mitigate potential issues.
The Generative AI Control Panel is a sophisticated Flask-based web application designed to manage and monitor services for Generative AIs like A1111, Fooocus, and Kohya. This tool enables easy control over AI services, including starting, stopping, and monitoring through an intuitive web interface.
Designed to run on Linux dedicated Servers.
Tested OS: Ubuntu 22.04.3 LTS
- Service Management: Start, stop, and restart AI services seamlessly.
- Log Aggregation: Centralize bash logs for easy access and troubleshooting.
- Real-Time Monitoring: Watch service logs in real-time with Flask-SocketIO.
- Gunicorn Integration: Ensures smooth operation in production environments.
- Python 3.6+
- Flask
- Flask-SocketIO
- Gunicorn
- Tailer
- Clone this repository to your machine.
- Install dependencies:
pip install Flask Flask-SocketIO gunicorn tailer
- Set up
sudo_password
inserver.py
to enable service control commands. (Currently just a workaround. Never enter your Sudo Password in a python app/config!)
For development purposes, run the Flask app directly:
python server.py
To manage both AI services and the Flask application, you will create systemd service files. Below are generalized examples for an AI service (e.g., Kohya) and the Flask application served by Gunicorn.
[Unit]
Description=Gunicorn instance to serve Flask app
After=network.target
[Service]
User=genericuser
Group=genericgroup
WorkingDirectory=/path/to/flaskapp
ExecStart=/path/to/gunicorn -k eventlet -w 1 wsgi:app --bind 0.0.0.0:5000
[Install]
WantedBy=multi-user.target
[Unit]
Description=Generic AI Service
[Service]
ExecStart=/path/to/ai_service/start_script.sh --options
User=genericuser
Restart=always
RestartSec=3
StandardOutput=append:/path/to/logs/ai_service.log
StandardError=append:/path/to/logs/ai_service_error.log
[Install]
WantedBy=multi-user.target
- Replace
/path/to/ai_service/start_script.sh
,/path/to/logs/
,/path/to/flaskapp
, and/path/to/gunicorn
with the actual paths relevant to your project. - Change
genericuser
andgenericgroup
to neutral user/group names suited for your deployment environment.
To get the web UI online, you only need to enable and start the Flask service. This will automatically manage the AI services through the web interface without manually starting each AI service.
sudo systemctl enable flaskapp.service
sudo systemctl start flaskapp.service
Replace flaskapp.service
with the name of your Flask service file. This command sets up the Flask application to run automatically and allows for the management of AI services via the web UI.
- Access the web interface at
http://localhost:5000
(or your configured host and port). - Control AI services directly from the dashboard.
- View and monitor real-time logs for active services.
- Flask and Flask-SocketIO for backend and real-time communication.
- Gunicorn for production server deployment.
- The AI community for continuous inspiration.