Format
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user