添加windows打包逻辑

This commit is contained in:
puke
2025-11-09 20:29:04 +08:00
parent 94dfacc7cd
commit 1f89e643a5
9 changed files with 1225 additions and 3 deletions

View File

@@ -0,0 +1,110 @@
========================================
Pixelle-Video - Windows Portable
========================================
AI-powered video creation platform
Version: {VERSION}
Build Date: {BUILD_DATE}
========================================
Quick Start
========================================
1. Double-click "start.bat" to launch the Web UI
2. Configure your API keys in the Web UI (Settings section)
3. Open your browser at: http://localhost:8501
========================================
Available Launchers
========================================
start.bat - Launch Web UI (Default)
start_api.bat - Launch API Server only (Port 8000)
start_web.bat - Launch Web UI only (Port 8501)
For most users, just use "start.bat"
========================================
First-Time Setup
========================================
1. On first run, the Web UI will start with default configuration
2. Click on "Settings" in the Web UI to configure:
- LLM API Key (OpenAI/Qwen/DeepSeek/etc)
- LLM Base URL and Model
- ComfyUI settings (use RunningHub or local ComfyUI)
3. Click "Save Config" to save your settings
4. Configuration will be automatically saved to config.yaml
========================================
Configuration
========================================
Configuration is done through the Web UI:
1. Launch the application using start.bat
2. Click on "Settings" in the Web UI
3. Fill in the required fields:
- LLM API Key: Your LLM provider API key
- LLM Base URL: LLM API endpoint
- LLM Model: Model name (e.g., gpt-4o, qwen-max)
- ComfyUI URL: For local ComfyUI (default: http://127.0.0.1:8188)
- RunningHub API Key: For cloud image generation (optional)
4. Click "Save Config" to save
The configuration will be automatically saved to Pixelle-Video/config.yaml.
Note: You can also manually edit config.yaml if needed, but the Web UI is recommended.
========================================
Folder Structure
========================================
python/ - Python 3.11 embedded runtime
tools/ - FFmpeg and other utilities
Pixelle-Video/ - Main application
data/ - User data (BGM, templates, workflows)
output/ - Generated videos
========================================
System Requirements
========================================
- Windows 10/11 (64-bit)
- 4GB RAM minimum (8GB recommended)
- Internet connection (for API calls and ComfyUI cloud)
- Modern web browser (Chrome/Edge/Firefox)
========================================
Troubleshooting
========================================
Problem: "Python not found"
Solution: Ensure python/ folder exists and is not corrupted
Problem: "Failed to start"
Solution: Check if Python and dependencies are installed correctly
Problem: "Port already in use"
Solution: Close other applications using port 8501 or 8000
Problem: "Module not found"
Solution: Re-extract the package completely, don't move files
========================================
Support
========================================
GitHub: https://github.com/AIDC-AI/Pixelle-Video
Documentation: https://pixelle.ai/docs
Issues: https://github.com/AIDC-AI/Pixelle-Video/issues
========================================
License
========================================
See LICENSE file in Pixelle-Video/ folder
Copyright (c) 2025 Pixelle.AI

View File

@@ -0,0 +1,40 @@
@echo off
chcp 65001 >nul
setlocal enabledelayedexpansion
echo ========================================
echo Pixelle-Video - Windows Launcher
echo ========================================
echo.
:: Set environment variables
set "PYTHON_HOME=%~dp0python\python311"
set "PATH=%PYTHON_HOME%;%PYTHON_HOME%\Scripts;%~dp0tools\ffmpeg\bin;%PATH%"
set "PROJECT_ROOT=%~dp0Pixelle-Video"
:: Change to project directory
cd /d "%PROJECT_ROOT%"
:: Set PYTHONPATH to project root for module imports
set "PYTHONPATH=%PROJECT_ROOT%"
:: Start Web UI
echo [Starting] Launching Pixelle-Video Web UI...
echo Browser will open at: http://localhost:8501
echo.
echo Note: Configure API keys and settings in the Web UI.
echo Press Ctrl+C to stop the server
echo ========================================
echo.
"%PYTHON_HOME%\python.exe" -m streamlit run web\app.py
if errorlevel 1 (
echo.
echo [ERROR] Failed to start. Please check:
echo 1. Python is properly installed
echo 2. Dependencies are installed
echo.
pause
)

View File

@@ -0,0 +1,42 @@
@echo off
chcp 65001 >nul
setlocal enabledelayedexpansion
echo ========================================
echo Pixelle-Video - API Server Launcher
echo ========================================
echo.
:: Set environment variables
set "PYTHON_HOME=%~dp0python\python311"
set "PATH=%PYTHON_HOME%;%PYTHON_HOME%\Scripts;%~dp0tools\ffmpeg\bin;%PATH%"
set "PROJECT_ROOT=%~dp0Pixelle-Video"
:: Change to project directory
cd /d "%PROJECT_ROOT%"
:: Set PYTHONPATH to project root for module imports
set "PYTHONPATH=%PROJECT_ROOT%"
:: Start API Server
echo [Starting] Launching Pixelle-Video API Server...
echo API will be available at: http://localhost:8000
echo API Documentation: http://localhost:8000/docs
echo.
echo Note: Configure API keys and settings in the Web UI.
echo Press Ctrl+C to stop the server
echo ========================================
echo.
"%PYTHON_HOME%\python.exe" -m uvicorn api.app:app --host 0.0.0.0 --port 8000
if errorlevel 1 (
echo.
echo [ERROR] Failed to start. Please check:
echo 1. Python is properly installed
echo 2. Dependencies are installed
echo 3. Port 8000 is not already in use
echo.
pause
)

View File

@@ -0,0 +1,44 @@
@echo off
chcp 65001 >nul
setlocal enabledelayedexpansion
echo ========================================
echo Pixelle-Video - Web UI Launcher
echo ========================================
echo.
:: Set environment variables
set "PYTHON_HOME=%~dp0python\python311"
set "PATH=%PYTHON_HOME%;%PYTHON_HOME%\Scripts;%~dp0tools\ffmpeg\bin;%PATH%"
set "PROJECT_ROOT=%~dp0Pixelle-Video"
:: Change to project directory
cd /d "%PROJECT_ROOT%"
:: Set PYTHONPATH to project root for module imports
set "PYTHONPATH=%PROJECT_ROOT%"
:: Start Web UI (Standalone mode)
echo [Starting] Launching Pixelle-Video Web UI (Standalone)...
echo Browser will open at: http://localhost:8501
echo.
echo NOTE: This runs Web UI only. For full features, use start.bat
echo or run start_api.bat in another window.
echo Note: Configure API keys and settings in the Web UI.
echo.
echo Press Ctrl+C to stop the server
echo ========================================
echo.
"%PYTHON_HOME%\python.exe" -m streamlit run web\app.py
if errorlevel 1 (
echo.
echo [ERROR] Failed to start. Please check:
echo 1. Python is properly installed
echo 2. Dependencies are installed
echo 3. Port 8501 is not already in use
echo.
pause
)