diff --git a/paint/sources/neural_nodes/edit_image_node.ts b/paint/sources/neural_nodes/edit_image_node.ts index 610531e6..49d86b2f 100644 --- a/paint/sources/neural_nodes/edit_image_node.ts +++ b/paint/sources/neural_nodes/edit_image_node.ts @@ -54,36 +54,12 @@ function edit_image_node_button(node_id: i32) { iron_write_png(dir + path_sep + "input.png", gpu_get_texture_pixels(input), input.width, input.height, 0); let argv: string[] = [ - dir + "/sd_qie", - "--diffusion-model", - dir + "/Qwen-Image-Edit-2509-Q4_K_S.gguf", - "--vae", - dir + "/qwen_image_vae.safetensors", - "--qwen2vl", - dir + "/Qwen2.5-VL-7B-Instruct-Q8_0.gguf", - "--qwen2vl_vision", - dir + "/Qwen2.5-VL-7B-Instruct.mmproj-Q8_0.gguf", - "--sampling-method", - "euler", - "--offload-to-cpu", - "--diffusion-fa", - "--steps", - "50", - "-s", - "-1", - "-W", - "512", - "-H", - "512", - "-p", - "'" + prompt + "'", + dir + "/sd_qie", "--diffusion-model", dir + "/Qwen-Image-Edit-2509-Q4_K_S.gguf", "--vae", dir + "/qwen_image_vae.safetensors", "--qwen2vl", + dir + "/Qwen2.5-VL-7B-Instruct-Q8_0.gguf", "--qwen2vl_vision", dir + "/Qwen2.5-VL-7B-Instruct.mmproj-Q8_0.gguf", "--sampling-method", "euler", + "--offload-to-cpu", "--diffusion-fa", "--steps", "50", "-s", "-1", "-W", "512", "-H", "512", "-p", "'" + prompt + "'", // "-n", // "'" + negative + "'", - "-r", - dir + "/input.png", - "-o", - dir + "/output.png", - null + "-r", dir + "/input.png", "-o", dir + "/output.png", null ]; iron_exec_async(argv[0], argv.buffer); diff --git a/paint/sources/neural_nodes/image_to_depth_node.ts b/paint/sources/neural_nodes/image_to_depth_node.ts index 3c1a8adf..6d223128 100644 --- a/paint/sources/neural_nodes/image_to_depth_node.ts +++ b/paint/sources/neural_nodes/image_to_depth_node.ts @@ -76,20 +76,18 @@ let image_to_depth_node_def: ui_node_t = { precision : 100, display : 0 } ], - outputs : [ - { - id : 0, - node_id : 0, - name : _tr("Depth"), - type : "VALUE", - color : 0xffa1a1a1, - default_value : f32_array_create_x(1.0), - min : 0.0, - max : 1.0, - precision : 100, - display : 0 - } - ], + outputs : [ { + id : 0, + node_id : 0, + name : _tr("Depth"), + type : "VALUE", + color : 0xffa1a1a1, + default_value : f32_array_create_x(1.0), + min : 0.0, + max : 1.0, + precision : 100, + display : 0 + } ], buttons : [ { name : "image_to_depth_node_button", type : "CUSTOM", diff --git a/paint/sources/neural_nodes/image_to_normal_map_node.ts b/paint/sources/neural_nodes/image_to_normal_map_node.ts index 4ffd32d4..f547b6f1 100644 --- a/paint/sources/neural_nodes/image_to_normal_map_node.ts +++ b/paint/sources/neural_nodes/image_to_normal_map_node.ts @@ -76,20 +76,18 @@ let image_to_normal_map_node_def: ui_node_t = { precision : 100, display : 0 } ], - outputs : [ - { - id : 0, - node_id : 0, - name : _tr("Normal Map"), - type : "VECTOR", - color : 0xffc7c729, - default_value : f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), - min : 0.0, - max : 1.0, - precision : 100, - display : 0 - } - ], + outputs : [ { + id : 0, + node_id : 0, + name : _tr("Normal Map"), + type : "VECTOR", + color : 0xffc7c729, + default_value : f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min : 0.0, + max : 1.0, + precision : 100, + display : 0 + } ], buttons : [ { name : "image_to_normal_map_node_button", type : "CUSTOM", diff --git a/paint/sources/neural_nodes/image_to_pbr_node.ts b/paint/sources/neural_nodes/image_to_pbr_node.ts index 44db7e71..01facf46 100644 --- a/paint/sources/neural_nodes/image_to_pbr_node.ts +++ b/paint/sources/neural_nodes/image_to_pbr_node.ts @@ -1,10 +1,10 @@ -let image_to_pbr_node_result_base: gpu_texture_t = null; -let image_to_pbr_node_result_normal: gpu_texture_t = null; +let image_to_pbr_node_result_base: gpu_texture_t = null; +let image_to_pbr_node_result_normal: gpu_texture_t = null; let image_to_pbr_node_result_occlusion: gpu_texture_t = null; -let image_to_pbr_node_result_height: gpu_texture_t = null; +let image_to_pbr_node_result_height: gpu_texture_t = null; let image_to_pbr_node_result_roughness: gpu_texture_t = null; -let image_to_pbr_node_result_metallic: gpu_texture_t = null; +let image_to_pbr_node_result_metallic: gpu_texture_t = null; function image_to_pbr_node_init() { array_push(nodes_material_neural, image_to_pbr_node_def); @@ -142,7 +142,7 @@ function image_to_pbr_node_button(node_id: i32) { } } -function image_to_pbr_node_check_result(done: (tex: gpu_texture_t)=>void) { +function image_to_pbr_node_check_result(done: (tex: gpu_texture_t) => void) { if (iron_exec_async_done == 1) { let dir: string; diff --git a/paint/sources/neural_nodes/inpaint_image_node.ts b/paint/sources/neural_nodes/inpaint_image_node.ts index 7cdb6463..acae1395 100644 --- a/paint/sources/neural_nodes/inpaint_image_node.ts +++ b/paint/sources/neural_nodes/inpaint_image_node.ts @@ -56,42 +56,17 @@ function inpaint_image_node_button(node_id: i32) { let negative: string = ""; let argv: string[] = [ - dir + "/sd_qie", - "--diffusion-model", - dir + "/Qwen-Image-Edit-2509-Q4_K_S.gguf", - "--vae", - dir + "/qwen_image_vae.safetensors", - "--qwen2vl", - dir + "/Qwen2.5-VL-7B-Instruct-Q8_0.gguf", - "--qwen2vl_vision", - dir + "/Qwen2.5-VL-7B-Instruct.mmproj-Q8_0.gguf", - "--sampling-method", - "euler", - "--offload-to-cpu", - "--cfg-scale", + dir + "/sd_qie", "--diffusion-model", dir + "/Qwen-Image-Edit-2509-Q4_K_S.gguf", "--vae", dir + "/qwen_image_vae.safetensors", "--qwen2vl", + dir + "/Qwen2.5-VL-7B-Instruct-Q8_0.gguf", "--qwen2vl_vision", dir + "/Qwen2.5-VL-7B-Instruct.mmproj-Q8_0.gguf", "--sampling-method", + "euler", "--offload-to-cpu", "--cfg-scale", "2.5", // 1.0 "--flow-shift", "3", // 1 "--diffusion-fa", // "--vae-tiling", // "--vae-on-cpu", - "--steps", - "40", - "-s", - "-1", - "-W", - "512", - "-H", - "512", - "-p", - "'" + prompt + "'", - "-n", - "'" + negative + "'", - "-r", - dir + "/input.png", - "-o", - dir + "/output.png", - null + "--steps", "40", "-s", "-1", "-W", "512", "-H", "512", "-p", "'" + prompt + "'", "-n", "'" + negative + "'", "-r", dir + "/input.png", "-o", + dir + "/output.png", null ]; iron_exec_async(argv[0], argv.buffer); diff --git a/paint/sources/nodes_material.ts b/paint/sources/nodes_material.ts index 51150a20..403de2b4 100644 --- a/paint/sources/nodes_material.ts +++ b/paint/sources/nodes_material.ts @@ -93,10 +93,8 @@ function nodes_material_init() { nodes_material_group = []; group_node_init(); - nodes_material_list = [ - nodes_material_input, nodes_material_texture, nodes_material_color, nodes_material_utilities, nodes_material_neural, - nodes_material_group - ]; + nodes_material_list = + [ nodes_material_input, nodes_material_texture, nodes_material_color, nodes_material_utilities, nodes_material_neural, nodes_material_group ]; } function nodes_material_get_node_t(node_type: string): ui_node_t { diff --git a/paint/sources/ui_nodes.ts b/paint/sources/ui_nodes.ts index 9b59dc6f..1ea90dcc 100644 --- a/paint/sources/ui_nodes.ts +++ b/paint/sources/ui_nodes.ts @@ -1550,9 +1550,9 @@ function ui_nodes_get_group(canvases: ui_node_canvas_t[], name: string): ui_node function ui_nodes_capture_output() { let ui_nodes: ui_nodes_t = ui_nodes_get_nodes(); - let c: ui_node_canvas_t = ui_nodes_get_canvas(true); - let sel: ui_node_t = ui_get_node(c.nodes, ui_nodes.nodes_selected_id[0]); - let img: gpu_texture_t = ui_nodes_get_node_preview_image(sel); + let c: ui_node_canvas_t = ui_nodes_get_canvas(true); + let sel: ui_node_t = ui_get_node(c.nodes, ui_nodes.nodes_selected_id[0]); + let img: gpu_texture_t = ui_nodes_get_node_preview_image(sel); if (img == null) { return; } diff --git a/paint/sources/ui_view2d.ts b/paint/sources/ui_view2d.ts index e52df6d3..f10cc781 100644 --- a/paint/sources/ui_view2d.ts +++ b/paint/sources/ui_view2d.ts @@ -138,8 +138,8 @@ function ui_view2d_render() { let nodes: ui_nodes_t = ui_nodes_get_nodes(); let c: ui_node_canvas_t = ui_nodes_get_canvas(true); if (nodes.nodes_selected_id.length > 0) { - let sel: ui_node_t = ui_get_node(c.nodes, nodes.nodes_selected_id[0]); - let img: gpu_texture_t = ui_nodes_get_node_preview_image(sel); + let sel: ui_node_t = ui_get_node(c.nodes, nodes.nodes_selected_id[0]); + let img: gpu_texture_t = ui_nodes_get_node_preview_image(sel); if (img != null) { tex = ui_nodes_get_node_preview_image(sel); }