Commit graph

11 commits

Author SHA1 Message Date
Anil Matcha
46f78f633b fix(local-ai): repoint Anything v5 to working HF mirror (fixes #141)
stablediffusionapi/anything-v5 reorganized into diffusers folder format,
so the single-file checkpoint URL now 404s. Switch to Yntec/AnythingV5
which still hosts Anything-v5.0-PRT.safetensors as a single file.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 23:39:37 +05:30
Anil Matcha
5b860e512b fix(wan2gp): auto-discover Gradio api_names so calls don't hit FnIndexInferError
Wan2GP renames its Gradio api_names between releases (and Pinokio packages
drop them on some endpoints), so our hardcoded fn strings (ltx_video, flux,
qwen_image, wan22_t2v, etc.) failed against any current server with
"Could not infer function index for API name". Now we pull /info at probe
time, cache the registered api_names per base URL, and remap each catalog
entry via exact fn match → fnAliases → fuzzy family+type match. Unmatched
models report a clear unavailableReason in listModels(), and generate()
throws an error listing the real available endpoints instead of a cryptic
Gradio traceback.

Fixes #135.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 13:08:27 +05:30
Anil Matcha
d4e645defc fix(local): route Video Studio uploads + generate through Wan2GP when a local model is selected
Closes the gap reported in #126 where local users hit "Not authorized:
missing or invalid credentials" on upload and couldn't generate video
locally even with WanGP installed. Image, video, and reference uploads
were all hard-wired to the Muapi-hosted upload endpoint, and Video
Studio had no branch into the local Wan2GP provider for generate.

- electron/wan2gpProvider: new wan2gp:upload-file IPC that POSTs to the
  Gradio /upload endpoint, caches the returned path, and rehydrates it
  into a Gradio FileData descriptor on generate. Adds wan2gp:wan22-i2v.
- preload + localInferenceClient: expose uploadFileToWan2gp(file).
- localModels: wan22-i2v entry, isWan2gpModelId, localT2VModels/localI2VModels.
- UploadPicker: accept optional uploadFn + requireApiKey so callers can
  bypass the Muapi auth modal when the active provider is local.
- VideoStudio: merge Wan2GP video models into t2v/i2v lists, route the
  reference-image upload through the local provider when a Wan2GP model
  is selected, skip the Muapi key gate for local generations, call
  localAI.generate, and surface step progress in the button label.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 19:55:35 +05:30
Anil Matcha
6214f865a3 fix(local-ai): correct Dreamshaper 8 download URL
The catalog pointed at huggingface.co/Lykon/dreamshaper-8 which now returns
404 — the live HF repo is huggingface.co/Lykon/DreamShaper. Confirmed by
probing both URLs and downloading the file from the corrected one.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 02:13:58 +05:30
Anil Matcha
032ab0c693 feat(local-ai): add Wan2GP HTTP provider as a second local engine
The desktop app already has a bundled sd.cpp engine for local generation. This
adds a second, complementary engine: an HTTP client that talks to a user-run
Wan2GP Gradio server (https://github.com/deepbeepmeep/Wan2GP). Useful when
sd.cpp can't run a target model — Wan2GP brings video models (Wan 2.2,
Hunyuan, LTX) and large image models (Flux, Qwen-Image) without bundling
Python or weights into the app.

Architecture
- Each model in the unified catalog now carries a `provider` field
  (`'sdcpp' | 'wan2gp'`). The renderer's `localAI.generate()` routes to the
  right backend based on that flag.
- sd.cpp keeps its existing IPC channels (`local-ai:*`) untouched. Wan2GP
  gets its own channel namespace (`wan2gp:*`) and lives in its own
  `electron/lib/wan2gpProvider.js`.
- Wan2GP server URL is persisted in `userData/local-ai/wan2gp.json`.
  `Settings → Local Models` exposes a config bar to test/save the URL.
- Generation streams Gradio v4 SSE protocol; both engines emit progress on
  the shared `local-ai:progress` channel.

ImageStudio
- Local-model dropdown now filters out video models (`type === 'video'`)
  since the studio is image-only. SD 1.5 / SDXL / Z-Image (sd.cpp) and Flux /
  Qwen-Image (Wan2GP) still surface; Wan/Hunyuan/LTX are hidden until the
  Video Studio is wired up to the same surface.
- Progress event handler updated to tolerate both engines' shapes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 02:13:58 +05:30
Anil Matcha
0493e6244b fix(local-ai): walk back releases when latest is partial; broaden Linux match
Fixes #108 — leejet's latest sd.cpp release (master-587-b8bdffc) only
ships Mac arm64, the Windows cudart runtime stub, and Linux ROCm. The
old matcher only ever read `releases/latest` and excluded ROCm/Vulkan,
so Ubuntu/Linux users hit "No binary found for this platform" with no
recovery path. Windows users were also broken: the only Win asset in
the latest release isn't an sd-cli build.

- Walk the last 15 leejet releases until one ships a usable build for
  the current platform, so a partial latest release self-heals to the
  prior tag (master-586 onwards has the full 12-zip matrix).
- Linux: prefer plain x86_64, then vulkan, then rocm (instead of
  rejecting both rocm and vulkan).
- Windows: priority order avx2 > avx > avx512 > noavx > cuda12, and
  skip the standalone `cudart-sd-bin-win-cu12-x64.zip` runtime stub.
- macOS Intel: surface a clear error — leejet only ships arm64.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 10:51:44 +05:30
Anil Matcha
6011fcb0fd feat: use Metal-GPU binary for macOS arm64 local inference
macOS Apple Silicon (darwin-arm64) now downloads the Metal-accelerated
sd-cli from our own GitHub release instead of the stock leejet build,
enabling significantly faster local image generation on M1/M2/M3/M4.
All other platforms continue to use the leejet upstream release.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 18:02:33 +05:30
Anil Matcha
36d392ab78 feat: add local model inference via sd.cpp (Electron-only)
- Scaffold full IPC bridge: preload.js exposes localAI API to renderer
- electron/lib/localInference.js: binary download (Metal-enabled macOS build),
  model management, auxiliary file downloads (Qwen3-4B LLM + FLUX VAE for Z-Image),
  and generation via sd-cli with DYLD_LIBRARY_PATH + xattr quarantine stripping
- electron/lib/modelCatalog.js: Z-Image Turbo/Base (featured) + SD 1.5/SDXL models
- Z-Image requires 3 components loaded via --diffusion-model + --llm + --vae flags
- ImageStudio: Local/API toggle (Electron-only), local model selector, progress bar
- SettingsModal: tabbed UI with Local Models tab (hidden on web/hosted version)
- LocalModelManager: engine status bar, per-model download cards, auxiliary
  component download UI (text encoder + VAE) for Z-Image models
- localInferenceClient.js: safe wrapper with isLocalAIAvailable() guard
- All local features gated behind isLocalAIAvailable() — web version unaffected

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 17:47:17 +05:30
Assem ElQersh
0f4ae55b37 feat: add Linux (Ubuntu) desktop build support
- Add electron:build:linux script and AppImage + .deb targets in package.json
- Fix Electron main.js: ESM → CommonJS, remove macOS-only titleBarStyle on Linux
- Fix createInlineInstructions undefined error in ImageStudio.js
- Fix Cinema Studio asset paths (absolute → relative) for Electron file:// protocol
- Add AppArmor profile for Ubuntu 24.04+ user namespace sandbox fix
- Add Ubuntu install docs and sandbox workaround to README
2026-04-15 00:49:44 +02:00
Anil Matcha
ebcddfa187 Rename project from Open-Higgsfield-AI to Open-Generative-AI
Update all references across source files, config, and docs — including
page titles, app name, package name, Electron window title, and release
asset URLs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 00:14:45 +05:30
Anil Matcha
6e0b18cd22 Add Electron desktop app with macOS DMG and Windows installer support
- Add electron/main.js as the Electron main process
- Configure electron-builder for macOS (x64 + arm64 DMG) and Windows (x64 + arm64 NSIS installer)
- Add build scripts: electron:build (mac), electron:build:win (windows)
- Set vite base to './' for file:// protocol compatibility in Electron
2026-03-18 11:45:23 +05:30