Commit Graph

51 Commits

Author SHA1 Message Date
Kyle R
576864de25
Merge e9fc673b3c into 7c81b2f27d 2025-10-26 02:25:31 -05:00
Claude
e9fc673b3c
fix: resolve React version conflict for Vercel deployment
Fixed dependency resolution error that was preventing Vercel builds
from completing successfully.

## Problem
Vercel build failed with:
```
npm error ERESOLVE unable to resolve dependency tree
npm error Could not resolve dependency:
npm error peer react@"^18.2.0 || 19.0.0-rc-66855b96-20241106" from next@15.0.3
```

React 19 stable (19.2.0) was being resolved, but Next.js 15.0.3 only
supports React 18.2.0 or specific React 19 RC versions.

## Solution

### 1. Downgraded React to 18.2.0 (Stable)
- Changed react from ^19.0.0-rc.0 → ^18.2.0
- Changed react-dom from ^19.0.0-rc.0 → ^18.2.0
- React 18.2.0 is fully stable and compatible with Next.js 15.0.3

### 2. Added .npmrc Configuration
- Configured npm for optimal Vercel builds
- Disabled legacy-peer-deps (not needed with correct versions)
- Enabled auto-install-peers for smooth dependency resolution
- Performance optimizations for CI/CD environment

### 3. Added vercel.json Configuration
- Optimized build command for monorepo structure
- Configured environment variable references
- Set preferred region (iad1 - Washington DC)
- Framework detection for Next.js

## Files Changed
- apps/web/package.json - React version downgrade
- .npmrc - npm configuration for Vercel
- apps/web/vercel.json - Vercel deployment config

## Testing
Build should now complete successfully on Vercel with:
- npm install 
- npm run build 
- Next.js production build 

## Notes
- React 18.2.0 is the recommended stable version for Next.js 15
- All shadcn/ui components are compatible with React 18
- No breaking changes in application code required
- When Next.js 16 releases, we can upgrade to React 19 stable

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 14:55:30 +00:00
Claude
9a8fcf76cb
docs: add MCP Server setup guide for Claude Desktop integration
Added comprehensive MCP Server configuration guide to enable direct
file access between Claude Desktop and the Wan2.1 PWA project.

Features:
- Step-by-step installation for macOS, Windows, Linux
- Configuration examples with actual paths
- Verification and testing instructions
- Troubleshooting common issues
- Security best practices
- Advanced configuration options
- Comparison with current session workflow

This will help developers and collaborators set up persistent file
access for seamless development with Claude Desktop.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 14:45:06 +00:00
Claude
51c5837c43
feat: Implement Phase 3 - Backend Integration & Critical Polish
This commit implements Phase 3 of the Wan2.1 PWA, closing all critical
integration gaps between frontend, backend, database, and Replicate API.

## Backend Integration 

### Database Writes
- Create generation records BEFORE calling Replicate
- Store job_id for tracking Replicate predictions
- Track progress, status, and completion timestamps
- Save video URLs and error messages

### Credit System
- Atomic credit deduction using database function deduct_credits()
- Automatic refunds on generation failures via refund_credits()
- Complete audit trail in credit_transactions table
- Transaction logging for all credit operations

### Webhook Handler
- Created /api/webhooks/replicate endpoint
- HMAC signature verification for security
- Automatic status updates from Replicate push notifications
- Maps Replicate statuses to application statuses
- Triggers refunds for failed generations

### Updated Generation Flow
1. Check user credits before starting
2. Create generation record (status: queued)
3. Start Replicate job and get job_id
4. Update record with job_id (status: processing)
5. Deduct credits atomically
6. Webhook updates status when complete
7. Polling fallback if webhook fails

## Frontend Enhancements 

### Error Handling
- Added sonner for beautiful toast notifications
- Success/error/loading states with retry actions
- User-friendly error messages
- Providers component wraps app with Toaster

### Form Validation
- Zod schemas for T2V and I2V inputs
- Prompt length validation (10-500 chars)
- Model and resolution validation
- Credit cost calculator

### Credit Management
- useCredits hook for real-time credit fetching
- Optimistic updates on generation start
- Credit refresh functionality
- Loading and error states

### Image Upload
- Drag-and-drop ImageUpload component
- Client-side validation (file type, size)
- Image preview functionality
- Max 10MB size limit with user feedback
- Ready for I2V integration

### Settings Page
- Basic settings page structure
- Placeholders for Profile, Billing, API Keys
- Ready for Phase 4 enhancements

## Database Changes 

### New Migration: 002_credit_system.sql
- credit_transactions table with audit trail
- deduct_credits() function for atomic operations
- add_credits() function for purchases/bonuses
- refund_credits() function for failed generations
- Added job_id, progress, error_message columns to generations

## Documentation 

