Skip to content

feat(mac): add Apple Silicon support and runtime hardening#119

Merged
lightningpixel merged 1 commit into
lightningpixel:devfrom
sketchasketch:pr/apple-silicon-support
May 15, 2026
Merged

feat(mac): add Apple Silicon support and runtime hardening#119
lightningpixel merged 1 commit into
lightningpixel:devfrom
sketchasketch:pr/apple-silicon-support

Conversation

@sketchasketch
Copy link
Copy Markdown

Summary

This PR adds first-class Apple Silicon macOS support to Modly and hardens the runtime paths needed
to keep image-to-mesh workflows stable on unified-memory Macs.

Why

Apple Silicon changes the operational constraints for local 3D generation:

  • unified memory makes overlapping heavy stages riskier on 16 GB systems
  • GPU memory is not reliably released by in-process cleanup alone
  • large model downloads need better visibility and resume behavior
  • multi-node extensions need per-node model metadata and runtime selection

What changed

Packaging and platform support

  • add Apple Silicon macOS packaging support
  • package macOS as an arm64 build path
  • keep Intel macOS, Rosetta fallback, and universal binaries out of scope

Extension and model distribution

  • support per-node model metadata such as download_check, hf_include_prefixes,
    hf_skip_prefixes, and node-level parameter defaults
  • keep model weights separate from extension code
  • improve extension install validation and add tests for legacy flat manifests and process-entry
    validation

Runtime and process lifecycle

  • resolve active workflow node metadata from MODEL_DIR so multi-node extensions use the correct
    schema and model directory
  • harden subprocess startup, stderr forwarding, cancellation, and teardown
  • kill the full Python process tree on Unix so child extension runners do not survive app shutdown
    and continue holding memory

Download behavior

  • add byte-level progress, file context, and stall reporting
  • preserve partial downloads and resume against the resolved final URL
  • verify install completion by declared download_check, not directory existence alone

Workflow execution and UX

  • remove implicit process-node input fallback to previous-node output
  • add workflow preflight validation so invalid graph wiring is surfaced before execution
  • show wiring problems through inline warnings and toasts instead of replacing the current mesh
    view with a terminal error state
  • keep generator stderr progress visible and make HUD errors copyable/selectable

Mesh handling and macOS UI

  • fix smooth/decimate for imported meshes by accepting absolute imported paths and writing
    optimized output back into the workspace
  • align macOS window chrome with native traffic-light controls
  • add a top-bar RAM indicator backed by main-process system memory sampling
  • clarify that the built-in remesh Quad-Dominant mode is cleanup, not character retopology

Validation

  • npm test
  • ./node_modules/.bin/tsc --noEmit -p tsconfig.node.json
  • npm run build

Review notes

This PR includes a broad Electron/build toolchain update because the Apple Silicon support in this
branch is validated on that stack.

Some fixes in this PR improve shared runtime behavior across platforms, not only macOS:

  • downloader and install verification hardening
  • subprocess lifecycle and cancellation behavior
  • imported-mesh smooth/decimate handling
  • workflow preflight and explicit process-node input validation

@lightningpixel lightningpixel self-assigned this Apr 28, 2026
@lightningpixel lightningpixel changed the base branch from main to dev May 11, 2026 08:22
@lightningpixel
Copy link
Copy Markdown
Owner

Thank you for your contribution, but you’ll need to resolve the conflicts and avoid changing the package versions for now.

If those versions don’t work in your environment, we can look into changing them later

@hainalstefan-coder
Copy link
Copy Markdown

hainalstefan-coder commented May 12, 2026

Hello, I contacted you on discord, I have a fully working version for mac os, that I am currently using

@sketchasketch sketchasketch force-pushed the pr/apple-silicon-support branch from 62b7dd8 to 8aadb49 Compare May 14, 2026 12:16
@sketchasketch sketchasketch force-pushed the pr/apple-silicon-support branch from 8aadb49 to 3f20868 Compare May 14, 2026 12:33
@sketchasketch
Copy link
Copy Markdown
Author

@lightningpixel Updated!

@lightningpixel lightningpixel merged commit ad3fb29 into lightningpixel:dev May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants