@@ -1323,15 +1323,15 @@ class StableDiffusionGGML {
13231323 }
13241324
13251325 if (!use_tiny_autoencoder) {
1326- float tile_overlap;
1327- int tile_size_x, tile_size_y;
1328- // multiply tile size for encode to keep the compute buffer size consistent
1329- get_tile_sizes (tile_size_x, tile_size_y, tile_overlap, vae_tiling_params, W, H, 1 .30539f );
1330-
1331- LOG_DEBUG (" VAE Tile size: %dx%d" , tile_size_x, tile_size_y);
1332-
13331326 process_vae_input_tensor (x);
13341327 if (vae_tiling_params.enabled && !encode_video) {
1328+ float tile_overlap;
1329+ int tile_size_x, tile_size_y;
1330+ // multiply tile size for encode to keep the compute buffer size consistent
1331+ get_tile_sizes (tile_size_x, tile_size_y, tile_overlap, vae_tiling_params, W, H, 1 .30539f );
1332+
1333+ LOG_DEBUG (" VAE Tile size: %dx%d" , tile_size_x, tile_size_y);
1334+
13351335 auto on_tiling = [&](ggml_tensor* in, ggml_tensor* out, bool init) {
13361336 first_stage_model->compute (n_threads, in, false , &out, work_ctx);
13371337 };
@@ -1468,15 +1468,15 @@ class StableDiffusionGGML {
14681468 }
14691469 int64_t t0 = ggml_time_ms ();
14701470 if (!use_tiny_autoencoder) {
1471- float tile_overlap;
1472- int tile_size_x, tile_size_y;
1473- get_tile_sizes (tile_size_x, tile_size_y, tile_overlap, vae_tiling_params, x->ne [0 ], x->ne [1 ]);
1474-
1475- LOG_DEBUG (" VAE Tile size: %dx%d" , tile_size_x, tile_size_y);
1476-
14771471 process_latent_out (x);
14781472 // x = load_tensor_from_file(work_ctx, "wan_vae_z.bin");
14791473 if (vae_tiling_params.enabled && !decode_video) {
1474+ float tile_overlap;
1475+ int tile_size_x, tile_size_y;
1476+ get_tile_sizes (tile_size_x, tile_size_y, tile_overlap, vae_tiling_params, x->ne [0 ], x->ne [1 ]);
1477+
1478+ LOG_DEBUG (" VAE Tile size: %dx%d" , tile_size_x, tile_size_y);
1479+
14801480 // split latent in 32x32 tiles and compute in several steps
14811481 auto on_tiling = [&](ggml_tensor* in, ggml_tensor* out, bool init) {
14821482 first_stage_model->compute (n_threads, in, true , &out, NULL );
0 commit comments