minor fixes and clean-up

This commit is contained in:
Kelly Jerrell
2025-08-16 11:18:53 -07:00
parent 8cd5b23e62
commit 53e893f832
8 changed files with 9 additions and 20 deletions
+1
View File
@@ -253,6 +253,7 @@ test("inputs are fixed when loading old workflow", async ({ page, comfy }) => {
if (lora.inputs[i].link === null) continue
const inputNode = lora.getInputNode(i)
// if (!inputNode) debugger
// if anything but a lora node is connect, throw
if (inputNode.type !== "DrawThingsLoRA")
+5 -7
View File
@@ -81,11 +81,11 @@ async def dt_sampler(inputs: dict):
builder.Finish(config.Pack(builder))
config_fbs = bytes(builder.Output())
try:
print(json.dumps(inputs, indent=4))
print(json.dumps(config, indent=4))
except Exception as e:
pass
# try:
# print(json.dumps(inputs, indent=4))
# print(json.dumps(config, indent=4))
# except Exception as e:
# pass
contents = []
img2img = None
@@ -114,7 +114,6 @@ async def dt_sampler(inputs: dict):
}
)
print(hints)
req_hints = []
# add all hints to request
for hint_type in DrawThingsLists.hint_types_mapping.values():
@@ -141,7 +140,6 @@ async def dt_sampler(inputs: dict):
taw.weight = 1
taw.tensor = hint_tensor
taws.append(taw)
print('added hint of type', hint_type, 'weight', hint_weight)
hp = imageService_pb2.HintProto()
hp.hintType = hint_type
-1
View File
@@ -531,7 +531,6 @@ def convert_mask_for_request(
# [width, height] = image_tensor.size()[1:3]
# print(f'image tensor is {width}x{height}')
# pil_image = pil_image.resize((width, height))
print(mask_tensor.size())
orig_width = mask_tensor.size(dim=2)
orig_height = mask_tensor.size(dim=1)
# channels = mask_tensor.size(dim=3)
-1
View File
@@ -388,7 +388,6 @@ class DrawThingsControlNet:
}
)
cnet_list.append(cnet_item)
print(cnet_list)
return (cnet_list,)
@classmethod
+1 -1
View File
@@ -89,7 +89,7 @@ const samplerProto = {
onMouseDown(e, pos, canvas) {
// this exists for easier debugging in devtools
console.debug("Click!", this, dtSamplerNodeData)
console.debug("Click!", this)
},
onSerialize(serialised) {
-2
View File
@@ -290,8 +290,6 @@ class DTProperty {
if (type === "string") {
this.spec = rest[0];
}
// console.log(this.fbs, this.defaultValue)
}
customImport = undefined;
+2 -6
View File
@@ -111,12 +111,12 @@ const loraProto = {
// move lora nodes to correct input slot, disconnect all others
for (const { node, input, slot } of inputNodes) {
if (node.type === "DrawThingsLoRA") {
// this.disconnectInput(slot)
this.disconnectInput(slot)
this.graph.removeLink(input.link)
node.connect(0, this, 0)
}
else {
// this.disconnectInput(slot)
this.disconnectInput(slot)
this.graph.removeLink(input.link)
}
}
@@ -129,10 +129,6 @@ const loraProto = {
delete this.widget_values_keyed;
},
onConnectionsChange(type, index, isConnected, link_info, inputOrOutput) {
console.log(type, index, isConnected, link_info, inputOrOutput);
},
onSerialize(serialised) {
serialised.loraCount = this._loraCount;
serialised.showMode = this._showMode;
-2
View File
@@ -36,10 +36,8 @@ async function setLastUsedVersion(version) {
async function getUserData() {
try {
const response = await app.api.getUserData(dataPath)
console.log('response', response)
if (response.status === 200) {
const data = await response.json()
console.log(data)
return data
}
}