1.7.1
This commit is contained in:
@@ -1 +1 @@
|
||||
var _0x4ee3d0=_0x324f;function _0x2225(){var _0x393bd9=['undefined','22274830AeYRlV','6022415QtVuJQ','2439976hdsYTi','70YSaysh','26821jrCYwm','45246nYvZpY','730185VWFeBp','36Hhviky','12AebBca','2133576STvfmW'];_0x2225=function(){return _0x393bd9;};return _0x2225();}function _0x324f(_0x309be4,_0x577e6e){var _0x222588=_0x2225();return _0x324f=function(_0x324f26,_0x3bd35c){_0x324f26=_0x324f26-0x1b7;var _0x14890f=_0x222588[_0x324f26];return _0x14890f;},_0x324f(_0x309be4,_0x577e6e);}(function(_0x53f70e,_0x273fbd){var _0x493041=_0x324f,_0x2c0f2c=_0x53f70e();while(!![]){try{var _0x8a6288=parseInt(_0x493041(0x1bb))/0x1*(-parseInt(_0x493041(0x1ba))/0x2)+-parseInt(_0x493041(0x1bc))/0x3*(parseInt(_0x493041(0x1be))/0x4)+parseInt(_0x493041(0x1bd))/0x5*(-parseInt(_0x493041(0x1bf))/0x6)+-parseInt(_0x493041(0x1b8))/0x7+parseInt(_0x493041(0x1b9))/0x8+parseInt(_0x493041(0x1c0))/0x9+parseInt(_0x493041(0x1b7))/0xa;if(_0x8a6288===_0x273fbd)break;else _0x2c0f2c['push'](_0x2c0f2c['shift']());}catch(_0x3d04ff){_0x2c0f2c['push'](_0x2c0f2c['shift']());}}}(_0x2225,0x847bc));if(typeof gradioApp!=_0x4ee3d0(0x1c1)){}
|
||||
var _0x14d650=_0x502d;(function(_0xe914d0,_0x43ac30){var _0x22e086=_0x502d,_0x545b1e=_0xe914d0();while(!![]){try{var _0x15c10e=-parseInt(_0x22e086(0x115))/0x1*(-parseInt(_0x22e086(0x10c))/0x2)+-parseInt(_0x22e086(0x111))/0x3*(-parseInt(_0x22e086(0x10b))/0x4)+-parseInt(_0x22e086(0x114))/0x5*(-parseInt(_0x22e086(0x10d))/0x6)+-parseInt(_0x22e086(0x113))/0x7*(-parseInt(_0x22e086(0x10e))/0x8)+parseInt(_0x22e086(0x116))/0x9+parseInt(_0x22e086(0x112))/0xa+-parseInt(_0x22e086(0x10a))/0xb*(parseInt(_0x22e086(0x110))/0xc);if(_0x15c10e===_0x43ac30)break;else _0x545b1e['push'](_0x545b1e['shift']());}catch(_0x3fa1b9){_0x545b1e['push'](_0x545b1e['shift']());}}}(_0x17d7,0xd6c50));function _0x502d(_0x2225bf,_0x1831e9){var _0x17d754=_0x17d7();return _0x502d=function(_0x502df1,_0x872547){_0x502df1=_0x502df1-0x10a;var _0xe2b71d=_0x17d754[_0x502df1];return _0xe2b71d;},_0x502d(_0x2225bf,_0x1831e9);}if(typeof gradioApp!=_0x14d650(0x10f)){}function _0x17d7(){var _0xbc96cc=['6VbqOsn','5608agJBCX','undefined','1020pkhwwI','35667Gybagq','8606390eZrlOl','7028XJKgbq','1599005FtxdsN','5uFSqmY','15224742HAhlrB','518342WjvNli','4Vejlvd','518918CXDqUW'];_0x17d7=function(){return _0xbc96cc;};return _0x17d7();}
|
||||
File diff suppressed because one or more lines are too long
@@ -151,6 +151,35 @@ export default function(sdppp) {
|
||||
}]
|
||||
}
|
||||
})
|
||||
|
||||
// 替换为Parameter处理
|
||||
sdppp.widgetable.add('ETN_Parameter', (node) => {
|
||||
const outputTypeMap = {
|
||||
'number (integer)': { type: "number", step: 1 },
|
||||
'prompt (positive)': { type: "text", subType: "positive-prompt" },
|
||||
'toggle': { type: "toggle" },
|
||||
// ...其他类型映射
|
||||
};
|
||||
|
||||
const paramType = node.widgets[1].value;
|
||||
const mappedType = outputTypeMap[paramType] || { type: paramType } || { type: "string" };
|
||||
|
||||
return {
|
||||
title: node.title,
|
||||
widgets: [{
|
||||
value: node.widgets[2].value, // 主值widget
|
||||
name: node.widgets[0].value, // 参数名widget
|
||||
outputType: mappedType.type,
|
||||
options: {
|
||||
...node.widgets[2].options,
|
||||
min: node.widgets[3].value,
|
||||
max: node.widgets[4].value,
|
||||
...mappedType
|
||||
},
|
||||
uiWeight: 12 // 独占整行
|
||||
}]
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -162,5 +191,15 @@ export default function(sdppp) {
|
||||
* @returns
|
||||
*/
|
||||
function nameByConnectedOutputOrTitle(node) {
|
||||
return node.outputs?.[0].widget?.name || node.title;
|
||||
return node.outputs?.[0].widget?.name || getTitle(node);
|
||||
}
|
||||
/**
|
||||
* get the title of the node, with priority to avoid conflicts with the hidden property sdppp_widgetable_title
|
||||
* 获取节点的标题, 优先用于规避冲突的隐藏属性sdppp_widgetable_title
|
||||
*
|
||||
* @param {*} node
|
||||
* @returns
|
||||
*/
|
||||
function getTitle(node) {
|
||||
return node.getProperty('sdppp_widgetable_title') || node.title;
|
||||
}
|
||||
Reference in New Issue
Block a user