2
0
luboslenco 11 сар өмнө
parent
commit
998b77ace0

+ 0 - 1
armorlab/sources/nodes/inpaint_node.ts

@@ -71,7 +71,6 @@ function inpaint_node_button(node_id: i32) {
 function inpaint_node_get_as_image(self: inpaint_node_t, from: i32): image_t {
 	let source: image_t = logic_node_input_get_as_image(self.base.inputs[0]);
 	console_progress(tr("Processing") + " - " + tr("Inpaint"));
-	iron_g4_swap_buffers();
 
 	g2_begin(inpaint_node_image);
 	g2_draw_scaled_image(source, 0, 0, config_get_texture_res_x(), config_get_texture_res_y());

+ 0 - 1
armorlab/sources/nodes/photo_to_pbr_node.ts

@@ -48,7 +48,6 @@ function photo_to_pbr_node_get_as_image(self: photo_to_pbr_node_t, from: i32): i
 	photo_to_pbr_node_cached_source = source;
 
 	console_progress(tr("Processing") + " - " + tr("Photo to PBR"));
-	iron_g4_swap_buffers();
 
 	let tile_floats: f32_array_t[] = [];
 	let tiles_x: i32 = math_floor(config_get_texture_res_x() / photo_to_pbr_node_tile_w);

+ 0 - 3
armorlab/sources/nodes/text_to_photo_node.ts

@@ -54,7 +54,6 @@ type text_encoder_result_t = {
 
 function text_to_photo_node_text_encoder(prompt: string, inpaint_latents: f32_array_t): text_encoder_result_t {
 	console_progress(tr("Processing") + " - " + tr("Text to Photo"));
-	iron_g4_swap_buffers();
 
 	let words: string[] = string_split(
 		trim_end(string_replace_all(string_replace_all(string_replace_all(prompt, "\n", " "), ",", " , "), "  ", " ")), " "
@@ -127,7 +126,6 @@ function text_to_photo_node_unet(latents: f32_array_t, text_embeddings: f32_arra
 		let a: i32 = counter + 1;
 		let b: i32 = 50 - offset;
 		console_progress(tr("Processing") + " - " + tr("Text to Photo") + " (" + a + "/" + b + ")");
-		iron_g4_swap_buffers();
 
 		let timestep: i32 = text_to_photo_node_timesteps[counter + offset];
 		for (let i: i32 = 0; i < latents.length; ++i) latent_model_input[i] = latents[i];
@@ -243,7 +241,6 @@ function text_to_photo_node_unet(latents: f32_array_t, text_embeddings: f32_arra
 
 function text_to_photo_node_vae_decoder(latents: f32_array_t, upscale: bool): image_t {
 	console_progress(tr("Processing") + " - " + tr("Text to Photo"));
-	iron_g4_swap_buffers();
 
 	for (let i: i32 = 0; i < latents.length; ++i) {
 		latents[i] = 1.0 / 0.18215 * latents[i];

+ 0 - 1
armorlab/sources/nodes/tiling_node.ts

@@ -50,7 +50,6 @@ function tiling_node_get_as_image(self: tiling_node_t, from: i32): image_t {
 	g2_end();
 
 	console_progress(tr("Processing") + " - " + tr("Tiling"));
-	iron_g4_swap_buffers();
 
 	if (tiling_node_auto){
 		self.result = inpaint_node_texsynth_inpaint(tiling_node_image, true, null);

+ 0 - 1
armorlab/sources/nodes/upscale_node.ts

@@ -19,7 +19,6 @@ function upscale_node_get_as_image(self: upscale_node_t, from: i32): image_t {
 	upscale_node_image = logic_node_input_get_as_image(self.base.inputs[0]);
 
 	console_progress(tr("Processing") + " - " + tr("Upscale"));
-	iron_g4_swap_buffers();
 
 	upscale_node_load_blob();
 	if (upscale_node_image.width < config_get_texture_res_x()) {

+ 0 - 1
armorlab/sources/nodes/variance_node.ts

@@ -52,7 +52,6 @@ function variance_node_get_as_image(self: variance_node_t, from: i32): image_t {
 	}
 
 	console_progress(tr("Processing") + " - " + tr("Variance"));
-	iron_g4_swap_buffers();
 
 	let vae_encoder_blob: buffer_t = data_get_blob("models/sd_vae_encoder.quant.onnx");
 	let tensors: buffer_t[] = [buffer_create_from_raw(f32a.buffer, f32a.length * 4)];

+ 0 - 2
armorlab/sources/ui_nodes_ext.ts

@@ -12,7 +12,6 @@ function ui_nodes_ext_draw_buttons(ew: f32, start_y: f32) {
 		app_notify_on_render_2d(ui_nodes_ext_delay_idle_sleep);
 
 		console_progress(tr("Processing"));
-		iron_g4_swap_buffers();
 
 		let timer: f32 = time_time();
 		parser_logic_parse(project_canvas);
@@ -99,7 +98,6 @@ function ui_nodes_ext_draw_buttons(ew: f32, start_y: f32) {
 				// Apply displacement
 				if (config_raw.displace_strength > 0) {
 					console_progress(tr("Apply Displacement"));
-					iron_g4_swap_buffers();
 
 					let uv_scale: f32 = scene_meshes[0].data.scale_tex * context_raw.brush_scale;
 					util_mesh_apply_displacement(texpaint_pack._image, 0.05 * config_raw.displace_strength, uv_scale);

+ 7 - 0
base/sources/console.ts

@@ -46,6 +46,13 @@ function console_progress(s: string) {
 		console_trace(s);
 	}
 	console_progress_text = s;
+
+	// Pass one frame to immediately show the message
+	ui_end_input();
+	g2_end();
+	app_render();
+	g2_begin();
+	iron_g4_swap_buffers();
 }
 
 function console_info(s: string) {