Commit Graph

142 Commits

Author SHA1 Message Date
Adam Ladachowski 36b686ba6b 💬 Commit message: Update 2026-02-16 00:44:07, 3 files, 15 lines
📁 Files changed: 3
📝 Lines changed: 15

  • logo.png
  • logo.svg
  • screenshot.png
2026-02-16 00:44:07 +01:00
Adam Ladachowski 27d119f920 Replace username/password auth with GitHub OAuth for ComfyUI proxy
- Add GitHub OAuth flow with /comfy/auth/github and /comfy/auth/callback
- User allowlist via GITHUB_ALLOWED_USERS environment variable
- CSRF protection with state parameter
- Keep same dark mode login page design (saved screenshot)
- Strip Origin header from proxied requests (fixes ComfyUI 403s)
- Add manual CORS headers to proxy responses

Env vars: GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, GITHUB_ALLOWED_USERS

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 00:36:11 +01:00
Adam Ladachowski 4302d76d61 Strip Origin header - ComfyUI blocks CORS requests 2026-02-15 23:57:35 +01:00
Adam Ladachowski 1692789a01 Add debug logging 2026-02-15 23:56:34 +01:00
Adam Ladachowski 3dbd72233b Add manual CORS headers to ComfyUI proxy 2026-02-15 23:56:00 +01:00
Adam Ladachowski 34f683ad56 Disable CORS entirely 2026-02-15 23:54:51 +01:00
Adam Ladachowski ff9736dbe6 Fix CORS: allow_credentials must be False for wildcard origins
CORS spec doesn't allow credentials with wildcard origins.
This was causing 403 for all crossorigin module preloads.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:53:53 +01:00
Adam Ladachowski 2ea8bbeafd Allow entire assets/ path without auth for ComfyUI proxy
Simpler approach - just allow all requests to assets/ directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:40:40 +01:00
Adam Ladachowski 7caed3bbea Allow CORS preflight OPTIONS requests without auth
CORS preflight requests don't send cookies, so they were failing auth.
Now OPTIONS requests are allowed through without authentication.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:38:23 +01:00
Adam Ladachowski d589957cf1 Allow static assets without auth for ComfyUI proxy
modulepreload links use crossorigin attribute which doesn't send
cookies, so static assets (JS, CSS, fonts, images, JSON) are now
allowed without session authentication.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:35:11 +01:00
Adam Ladachowski ff2319a50e 💬 Commit message: Update 2026-02-15 23:33:18, 3 files, 91 lines
📁 Files changed: 3
📝 Lines changed: 91

  • .coverage
  • CLAUDE.md
  • uv.lock