### PHASE_3_IMPLEMENTATION.md
- Complete implementation guide
- Testing checklist (backend, frontend, E2E)
- Deployment steps with webhook registration
- Known issues and limitations
- Metrics to monitor
- Phase 4 roadmap

## Files Changed

### Backend (4 files)
- apps/api/main.py - Added webhooks router
- apps/api/routes/generation.py - Complete rewrite with DB integration
- apps/api/routes/webhooks.py - NEW webhook handler
- packages/db/migrations/002_credit_system.sql - NEW credit system

### Frontend (7 files)
- apps/web/package.json - Added sonner
- apps/web/src/app/layout.tsx - Added Providers wrapper
- apps/web/src/app/dashboard/settings/page.tsx - NEW settings page
- apps/web/src/components/providers.tsx - NEW toast provider
- apps/web/src/components/generation/image-upload.tsx - NEW upload component
- apps/web/src/lib/hooks/use-credits.ts - NEW credit management hook
- apps/web/src/lib/validation/generation.ts - NEW Zod schemas

### Documentation (1 file)
- PHASE_3_IMPLEMENTATION.md - NEW comprehensive guide

## Testing Required

### Backend
- [ ] Database writes on generation start
- [ ] Credit deduction accuracy
- [ ] Webhook updates from Replicate
- [ ] Refunds on failures

### Frontend
- [ ] Toast notifications
- [ ] Form validation
- [ ] Credit display and warnings
- [ ] Image upload

### Integration
- [ ] End-to-end generation flow
- [ ] Credit deduction → generation → completion
- [ ] Webhook vs polling updates

## Next Steps (Phase 4)

1. Payment integration with Stripe
2. Retry logic for failed generations
3. Cancel in-progress generations
4. In-app video player
5. Batch operations
6. Admin panel

## Environment Variables

### New Required Variables
- REPLICATE_WEBHOOK_SECRET - For webhook signature verification

See PHASE_3_IMPLEMENTATION.md for complete setup instructions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 14:36:07 +00:00
Claude
f21ab74e38
chore: add configuration files for monorepo setup
- Add root package.json and turbo.json
- Add Next.js config files
- Add FastAPI environment example
- Add PWA manifest
- Add ESLint and Prettier config

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 14:19:02 +00:00
Claude
e8fda73741
feat: Add complete Wan2.1 PWA - AI Video Generation Platform
This commit adds a production-ready Progressive Web App for AI-powered video
generation using Wan2.1 models.

Features:
- Next.js 15 frontend with App Router and PWA support
- FastAPI backend with Replicate integration
- 50+ prompt templates across 7 categories
- Supabase authentication and database
- Credit system with usage tracking
- Text-to-Video and Image-to-Video generation
- Complete documentation (setup, deployment, contributing)

Project Structure:
- apps/web: Next.js frontend with shadcn/ui components
- apps/api: FastAPI backend with GPU processing via Replicate
- packages/db: Database schema and migrations for Supabase

Tech Stack:
- Frontend: Next.js 15, shadcn/ui, Tailwind, Zustand, React Hook Form, Zod
- Backend: FastAPI, Replicate, Supabase
- Database: Supabase (Postgres) with RLS
- Infrastructure: Turborepo monorepo, Vercel/Modal deployment

Documentation:
- README.md: Project overview and features
- SETUP.md: Complete setup guide (5-minute quickstart)
- DEPLOYMENT.md: Production deployment instructions
- CONTRIBUTING.md: Contribution guidelines
- PROJECT_SUMMARY.md: Comprehensive project documentation

