@@ -270,8 +270,8 @@ struct FrozenCLIPEmbedderWithCustomWords : public Conditioner {
270270 const std::string& curr_text = item.first ;
271271 float curr_weight = item.second ;
272272 // printf(" %s: %f \n", curr_text.c_str(), curr_weight);
273- int32_t clean_index = 0 ;
274- if (curr_text == " BREAK" && curr_weight == -1 .0f ) {
273+ int32_t clean_index = 0 ;
274+ if (curr_text == " BREAK" && curr_weight == -1 .0f ) {
275275 // Pad token array up to chunk size at this point.
276276 // TODO: This is a hardcoded chunk_len, like in stable-diffusion.cpp, make it a parameter for the future?
277277 // Also, this is 75 instead of 77 to leave room for BOS and EOS tokens.
@@ -397,7 +397,7 @@ struct FrozenCLIPEmbedderWithCustomWords : public Conditioner {
397397 const std::string& curr_text = item.first ;
398398 float curr_weight = item.second ;
399399
400- if (curr_text == " BREAK" && curr_weight == -1 .0f ) {
400+ if (curr_text == " BREAK" && curr_weight == -1 .0f ) {
401401 // Pad token array up to chunk size at this point.
402402 // TODO: This is a hardcoded chunk_len, like in stable-diffusion.cpp, make it a parameter for the future?
403403 // Also, this is 75 instead of 77 to leave room for BOS and EOS tokens.
@@ -409,7 +409,7 @@ struct FrozenCLIPEmbedderWithCustomWords : public Conditioner {
409409 tokens.insert (tokens.end (), padding_size, tokenizer.EOS_TOKEN_ID );
410410 weights.insert (weights.end (), padding_size, 1 .0f );
411411 }
412- continue ; // Skip to the next item after handling BREAK
412+ continue ; // Skip to the next item after handling BREAK
413413 }
414414
415415 std::vector<int > curr_tokens = tokenizer.encode (curr_text, on_new_token_cb);
0 commit comments