2026-02-15 23:33:18 +01:00
Adam Ladachowski f1ab0d6f05 Add ComfyUI reverse proxy with session authentication
- New /comfy/* routes that proxy to local ComfyUI instance
- Dark mode login page with session-based auth (HMAC-signed cookies)
- HTTP proxy for all ComfyUI requests
- WebSocket proxy for real-time features
- Environment variables: COMFYUI_URL, COMFYUI_USER, COMFYUI_PASS, SESSION_SECRET
- Added websockets and python-multipart to server dependencies

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:29:48 +01:00
Adam Ladachowski 023eae66d7 💬 Commit message: Update 2026-02-15 23:19:02, 1 files, 116 lines
📁 Files changed: 1
📝 Lines changed: 116

  • CLAUDE.md
2026-02-15 23:19:02 +01:00
Adam Ladachowski c9d76dc382 Disable CORS 2026-02-15 21:45:23 +01:00
Adam Ladachowski 08e612ffa0 Add HuggingFace model caching to database
- New tables: hf_models, hf_model_tags, hf_safetensor_files
- Cache HF search results automatically
- Add search_hf_models(), get_hf_model() methods
- Include hf_models in stats

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 21:18:24 +01:00
Adam Ladachowski d79861df53 Remove redundant /api/civitai/search endpoint
Unified search at /api/search handles both CivitAI and HuggingFace.
CivitAI routes now only provide:
- /api/civitai/model/{id} - get model by ID

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 21:15:24 +01:00
Adam Ladachowski 081bb3d371 Update README with unified search and TypeScript client
- Document unified search with --provider flag (civitai, hf, all)
- Add /api/search to server endpoints
- Add TypeScript client section (@saiden/tensors)
- Add public API info (tensors-api.saiden.dev)
- Update search options table with provider column

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 21:09:11 +01:00
Adam Ladachowski a47237e5f7 💬 Commit message: Update 2026-02-15 21:04:01, 1 files, 0 lines
📁 Files changed: 1
📝 Lines changed: 0

  • .coverage
2026-02-15 21:04:01 +01:00
Adam Ladachowski 87ab5c44bb Make console parameter optional in search_civitai
- Console is now optional for headless/server usage
- Progress spinner only shown when console is provided
- Error messages print only when console is provided

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 19:59:55 +01:00
Adam Ladachowski fb27f8a9b0 Fix formatting issues
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 19:57:55 +01:00
Adam Ladachowski 24aaca2a48 Fix lint ignores for test files
- Add PLC0415, ARG001, ARG005, F841 to test file ignores
- Remove now-redundant inline noqa comments

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 19:56:49 +01:00
Adam Ladachowski 9f9f137f68 Unify CivitAI and HuggingFace search into single endpoint
- Add --provider flag to search command (civitai, hf, or all)
- Default to searching both providers simultaneously
- Add /api/search unified REST endpoint
- Map common parameters (sort, author, tag) across providers
- Remove separate `hf search` subcommand (use `search -P hf`)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 19:35:38 +01:00
Adam Ladachowski eb151dac8d Add Hugging Face Hub integration for safetensor files
- Add `tsr hf search` to search HF models with safetensor files
- Add `tsr hf get` to view model info and list safetensor files
- Add `tsr hf files` to list safetensor files in a model
- Add `tsr hf dl` to download safetensor files from HF

Uses official huggingface_hub library for API access.
Only safetensor files are supported (enforced at search and download).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 19:27:23 +01:00
Adam Ladachowski 29d96e2a00 Bump to v0.1.18, add icon and badges to README
- Add SVG icon with red rounded border "T"
- Add PyPI version, coverage, Python version, and license badges
- Remove video embed from README
- Center header with icon

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 19:13:47 +01:00
Adam Ladachowski e4fc392a90 Expand server test coverage from 66% to 73%
Add comprehensive tests for:
- Download routes helper functions (_format_size, _get_output_dir, _resolve_version_id)
- Background download task execution (success, failure, exception handling)
- Progress callback with different sizes (bytes, KB, MB, GB)
- Auto-linking downloaded files to CivitAI
- Database file lookup and linking with CivitAI matches
- CivitAI cache failure handling
- Gallery edge cases and metadata operations
- Server initialization and OpenAPI schema

Server module coverage now:
- auth.py: 100%
- civitai_routes.py: 98%
- db_routes.py: 97%
- download_routes.py: 98%
- gallery_routes.py: 98%
- gallery.py: 95%

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 19:11:25 +01:00
Adam Ladachowski a68ab90025 Bump version to 0.1.17 2026-02-15 18:58:27 +01:00
Adam Ladachowski f2df2bbefa 💬 Commit message: Update 2026-02-15 18:38:39, 2 files, 121 lines
📁 Files changed: 2
📝 Lines changed: 121

  • README.md
  • civitai_routes.py
2026-02-15 18:38:39 +01:00
Adam Ladachowski ab3660a175 💬 Commit message: Update 2026-02-15 18:22:20, 3 files, 101 lines
📁 Files changed: 3
📝 Lines changed: 101

  • config.py
  • __init__.py
  • auth.py
2026-02-15 18:22:20 +01:00
Adam Ladachowski 205e6dbdf2 💬 Commit message: Update 2026-02-15 18:14:49, 1 files, 39 lines
📁 Files changed: 1
📝 Lines changed: 39

  • cli.py
2026-02-15 18:14:49 +01:00
Adam Ladachowski 5f71710298 💬 Commit message: Update 2026-02-15 18:00:36, 4 files, 228 lines
📁 Files changed: 4
📝 Lines changed: 228

  • pyproject.toml
  • api.py
  • cli.py
  • config.py
2026-02-15 18:00:36 +01:00
Adam Ladachowski 1d41f924bf 💬 Commit message: Update 2026-02-15 17:55:57, 7 files, 47 lines
📁 Files changed: 7
📝 Lines changed: 47

  • pyproject.toml
  • __init__.py
  • civitai_routes.py
  • db_routes.py
  • download_routes.py
  • gallery_routes.py
  • uv.lock
2026-02-15 17:55:57 +01:00
Adam Ladachowski 0ce7744324 💬 Commit message: Update 2026-02-15 17:50:28, 6 files, 110 lines
📁 Files changed: 6
📝 Lines changed: 110

  • deploy.md
  • Dockerfile
  • Dockerfile.rocm
  • README.md
  • deploy.sh
  • cli.py
2026-02-15 17:50:28 +01:00
Adam Ladachowski 6fe4c11683 💬 Commit message: Update 2026-02-15 15:58:14, 1 files, 62 lines
📁 Files changed: 1
📝 Lines changed: 62

  • Dockerfile.rocm
2026-02-15 15:58:14 +01:00
Adam Ladachowski f510fa3b78 💬 Commit message: Update 2026-02-15 09:34:30, 1 files, 49 lines
📁 Files changed: 1
📝 Lines changed: 49

  • Dockerfile
2026-02-15 09:34:30 +01:00
Adam Ladachowski e4e733c651 💬 Commit message: Update 2026-02-15 09:11:32, 1 files, 60 lines
📁 Files changed: 1
📝 Lines changed: 60

  • Dockerfile
2026-02-15 09:11:32 +01:00
Adam Ladachowski 71af9f3d4b 💬 Commit message: Update 2026-02-15 08:56:49, 5 files, 971 lines
📁 Files changed: 5
📝 Lines changed: 971

  • package.json
  • comfy-client.ts
  • comfy.ts
  • tsconfig.json
  • tsconfig.node.json
2026-02-15 08:56:49 +01:00
Adam Ladachowski 688d824cac 💬 Commit message: Update 2026-02-15 08:56:42, 5 files, 971 lines
📁 Files changed: 5
📝 Lines changed: 971

  • package.json
  • comfy-client.ts
  • comfy.ts
  • tsconfig.json
  • tsconfig.node.json
2026-02-15 08:56:42 +01:00
Adam Ladachowski 1d1cd36594 💬 Commit message: Update 2026-02-15 08:34:49, 38 files, 4477 lines
📁 Files changed: 38
📝 Lines changed: 4477

  • deploy.md
  • .coverage
  • deploy.sh
  • cli.py
  • comfy.py
  • __init__.py
  • comfy_routes.py
  • index-BEOoAFTp.css
  • index-Wi7i1Rks.js
  • materialdesignicons-webfont-B7mPwVP_.ttf
  • materialdesignicons-webfont-CSr8KVlo.eot
  • materialdesignicons-webfont-Dp5v-WZN.woff2
  • materialdesignicons-webfont-PXm3-2wK.woff
  • index.html
  • vite.svg
  • .gitignore
  • extensions.json
  • README.md
  • index.html
  • package-lock.json
  • package.json
  • vite.svg
  • App.vue
  • client.ts
  • vue.svg
  • DownloadsPanel.vue
  • GalleryView.vue
  • GenerateView.vue
  • ModelCard.vue
  • SearchView.vue
  • main.ts
  • app.ts
  • index.ts
  • vite-env.d.ts
  • tsconfig.app.json
  • tsconfig.json
  • tsconfig.node.json
  • vite.config.ts
2026-02-15 08:34:49 +01:00
Adam Ladachowski 3638bd7d81 💬 Commit message: Update 2026-02-15 08:03:38, 10 files, 372 lines
📁 Files changed: 10
📝 Lines changed: 372

  • deploy.md
  • .coverage
  • deploy.sh
  • __init__.py
  • comfy_routes.py
  • index-BEOoAFTp.css
  • index-Wi7i1Rks.js
  • index.html
  • GenerateView.vue
  • app.ts
2026-02-15 08:03:38 +01:00
Adam Ladachowski 356d8fd156 💬 Commit message: Update 2026-02-15 06:21:35, 7 files, 1559 lines
📁 Files changed: 7
📝 Lines changed: 1559

  • .coverage
  • cli.py
  • __init__.py
  • conftest.py
  • test_client.py
  • test_generate.py
  • test_server.py
2026-02-15 06:21:35 +01:00
Adam Ladachowski c419e443ae 💬 Commit message: Update 2026-02-15 06:15:02, 11 files, 1240 lines
📁 Files changed: 11
📝 Lines changed: 1240

  • client.py
  • __init__.py
  • _http.py
  • generation.py
  • info.py
  • params.py
  • util.py
  • generate_routes.py
  • models_routes.py
  • routes.py
  • sd_client.py
2026-02-15 06:15:02 +01:00
Adam Ladachowski e016c01370 💬 Commit message: Update 2026-02-15 06:14:53, 5 files, 260 lines
📁 Files changed: 5
📝 Lines changed: 260

  • output.png
  • pyproject.toml
  • cli.py
  • comfy.py
  • uv.lock
2026-02-15 06:14:53 +01:00
Adam Ladachowski dfca42ac72 💬 Commit message: Update 2026-02-15 05:54:30, 3 files, 363 lines
📁 Files changed: 3
📝 Lines changed: 363

  • output.png
  • cli.py
  • comfy.py
2026-02-15 05:54:30 +01:00
Adam Ladachowski 8beb92d83a 💬 Commit message: Update 2026-02-15 05:34:38, 4 files, 75 lines
📁 Files changed: 4
📝 Lines changed: 75

  • .coverage
  • gguf.sh
  • cli.py
  • generate_routes.py
2026-02-15 05:34:38 +01:00
Adam Ladachowski 8b3e19d237 💬 Commit message: Update 2026-02-15 05:04:35, 10 files, 374 lines
📁 Files changed: 10
📝 Lines changed: 374

  • convert.sh
  • index-BQdjF_w0.css
  • index-CKJOpgtQ.js
  • index-DEHUU-Zz.js
  • index-Ljwp9hgM.css
  • index.html
  • App.vue
  • DownloadsPanel.vue
  • ModelCard.vue
  • app.ts
2026-02-15 05:04:35 +01:00
Adam Ladachowski 0cd3216125 💬 Commit message: Update 2026-02-15 00:07:11, 20 files, 231 lines
📁 Files changed: 20
📝 Lines changed: 231

  • .coverage
  • models.db
  • screenshot.png
  • tensors-deployed.png
  • tensors-dropdown.png
  • tensors-final.png
  • tensors-fixed.png
  • tensors-reloaded.png
  • tensors-ui.png
  • civitai_routes.py
  • generate_routes.py
  • models_routes.py
  • sd_client.py
  • index-BQdjF_w0.css
  • index-CKJOpgtQ.js
  • index-DmOZ-7Sw.js
  • index.html
  • GenerateView.vue
  • app.ts
  • index.ts
2026-02-15 00:07:11 +01:00
Adam Ladachowski 80faead7eb 💬 Commit message: Update 2026-02-14 22:47:41, 18 files, 494 lines
📁 Files changed: 18
📝 Lines changed: 494

  • deploy.md
  • TASK.md
  • justfile
  • deploy.sh
  • config.py
  • __init__.py
  • generate_routes.py
  • models_routes.py
  • routes.py
  • sd_client.py
  • index-CcuP2dTH.css
  • index-DmOZ-7Sw.js
  • index-J_qzb7Jl.js
  • index-QncGJEyk.css
  • index.html
  • client.ts
  • GenerateView.vue
  • app.ts
2026-02-14 22:47:41 +01:00
Adam Ladachowski b638ec9385 💬 Commit message: Update 2026-02-14 21:49:53, 1 files, 8 lines
📁 Files changed: 1
📝 Lines changed: 8

  • justfile
2026-02-14 21:49:53 +01:00
Adam Ladachowski 8353899cf0 💬 Commit message: Update 2026-02-14 21:47:42, 1 files, 110 lines
📁 Files changed: 1
📝 Lines changed: 110

  • STUFF.md
2026-02-14 21:47:42 +01:00
Adam Ladachowski c156f6826b 💬 Commit message: Update 2026-02-14 09:01:09, 7 files, 66 lines
📁 Files changed: 7
📝 Lines changed: 66

  • pyproject.toml
  • screenshot.png
  • client.ts
  • GalleryView.vue
  • SearchView.vue
  • index.ts
  • uv.lock
2026-02-14 09:01:09 +01:00