@@ -1362,15 +1362,15 @@ class StableDiffusionGGML {
13621362 }
13631363
13641364 if (!use_tiny_autoencoder) {
1365- float tile_overlap;
1366- int tile_size_x, tile_size_y;
1367- // multiply tile size for encode to keep the compute buffer size consistent
1368- get_tile_sizes (tile_size_x, tile_size_y, tile_overlap, vae_tiling_params, W, H, 1 .30539f );
1369-
1370- LOG_DEBUG (" VAE Tile size: %dx%d" , tile_size_x, tile_size_y);
1371-
13721365 process_vae_input_tensor (x);
13731366 if (vae_tiling_params.enabled && !encode_video) {
1367+ float tile_overlap;
1368+ int tile_size_x, tile_size_y;
1369+ // multiply tile size for encode to keep the compute buffer size consistent
1370+ get_tile_sizes (tile_size_x, tile_size_y, tile_overlap, vae_tiling_params, W, H, 1 .30539f );
1371+
1372+ LOG_DEBUG (" VAE Tile size: %dx%d" , tile_size_x, tile_size_y);
1373+
13741374 auto on_tiling = [&](ggml_tensor* in, ggml_tensor* out, bool init) {
13751375 first_stage_model->compute (n_threads, in, false , &out, work_ctx);
13761376 };
@@ -1507,15 +1507,15 @@ class StableDiffusionGGML {
15071507 }
15081508 int64_t t0 = ggml_time_ms ();
15091509 if (!use_tiny_autoencoder) {
1510- float tile_overlap;
1511- int tile_size_x, tile_size_y;
1512- get_tile_sizes (tile_size_x, tile_size_y, tile_overlap, vae_tiling_params, x->ne [0 ], x->ne [1 ]);
1513-
1514- LOG_DEBUG (" VAE Tile size: %dx%d" , tile_size_x, tile_size_y);
1515-
15161510 process_latent_out (x);
15171511 // x = load_tensor_from_file(work_ctx, "wan_vae_z.bin");
15181512 if (vae_tiling_params.enabled && !decode_video) {
1513+ float tile_overlap;
1514+ int tile_size_x, tile_size_y;
1515+ get_tile_sizes (tile_size_x, tile_size_y, tile_overlap, vae_tiling_params, x->ne [0 ], x->ne [1 ]);
1516+
1517+ LOG_DEBUG (" VAE Tile size: %dx%d" , tile_size_x, tile_size_y);
1518+
15191519 // split latent in 32x32 tiles and compute in several steps
15201520 auto on_tiling = [&](ggml_tensor* in, ggml_tensor* out, bool init) {
15211521 first_stage_model->compute (n_threads, in, true , &out, NULL );
0 commit comments