@@ -569,14 +569,14 @@ struct clip_graph {
569569 }
570570
571571 // unshuffle h
572- cur = ggml_reshape_3d (ctx0, ggml_cont (ctx0, cur) , n_embd * scale_factor, width / scale_factor, height);
573- cur = ggml_permute (ctx0, cur, 0 , 2 , 1 , 3 );
572+ cur = ggml_reshape_3d (ctx0, cur, n_embd * scale_factor, width / scale_factor, height);
573+ cur = ggml_cont (ctx0, ggml_permute (ctx0, cur, 0 , 2 , 1 , 3 ) );
574574
575575 // unshuffle w
576- cur = ggml_reshape_3d (ctx0, ggml_cont (ctx0, cur) , n_embd * scale_factor * scale_factor, height / scale_factor, width / scale_factor);
577- cur = ggml_permute (ctx0, cur, 0 , 2 , 1 , 3 );
576+ cur = ggml_reshape_3d (ctx0, cur, n_embd * scale_factor * scale_factor, height / scale_factor, width / scale_factor);
577+ cur = ggml_cont (ctx0, ggml_permute (ctx0, cur, 0 , 2 , 1 , 3 ) );
578578
579- cur = ggml_reshape_2d (ctx0, ggml_cont (ctx0, cur) , cur->ne [0 ], cur->ne [1 ] * cur->ne [2 ]);
579+ cur = ggml_reshape_2d (ctx0, cur, cur->ne [0 ], cur->ne [1 ] * cur->ne [2 ]);
580580
581581 // projection
582582 cur = ggml_norm (ctx0, cur, 1e-5 ); // default nn.LayerNorm
0 commit comments