bizydraft 0.2.23__py3-none-any.whl → 0.2.25__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of bizydraft might be problematic. Click here for more details.

@@ -41,19 +41,16 @@ const styleMenus = `
41
41
  body .tydev-utils-log-console-container{
42
42
  display: none;
43
43
  }
44
- // .p-dialog-mask.p-overlay-mask.p-overlay-mask-enter{
45
- // display: none !important;
46
- // }
47
- `
44
+ .p-dialog-mask.p-overlay-mask.p-overlay-mask-enter[data-pc-name="dialog"]{
45
+ display: none !important;
46
+ }
47
+ `;
48
48
  app.registerExtension({
49
- name: "comfy.BizyAir.Style",
50
- async setup() {
51
- $el("style", {
52
- textContent: styleMenus,
53
- parent: document.head,
54
- });
55
- window.addEventListener('load', () => {
56
- document.querySelector('[data-pc-section=mask]').style.display = 'none'
57
- });
58
- },
49
+ name: "comfy.BizyAir.Style",
50
+ async setup() {
51
+ $el("style", {
52
+ textContent: styleMenus,
53
+ parent: document.head,
54
+ });
55
+ }
59
56
  });
@@ -1,12 +1,42 @@
1
1
  import { app } from "../../scripts/app.js";
2
2
  import '../BizyAir/bizyair_frontend.js'
3
3
  import { hideWidget } from './tool.js'
4
+
5
+ // 白名单配置 - 不符合正则表达式的节点名称和对应的模型类型
6
+ const WHITELIST_NODES = {
7
+ "LayerMask: YoloV8Detect": "Detection",
8
+ "Lora Loader Stack (rgthree)": "LoRa",
9
+ "easy loraNames": "LoRa",
10
+ "easy loraStack": "LoRa",
11
+ "Load Lora": "LoRa",
12
+ "Intrinsic_lora_sampling": "LoRa",
13
+ "ADE_LoadAnimateDiffModel": "Checkpoint",
14
+ };
15
+
4
16
  const possibleWidgetNames=[
5
17
  "clip_name",
6
18
  "clip_name1",
7
19
  "clip_name2",
20
+ "clip_name3",
8
21
  "ckpt_name",
9
22
  "lora_name",
23
+ "lora_01",
24
+ "lora_02",
25
+ "lora_03",
26
+ "lora_04",
27
+ "lora_1_name",
28
+ "lora_2_name",
29
+ "lora_3_name",
30
+ "lora_4_name",
31
+ "lora_5_name",
32
+ "lora_6_name",
33
+ "lora_7_name",
34
+ "lora_8_name",
35
+ "lora_9_name",
36
+ "lora_10_name",
37
+ "lora_11_name",
38
+ "lora_12_name",
39
+ "model_name",
10
40
  "control_net_name",
11
41
  "ipadapter_file",
12
42
  "unet_name",
@@ -15,6 +45,7 @@ const possibleWidgetNames=[
15
45
  "instantid_file",
16
46
  "pulid_file",
17
47
  "style_model_name",
48
+ "yolo_model"
18
49
  ]
19
50
 
20
51
  // 根据节点名称匹配模型类型
@@ -23,6 +54,13 @@ function getModelTypeFromNodeName(nodeName) {
23
54
  return null;
24
55
  }
25
56
 
57
+ // 首先检查白名单
58
+ if (WHITELIST_NODES.hasOwnProperty(nodeName)) {
59
+ console.log(`白名单匹配: ${nodeName} -> ${WHITELIST_NODES[nodeName]}`);
60
+ return WHITELIST_NODES[nodeName];
61
+ }
62
+
63
+ // 然后使用正则表达式匹配
26
64
  const regex = /^(\w+).*Loader.*/i;
27
65
  const match = nodeName.match(regex);
28
66
  if (match) {
@@ -33,10 +71,10 @@ function getModelTypeFromNodeName(nodeName) {
33
71
 
34
72
  function createSetWidgetCallback(modelType, selectedBaseModels = []) {
35
73
  return function setWidgetCallback() {
36
- const targetWidget = this.widgets.find(widget => possibleWidgetNames.includes(widget.name));
37
- if (targetWidget) {
38
- targetWidget.value = targetWidget.value || "to choose"
39
- targetWidget.mouse = function(e, pos, canvas) {
74
+ const targetWidget = this.widgets.filter(widget => possibleWidgetNames.includes(widget.name));
75
+ targetWidget.forEach((wdt, index) => {
76
+ wdt.value = wdt.value || "to choose"
77
+ wdt.mouse = function(e, pos, canvas) {
40
78
  try {
41
79
  if (e.type === "pointerdown" || e.type === "mousedown" || e.type === "click" || e.type === "pointerup") {
42
80
  e.preventDefault();
@@ -57,11 +95,19 @@ function createSetWidgetCallback(modelType, selectedBaseModels = []) {
57
95
  onApply: (version, model) => {
58
96
  if (!currentNode || !currentNode.widgets) return;
59
97
 
60
- const currentLora = currentNode.widgets.find(widget => possibleWidgetNames.includes(widget.name));
61
- const currentModel = currentNode.widgets.find(w => w.name === "model_version_id");
98
+ const currentLora = currentNode.widgets.filter(widget => possibleWidgetNames.includes(widget.name));
99
+ let currentModel;
100
+
101
+ if (index === 0) {
102
+ currentModel = currentNode.widgets.find(w => w.name === "model_version_id");
103
+ } else {
104
+ const fieldName = `model_version_id${index + 1}`;
105
+ currentModel = currentNode.widgets.find(w => w.name === fieldName);
106
+ }
62
107
 
63
108
  if (model && currentModel && version) {
64
- currentLora.value = model;
109
+ currentLora[index].value = model;
110
+
65
111
  currentModel.value = version.id;
66
112
  currentNode.setDirtyCanvas(true);
67
113
  }
@@ -77,13 +123,13 @@ function createSetWidgetCallback(modelType, selectedBaseModels = []) {
77
123
  }
78
124
  };
79
125
 
80
- // targetWidget.node = this;
81
- targetWidget.options = targetWidget.options || {};
82
- targetWidget.options.values = () => [];
83
- targetWidget.options.editable = false;
84
- targetWidget.clickable = true;
85
- targetWidget.processMouse = true;
86
- }
126
+ // wdt.node = this;
127
+ wdt.options = wdt.options || {};
128
+ wdt.options.values = () => [];
129
+ wdt.options.editable = false;
130
+ wdt.clickable = true;
131
+ wdt.processMouse = true;
132
+ });
87
133
  }
88
134
  }
89
135
 
@@ -118,16 +164,34 @@ app.registerExtension({
118
164
  const onNodeCreated = nodeType.prototype.onNodeCreated;
119
165
  nodeType.prototype.onNodeCreated = function() {
120
166
  try {
121
- let model_version_id = this.widgets.find(w => w.name === "model_version_id");
122
- if (!model_version_id) {
123
- model_version_id = this.addWidget("hidden", "model_version_id", "", function(e){
124
- console.log(e)
125
- }, {
126
- serialize: true,
127
- values: []
128
- });
129
- }
130
- console.log(model_version_id)
167
+ const targetWidget = this.widgets.filter(widget => possibleWidgetNames.includes(widget.name));
168
+ // 为每个targetWidget添加对应的model_version_id字段
169
+ targetWidget.forEach((widget, index) => {
170
+ let model_version_id;
171
+ if (index === 0) {
172
+ // 第一个保持原名
173
+ model_version_id = this.widgets.find(w => w.name === "model_version_id");
174
+ if (!model_version_id) {
175
+ model_version_id = this.addWidget("hidden", "model_version_id", "", function(){
176
+ }, {
177
+ serialize: true,
178
+ values: []
179
+ });
180
+ }
181
+ } else {
182
+ // 从第二个开始使用新名称
183
+ const fieldName = `model_version_id${index + 1}`;
184
+ model_version_id = this.widgets.find(w => w.name === fieldName);
185
+ if (!model_version_id) {
186
+ model_version_id = this.addWidget("hidden", fieldName, "", function(){
187
+ }, {
188
+ serialize: true,
189
+ values: []
190
+ });
191
+ }
192
+ }
193
+ });
194
+
131
195
  const result = onNodeCreated?.apply(this, arguments);
132
196
  let selectedBaseModels = [];
133
197
  // if (modelType === 'Checkpoint') {
@@ -141,7 +205,6 @@ app.registerExtension({
141
205
  };
142
206
  }
143
207
  },
144
-
145
208
  async nodeCreated(node) {
146
209
  const modelType = getModelTypeFromNodeName(node?.comfyClass);
147
210
 
@@ -562,7 +562,7 @@ app.registerExtension({
562
562
  this.openCustomError({
563
563
  nodeId: resPromptJson.node_id,
564
564
  nodeType: resPromptJson.node_type,
565
- errorMessage: resPromptJson.error,
565
+ errorMessage: resPromptJson.details,
566
566
  borderColor: '#FF0000'
567
567
  })
568
568
  return
@@ -572,14 +572,15 @@ app.registerExtension({
572
572
 
573
573
  if (resPromptJson.node_errors[i].errors) {
574
574
  const err = resPromptJson.node_errors[i].errors[0]
575
- if (err) return
576
- this.openCustomError({
577
- nodeId: i,
578
- nodeType: err.type,
579
- errorMessage: err.error,
580
- borderColor: '#FF0000'
581
- })
582
- return
575
+ if (err) {
576
+ this.openCustomError({
577
+ nodeId: i,
578
+ nodeType: err.type,
579
+ errorMessage: err.details,
580
+ borderColor: '#FF0000'
581
+ })
582
+ return
583
+ }
583
584
  } else {
584
585
  console.log(resPromptJson.node_errors[i])
585
586
  }
@@ -597,6 +598,12 @@ app.registerExtension({
597
598
  }
598
599
  }
599
600
  });
601
+
602
+ for (let i in graph.output) {
603
+ if (graph.output[i].class_type == 'LoadImage') {
604
+ graph.output[i].inputs.image = graph.output[i].inputs.image.replace('pasted/http', 'http')
605
+ }
606
+ }
600
607
  console.log(graph.output)
601
608
  window.parent.postMessage({
602
609
  type: 'functionResult',
@@ -4,6 +4,7 @@ const loadNodeList = [
4
4
  'LoadAudio',
5
5
  'LoadVideo',
6
6
  'Load3D',
7
+ 'VHS_LoadVideo'
7
8
  ]
8
9
  const extMap = {
9
10
  'LoadImage': '.png,.jpg,.jpeg,.webp,.gif,.svg,.ico,.bmp,.tiff,.tif,.heic,.heif',
@@ -1,4 +1,4 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bizydraft
3
- Version: 0.2.23
3
+ Version: 0.2.25
4
4
  Summary: bizydraft
@@ -12,17 +12,17 @@ bizydraft/server.py,sha256=L2zoJgOisr65IRphOyko74AdsLel59gh55peyMaUrO8,2102
12
12
  bizydraft/workflow_io.py,sha256=MYhJbpgkv8hrA5k_aolijOTrWpTtu62nzRznA4hv8JE,4298
13
13
  bizydraft/static/js/aiAppHandler.js,sha256=t3tefGg9d_2-VeNxqrwMMdX6JYE5uroyXZq0hXNWSzw,17572
14
14
  bizydraft/static/js/freezeModeHandler.js,sha256=l1-JK8hyFbJzQ6ylq6occUa_kwszPq9rDbKut48bn6s,17247
15
- bizydraft/static/js/handleStyle.js,sha256=yffw1rQeX19WgpxGtCFBHoA9kgFYXPIdsWFo8rjN7ZM,1621
15
+ bizydraft/static/js/handleStyle.js,sha256=o9JpjOqs_lLIr-jpqpGNjUN74XQPT8pD3fF5bjsHLAU,1466
16
16
  bizydraft/static/js/hookLoadImage.js,sha256=jQGckFr7bTLRiwcFsVmSy1mj_o7TKj1uup0QQ00qwbk,8079
17
- bizydraft/static/js/hookLoadModel.js,sha256=9eHklcb66EdH7kbm76178bK968Yd-H9xO6DdQhSH0_I,5630
17
+ bizydraft/static/js/hookLoadModel.js,sha256=tRUqVei9kS3nhE_W2v0kJIeVWinKK2lw8F-pEKXakD0,7980
18
18
  bizydraft/static/js/main.js,sha256=oEsVEUZSo8ipx93oqs2WFQSRgp46XQ_D-Xao-wen2S8,121
19
19
  bizydraft/static/js/nodeFocusHandler.js,sha256=24xXbS4Q-GjJdRqf11i-1pBo8MkOJ24F7MHFV44EG6Q,4683
20
20
  bizydraft/static/js/nodeParamsFilter.js,sha256=H7lBB0G8HNqoGhOCH1hNXqPU-rPlrFyTxg_f_JgLEMk,4168
21
- bizydraft/static/js/postEvent.js,sha256=10J_4HkcP0H1oz9wWWobS3snopLhiyvCGWyM2UqCUos,37948
21
+ bizydraft/static/js/postEvent.js,sha256=5rafG9GjaesxmFD_8eSJQYHeSNWfOG3iWXLUPuaRWxg,38296
22
22
  bizydraft/static/js/socket.js,sha256=VE3fTAgEfM0FZhL526Skt7OCRokOa3mzTCAjAomI_tE,2432
23
- bizydraft/static/js/tool.js,sha256=UjYZgQ7711Ag5l_La4wZvp1jD8wT-Z6At5dMG3SJZxE,2745
23
+ bizydraft/static/js/tool.js,sha256=dwVFLrT0pEsdOBkh2RRUDvyVo8GzOIVYg7vU5RiM0m0,2765
24
24
  bizydraft/static/js/uploadFile.js,sha256=WvglKzHMeOzDhOH3P-fLcPHxCLbKOJpo4DntoRxeJtI,4908
25
- bizydraft-0.2.23.dist-info/METADATA,sha256=YCOuNynuor7tYZyl1KIxi712cHC5ZTMnDBySsuyI6ew,73
26
- bizydraft-0.2.23.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- bizydraft-0.2.23.dist-info/top_level.txt,sha256=XtoBq6hjZhXIM7aas4GtPDtAiKo8FdLzMABXW8qqQ8M,10
28
- bizydraft-0.2.23.dist-info/RECORD,,
25
+ bizydraft-0.2.25.dist-info/METADATA,sha256=FwL49GnAB7z3GbU41E1Js0s0TOWitoVZoEfr9047KdE,73
26
+ bizydraft-0.2.25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ bizydraft-0.2.25.dist-info/top_level.txt,sha256=XtoBq6hjZhXIM7aas4GtPDtAiKo8FdLzMABXW8qqQ8M,10
28
+ bizydraft-0.2.25.dist-info/RECORD,,