HD French - Comic Story Generator Project Summary
Project Overview
This project generates comic stories with AI-generated characters and scenes using machine learning models. The system can create complete comic stories with multiple panels based on different themes. It now includes a web interface for easier story creation.
Current Status
The project has been successfully deployed to a remote server with NVIDIA RTX 3090 GPU and is fully functional. A new web interface has been added for easier access, along with scripts to manage the server and SSH tunnel.
Project Structure
βββ config.js # Main configuration file
βββ .env # API keys (not committed to Git)
βββ .env.example # Example API key configuration
βββ package.json # Node.js project configuration
βββ README.md # Project documentation
βββ server.js # Web server for frontend interface
βββ start_server_remote.sh # Script to start web server on remote server
βββ create_ssh_tunnel.sh # Script to create SSH tunnel
βββ create_ssh_tunnel_bg.sh # Script to create SSH tunnel in background
βββ start_web_interface.sh # Script to start web interface (combined)
βββ web/ # Web interface files
β βββ index.html # Main web interface
β βββ styles.css # Styling for web interface
β βββ script.js # Frontend logic
βββ src/ # Node.js source code
β βββ index.js # Main entry point (API version)
β βββ index.demo.js # Demo version
β βββ utils/
β β βββ fireworks.js # Fireworks AI API client
β βββ models/
β β βββ characterGenerator.js # Character generation
β β βββ personagene.js # Personagene creation
β βββ comics/
β βββ storyGenerator.js # Comic story generation
βββ Python Scripts (on server)
β βββ stable_diffusion_generator.py # Image generation with Stable Diffusion
β βββ comic_story_generator.py # Complete comic story generation
β βββ comic_viewer.py # HTML viewer generation
Server Deployment
- Server: vast.ai instance
- IP: 207.102.87.207
- Port: 53887
- User: root
- Workspace Directory: /workspace/hd-french-setup
- GPU: NVIDIA RTX 3090
Key Components
1. Node.js Backend (Local Development)
- Configuration management
- Fireworks AI API integration
- Character and story generation logic
- Demo mode for testing without API keys
- Web server for frontend interface
2. Python ML Components (Server)
- Stable Diffusion Generator: Creates individual images from text prompts
- Comic Story Generator: Creates complete 5-panel comic stories
- Comic Viewer: Generates HTML pages to view comic stories
3. Web Interface
- HTML/CSS/JS Frontend: User-friendly interface for story creation
- Web Server: Serves frontend files and handles requests
4. Management Scripts
- start_server_remote.sh: Starts web server on remote server in background
- create_ssh_tunnel.sh: Creates SSH tunnel to access web interface
- create_ssh_tunnel_bg.sh: Creates SSH tunnel in background
- start_web_interface.sh: Combined script to start web interface (server + tunnel)
Recent Accomplishments
Comic Story Generated
- Title: "The Quest for the Lost Artifact"
- Theme: Adventure
- Character: A brave elf warrior with silver armor and a magical sword
- Setting: Ancient ruins in a mystical forest
- Panels Generated: 5
- Directory: comic_1756920589
Web Interface Added
- Feature: Browser-based interface for story creation
- Technology: HTML, CSS, JavaScript
- Access: Run
npm run weband visithttp://localhost:8081
Management Scripts Added
- Feature: Easy management of remote server and SSH tunnel
- Technology: Bash scripts
- Access: Run
./start_server_remote.shand./create_ssh_tunnel_bg.sh
Files Created on Server
comic_1756920589/panel_1.png- Establishing shotcomic_1756920589/panel_2.png- Character close-upcomic_1756920589/panel_3.png- Action scenecomic_1756920589/panel_4.png- Climactic scenecomic_1756920589/panel_5.png- Resolutioncomic_1756920589/story_metadata.json- Story metadatacomic_1756920589/comic_story.html- HTML viewer
How to Access the Generated Comic
SSH Connection
ssh -p 53887 root@207.102.87.207
cd /workspace/hd-french-setup
View Generated Files
ls -la comic_1756920589/
Download Files Locally
scp -P 53887 root@207.102.87.207:/workspace/hd-french-setup/comic_1756920589/* .
Running the System
Local Demo (No API Required)
npm run demo
Web Interface
# Start server on remote server
./start_server_remote.sh
# Create SSH tunnel (choose one):
./create_ssh_tunnel.sh # Keeps terminal occupied
./create_ssh_tunnel_bg.sh # Runs in background
# Then visit http://localhost:8082 in your browser
Server-Side Comic Generation
# SSH into server
ssh -p 53887 root@207.102.87.207
# Navigate to project directory
cd /workspace/hd-french-setup
# Generate new comic story
python3 comic_story_generator.py [theme] [title]
# Generate HTML viewer for existing comic
python3 comic_viewer.py comic_1756920589
Supported Story Themes
- Adventure - Default theme
- Mystery - Detective stories
- Romance - Love stories
Performance Information
- Image Generation Time: 1-2 seconds per panel on RTX 3090
- Complete Story Generation: 2-3 minutes for 5 panels
- Model Used: Stable Diffusion v1.5 (public access)
Future Improvements
- Integration with Flux Schnell model (requires Hugging Face access)
- Enhanced web interface with real API integration
- Custom character creation tools
- Additional story themes and templates
- User account system for saving stories
Troubleshooting
Common Issues
- Hugging Face Access: Flux Schnell requires authorized access
- GPU Memory: Large models may require significant VRAM
- Network Latency: SSH connections may have delays
- Web Interface: Ensure port 8081 is available
Solutions
- Use Stable Diffusion as alternative (already implemented)
- Monitor GPU usage with
nvidia-smi - Use background processes for long-running tasks
- Check for port conflicts when running web server
Git Repository
The project is version controlled with Git. Current commit: 0047d5b6
Next Steps
- Continue developing additional features
- Test with different story themes
- Optimize image generation parameters
- Enhance web interface with real API integration
- Add user account system for saving stories
Document created: September 3, 2025 Project Status: Fully functional with active server deployment, web interface, and management scripts