fix: restore ComfyUI as workflow frontend with BoosAPI backend integration
ComfyUI is kept as a visual workflow editor (node-based). All actual
generation goes through BoosAPI's own API via boosapi_comfy_nodes.py
custom nodes (now defaulting to localhost:4000/v1).
Architecture:
BoosAPI (Node.js, port 4000)
├── /video-agent → iframe → ComfyUI (Python, port 8188, CPU)
│ └── custom_nodes/boosapi_comfy_nodes.py
│ └── calls BoosAPI /v1/... API
├── /comfyui-agent → chat interface (direct API calls)
└── /v1/... → API endpoints (LLM, image, TTS, video)
Signed-off-by: boos <boos@boos.lat>
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
import React from 'react';
|
||||
|
||||
export default function ComfyUI() {
|
||||
const [isDark, setIsDark] = React.useState(true);
|
||||
|
||||
React.useEffect(() => {
|
||||
window.location.href = '/comfyui-agent';
|
||||
const el = document.documentElement;
|
||||
const check = () => setIsDark(el.getAttribute('data-theme') !== 'light');
|
||||
check();
|
||||
const mo = new MutationObserver(check);
|
||||
mo.observe(el, { attributes: true, attributeFilter: ['data-theme'] });
|
||||
return () => mo.disconnect();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
@@ -11,14 +18,20 @@ export default function ComfyUI() {
|
||||
width: '100%',
|
||||
height: 'calc(100vh - 56px)',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
background: 'var(--color-bg, #0f0f1a)',
|
||||
color: 'var(--color-text-secondary, #888)',
|
||||
fontSize: '16px',
|
||||
flexDirection: 'column',
|
||||
background: isDark ? '#1a1a2e' : '#f5f5f5',
|
||||
}}
|
||||
>
|
||||
🔄 正在跳转至 AI 视频助手...
|
||||
<iframe
|
||||
src="/comfyui"
|
||||
style={{
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
border: 'none',
|
||||
}}
|
||||
title="ComfyUI"
|
||||
allow="clipboard-read; clipboard-write"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user