Ready for development and deployment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 14:18:18 +00:00
Shiwei Zhang
7c81b2f27d
Update README.md 2025-07-17 15:31:19 +08:00
Muyao Niu
261ca43e67
Update README.md (#462) 2025-07-04 15:41:28 +08:00
Shiwei Zhang
8f7f6514f1
Update README.md 2025-06-13 14:15:30 +08:00
Shiwei Zhang
827906c30f
Update README.md 2025-06-05 10:02:00 +08:00
Shiwei Zhang
ec902046f6
Update README.md 2025-05-27 21:17:16 +08:00
Shiwei Zhang
e5a741309d
Update README.md (#406) 2025-05-17 10:57:06 +08:00
Ang Wang
76e9427657
Format the code (#402)
* isort the code

* format the code

* Add yapf config file

* Remove torch cuda memory profiler
2025-05-16 12:35:38 +08:00
Zhen Han
c709fcf0e7
fix vace size (#397) 2025-05-14 22:01:45 +08:00
Ang Wang
18d53feb7a
[feature] Add VACE (#389)
* Add VACE

* Support training with multiple gpus

* Update default args for vace task

* vace block update

* Add vace exmaple jpg

* Fix dist vace fwd hook error

* Update vace exmample

* Update vace args

* Update pipeline name for vace

* vace gradio and Readme

* Update vace snake png

---------

Co-authored-by: hanzhn <han.feng.jason@gmail.com>
2025-05-14 20:44:25 +08:00
Shiwei Zhang
204f899b64
Update README.md 2025-04-22 15:10:03 +08:00
WanX-Video-1
397629b5f5 update readme 2025-04-22 11:11:57 +08:00
WanX-Video-1
d6aadd44cf update community works 2025-04-22 10:50:21 +08:00
WanX-Video-1
325cfd41e6 update community works 2025-04-18 16:02:32 +08:00
yupeng1111
df44622e72
[feature] Wan2.1-FLF2V-14B (#338)
Co-authored-by: 澎鹏 <shiyupeng.syp@taobao.com>
2025-04-17 21:56:46 +08:00
WanX-Video-1
679ccc6c68 update community works 2025-04-02 18:00:23 +08:00
WanX-Video-1
82c6bf86e2 update readme 2025-03-29 18:09:59 +08:00
WanX-Video-1
d1f5144c26 add report 2025-03-28 14:46:31 +08:00
WanX-Video-1
b254e7b7a4 add report 2025-03-28 14:45:59 +08:00
jiangzeyinzi
d6434cf8ef
To support system prompt as a input parameter (#280) 2025-03-28 11:51:31 +08:00
Wenting Shen
bc3249d61c
add free stroage api for FSDP (#277)
Signed-off-by: wenting.swt <wenting.swt@alibaba-inc.com>
2025-03-26 15:49:37 +08:00
Ang Wang
11a6a00822
Add all py files in the subfolders under the "wan" directory through pattern matching (#271) 2025-03-24 17:23:42 +08:00
WanX-Video-1
a78d3be654 update link 2025-03-24 15:38:06 +08:00
WanX-Video-1
412b3e1643 add technical report 2025-03-21 17:51:31 +08:00
Ang Wang
9fb8845009
Add more explanation about the context parallel (#260) 2025-03-20 17:04:49 +08:00
gnebie
0f816057da
Add a pyproject and a separate INSTALL.md (#137)
* Add a pyproject and a detailled separate installation file with a poetry installation to not overcharge the readme

* update mail
2025-03-20 10:16:23 +08:00
Steven-SWZhang
b58b7c5737 update readme 2025-03-07 16:08:20 +08:00
Yingda Chen
d0a086800a
Update prompt_extend.py 2025-03-06 13:11:22 +08:00
Steven-SWZhang
d18cc1b397 update diffusers 2025-03-04 20:17:26 +08:00
Steven-SWZhang
1ccdcaee27 Merge branch 'main' of https://github.com/Wan-Video/Wan2.1 2025-03-04 17:43:12 +08:00
Steven-SWZhang
b11c960542 support diffusers 2025-03-04 17:42:50 +08:00
Chengxi Guo
5cb59ec52b
fix resolution if reload webpage (#86)
Signed-off-by: mymusise <mymusise1@gmail.com>
2025-03-04 16:41:03 +08:00
Chris Z
9d54043a67
Update README.md (#167)
change discord link to avoid expire
2025-03-04 16:39:37 +08:00
Alan May
82c18d91a1
fix: correct Chinese ISO language code typo (#10)
Fix incorrect Chinese language ISO code abbreviation
from CH to ZH
2025-03-03 17:04:13 +08:00
zyckk4
2ef4e2184e
Fix an error saving videos on Windows (#128) 2025-03-03 13:48:19 +08:00
Didier Durand
a326079926
Update README.md: fixing spelling errors / typos (#88)
Hi,
As title says: fixing some issues in the README text. See commit diff for all details.

Best,
Didier
2025-02-28 09:42:41 +08:00
章谨
6797c48002 update comfyui 2025-02-27 12:56:36 +08:00
Yingda Chen
190e928681
add modelscope download cli 2025-02-26 22:31:12 +08:00
WanX-Video
d7b01803de
update gradio (#58) 2025-02-26 20:33:18 +08:00
cocktailpeanut
89b065f4fe
os.path.sep instead of / (#12) 2025-02-26 18:57:30 +08:00
Adrian Corduneanu
0e3c42a830
Update text2video.py to reduce GPU memory by emptying cache (#44)
* Update text2video.py to reduce GPU memory by emptying cache

If offload_model is set, empty_cache() must be called after the model is moved to CPU to actually free the GPU. I verified on a RTX 4090 that without calling empty_cache the model remains in memory and the subsequent vae decoding never finishes.

* Update text2video.py only one empty_cache needed before vae decode
2025-02-26 18:56:57 +08:00
WanX-Video
73648654c5
Update requirements.txt 2025-02-26 12:02:30 +08:00
WanX-Video
a815a48c3e
Update README.md 2025-02-26 11:18:26 +08:00
WanX-Video
04e8653c99
Update README.md 2025-02-25 22:54:11 +08:00
WanX-Video-1
5512ca4b33 init upload 2025-02-25 22:27:54 +08:00