Repository navigation
feat(comfyui): 幕匠工作台 - ComfyUI 插件前端设置页(路线 B) - #14
Open
Kim759-sev wants to merge 10 commits into
Open
Kim759-sev wants to merge 10 commits into
Kim759-sev wants to merge 10 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…o feat/mujiang-comfyui-plugin-web
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
设置与视频节点
「本机生成」支持导入 ComfyUI API Format 工作流、指定默认用途槽。选择默认视频模型后,
config.videoModel与工作流设置通过同一次PUT /api/workspace/model-config保存,并携带expectedRevision。节点与设置页通过
GET /api/plugins/mujiang-comfyui/files/presets.json读取档位。节点显示两位小数,例如 124 帧显示 5.17 秒,141 帧显示 5.88 秒。选档时合并写入metadata.providerOptions["mujiang-comfyui"].frames和节点的metadata.seconds(生成配置的videoSeconds来源),保留完整秒数、同一命名空间中的其他字段和其他插件选项。画幅写入size,支持16:9与9:16。分镜批量路由
关键帧和普通批量入口共用逐行解析、费用预估与入队流程。
video_i2v默认工作流(IV2)分镜行时长可同步至绑定的视频节点,已手动修改的节点秒数保留。
四处上游接入文件
web/src/pages/settings/index.tsxweb/src/pages/canvas/use-canvas-storyboard.tsweb/src/components/canvas/canvas-node-prompt-panel-controls.tsx|
web/src/lib/canvas/canvas-generation-config.ts| 预检及任务执行时按分镜实时解析模型,自动模型不写入节点 |IndexedDB 缓存评估
已有服务端修订优先逻辑。
local-workspace-reconcile.ts的selectPreferredCanvasProject对缺少本地副本、仅有摘要、未超出已确认基线或无基线且本地 revision 较旧的情况选用后端文档。对基线之后的本地草稿保留编辑。use-canvas-store.ts的持久化合并会保留内存中已经应用的较新完整文档。use-canvas-document-state.ts通过 SSE 与轮询触发刷新。专项重跑了干净/过期缓存、新草稿保留、服务端 rev2 已先应用而 IndexedDB rev1 随后返回三个用例,3 项通过。本次评估覆盖上述修订条件;尚未用创作者的存量浏览器数据复现。若 T3 仍观察到覆盖,可记录本地、服务端、已确认基线三方 revision 与加载顺序,重点核对同 revision 内容分歧。
验证
同一台 Windows、Bun 1.4.2、相同依赖,两份独立工作树运行
bun run test:afb7c68eb8e9e855两个失败集合逐项相同,本次命令观测到的新增失败为 0。其中
http-ownership.test.ts的业务 HTTP 入口和 axios 创建位置检查 2 项,public-release-boundary.test.ts的源码导出、私有产物审计、拒绝已存在目标目录检查 3 项。仓库测试脚本在共享组失败后退出,两次均未进入后续隔离组。一审返修与 T3
节点仅持久化显式模型。先建视频节点再绑首帧时,费用预估、入队预检和执行器重新解析为 IV2;历史 T2V 节点也按绑定的首帧切换。其他渠道显式节点的生成配置回归通过。
离线探针调用真实任务请求构造器与插件预设写入函数。用本版设置生成的能力目录,141、158、362 帧分别传入 5.875、6.583333333333333、15.083333333333334 秒,导演台最后写入 141、158、362 帧。已合入 #11 的渠道升级(
00da3942)。在临时工作区写入没有能力声明的旧渠道,启动插件后从磁盘重新读取配置,普通视频节点构造的任务仍保留 5.875 秒,导演台写入 141 帧。Go 测试确认重启两次只增加一个修订,已有能力及自定义名称保留。T3 跟进工作区模型配置连续出现 HTTP 409 时的重试上限;另复核未记录基线时本地与服务端 revision 相同但内容不同的选择策略(当前保留本地)。
素材路由(供 #17 复用)
传入原始类型化引用,调用
resolveVideoUsage({ references, hasStartFrame, i2vSupportsSubjects, r2vSupports })。结果包含slot和mode_reason;若ignoreSubjects为真,调用方在提交时排除身份参考,并保留该原因。本 PR 提供共享合同和回归测试。#17 调用方需传入引用类型并消费原因与忽略标记。
#11 后端另跑了插件、工作区与配置迁移包。幕匠相关测试通过。在同机执行完整三包时,与修改前的 6cff3a6 比对,两边相同的 29 项失败,主要涉及 Windows 临时数据库文件占用、符号链接权限与文件模式。死代码预算在两个版本均列出相同的 10 个既有条目。