Skip to content

Commit

Permalink
Use all of the clip
Browse files Browse the repository at this point in the history
  • Loading branch information
stduhpf committed Sep 5, 2024
1 parent d7679c9 commit de973c1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions conditioner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,7 @@ struct FluxCLIPEmbedder : public Conditioner {
size_t chunk_len_t5 = 256;
size_t chunk_count_t5 = t5_tokens.size() / chunk_len_t5;

// TODO: I believe chunk_count_l is actually bigger than chunk_count_t5
// So this ignores some tokens for clip
size_t chunk_count = chunk_count_t5;
size_t chunk_count = std::max(chunk_count_t5, chunk_count_l);

for (int chunk_idx = 0; chunk_idx < chunk_count; chunk_idx++) {
struct ggml_tensor* chunk_hidden_states_l = NULL; // [n_token, hidden_size_l]
Expand Down

0 comments on commit de973c1

Please sign in to comment.