Edit photos by describing the change, on your own GPU. A free, open-source alternative to Nano Banana and ChatGPT image editing: photos stay on your computer, no daily limit. One installer for Windows, Mac and Linux sets up the best open model (Qwen-Image 2.1). MCP server for AI agents.
TypeScript ai-photo-editorcomfyui-alternativegenerative-fillimage-editingimage-generationinpaintinglinuxlocal-aimacosmcpmcp-servernano-banana-alternativeofflinephoto-editorprivacyqwen-imageqwen-image-2-1stable-diffusion-cppvulkanwindows
// The app's real store, except that components read the state computed for the current frame
// instead of the live global state. Each <AppWindow> provides its own state through context, so
// two windows on screen at once (cross-fades) never read each other's state, even when a
// component re-renders after layout. `getState()` (event handlers, a few renders) gets the
// state of the window rendered last.
import { createContext, useContext } from "react";
import * as real from "../../../../src/lib/store";
export * from "../../../../src/lib/store";
let frameState: real.State = real.getState();
export function setFrameState(s: real.State) {
frameState = s;
}
export function getState(): real.State {
return frameState;
}
export const FrameStateContext = createContext<real.State | null>(null);
export function useStore<T>(sel: (s: real.State) => T): T {
return sel(useContext(FrameStateContext) ?? frameState);
}