Skip to content

Commit b8c346d

Browse files
committed
format code
1 parent 7604e9f commit b8c346d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

conditioner.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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);

util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ std::vector<std::pair<std::string, float>> parse_prompt_attention(const std::str
594594
}
595595
};
596596

597-
std::smatch m,m2;
597+
std::smatch m, m2;
598598
std::string remaining_text = text;
599599

600600
while (std::regex_search(remaining_text, m, re_attention)) {

0 commit comments

Comments
 (0)