- Implemented ComfyUI API for generating images with various modes (text-to-image, image-to-image, inpaint, outpaint). - Created GenerateSheet and associated controls for user input on generation settings. - Added subtle scrollbar styles for improved UI experience. - Enhanced canvas input handling to ignore key events when focused on editable elements. - Optimized canvas resizing logic to prevent unnecessary dispatches. - Introduced error handling for generation failures and loading models. - Added functionality to upload images and masks for inpainting.
19 lines
407 B
TypeScript
19 lines
407 B
TypeScript
import { serve } from "bun";
|
|
import { handleComfyApi } from "./app/comfy";
|
|
import index from "./view/index.html";
|
|
|
|
const server = serve({
|
|
routes: {
|
|
"/api/comfy/models": handleComfyApi,
|
|
"/api/comfy/generate": handleComfyApi,
|
|
"/*": index,
|
|
},
|
|
|
|
development: process.env.NODE_ENV !== "production" && {
|
|
hmr: true,
|
|
console: true,
|
|
},
|
|
});
|
|
|
|
console.log(`Server running at ${server.url}`);
|