Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
stduhpf committed Oct 19, 2024
1 parent af4f83f commit 8c6caf0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions clip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,12 +711,12 @@ class CLIPTextModel : public GGMLBlock {
if (return_pooled) {
auto text_projection = params["text_projection"];
ggml_tensor* pooled = ggml_view_1d(ctx, x, hidden_size, x->nb[1] * max_token_idx);
if(text_projection != NULL){
if (text_projection != NULL) {
pooled = ggml_mul_mat(ctx, ggml_cont(ctx, ggml_transpose(ctx, text_projection)), pooled);
}else{
} else {
LOG_DEBUG("Missing text_projection matrix, assuming identity...");
}
return pooled;
return pooled; // [hidden_size, 1, 1]
}

return x; // [N, n_token, hidden_size]
Expand Down
2 changes: 1 addition & 1 deletion conditioner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ struct FluxCLIPEmbedder : public Conditioner {
return {{clip_l_tokens, clip_l_weights}, {t5_tokens, t5_weights}};
}

SDCondition get_learned_condition_common(ggml_context* work_ctx,
SDCondition get_learned_condition_common(ggml_context* work_ctx,
int n_threads,
std::vector<std::pair<std::vector<int>, std::vector<float>>> token_and_weights,
int clip_skip,
Expand Down

0 comments on commit 8c6caf0

Please sign in to comment.