fix: 修复ComfyUI JSON替换中image字段的值类型问题
问题修复: - image字段的值从字符串字面量改为Value::String类型 - 确保image和image_url字段二选一的逻辑正确 技术细节: - 模特图片替换: image字段设置为空字符串,使用image_url - 商品图片替换: image字段设置为空字符串,使用image_url - 修复了Value类型不匹配的编译错误 影响范围: - ComfyUI工作流JSON替换逻辑 - 调试文件生成的正确性 - 图片节点参数的正确传递
This commit is contained in:
parent
6c43e6f08b
commit
7b4a9fb7c9
|
|
@ -339,11 +339,11 @@ impl ComfyUIService {
|
|||
value: Value::String(cdn_url),
|
||||
});
|
||||
|
||||
// 替换image字段为文件名
|
||||
// 替换image字段为空字符串(使用image_url)
|
||||
replacements.push(WorkflowNodeReplacement {
|
||||
node_id: node_id.clone(),
|
||||
input_field: "image".to_string(),
|
||||
value: Value::String(filename),
|
||||
value: Value::String("".to_string()),
|
||||
});
|
||||
}
|
||||
"product" => {
|
||||
|
|
@ -358,11 +358,11 @@ impl ComfyUIService {
|
|||
value: Value::String(cdn_url),
|
||||
});
|
||||
|
||||
// 替换image字段为文件名
|
||||
// 替换image字段为空字符串(使用image_url)
|
||||
replacements.push(WorkflowNodeReplacement {
|
||||
node_id: node_id.clone(),
|
||||
input_field: "image".to_string(),
|
||||
value: Value::String(filename),
|
||||
value: Value::String("".to_string()),
|
||||
});
|
||||
}
|
||||
"prompt" => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue