Skip to content

Commit 85e38ab

Browse files
committed
fix SD3CLIPEmbedder::get_learned_condition_common
1 parent 8a0730d commit 85e38ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

conditioner.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,8 @@ struct SD3CLIPEmbedder : public Conditioner {
998998
ggml_tensor_scale(tensor, (original_mean / new_mean));
999999
}
10001000
} else {
1001-
chunk_hidden_states_t5 = ggml_new_tensor_2d(work_ctx, GGML_TYPE_F32, 4096, 0);
1001+
chunk_hidden_states_t5 = ggml_new_tensor_2d(work_ctx, GGML_TYPE_F32, 4096, chunk_len);
1002+
ggml_set_f32(chunk_hidden_states_t5, 0.f);
10021003
}
10031004

10041005
auto chunk_hidden_states_lg_pad = ggml_new_tensor_3d(work_ctx,
@@ -1182,6 +1183,7 @@ struct FluxCLIPEmbedder : public Conditioner {
11821183
t5_weights.insert(t5_weights.end(), curr_tokens.size(), curr_weight);
11831184
}
11841185
}
1186+
11851187
if (clip_l) {
11861188
clip_l_tokenizer.pad_tokens(clip_l_tokens, clip_l_weights, 77, padding);
11871189
}

0 commit comments

Comments
 (0)