Skip to content

Commit fc8d85e

Browse files
committed
Fix token length
1 parent a907fe2 commit fc8d85e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

conditioner.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1698,7 +1698,7 @@ struct LLMEmbedder : public Conditioner {
16981698
std::vector<std::pair<int, ggml_tensor*>> image_embeds;
16991699
std::pair<int, int> prompt_attn_range;
17001700
int prompt_template_encode_start_idx = 34;
1701-
int max_length = 0;
1701+
int max_length = 0;
17021702
std::set<int> out_layers;
17031703
if (llm->enable_vision && conditioner_params.ref_images.size() > 0) {
17041704
LOG_INFO("QwenImageEditPlusPipeline");
@@ -1810,6 +1810,7 @@ struct LLMEmbedder : public Conditioner {
18101810
} else if (sd_version_is_longcat(version)) {
18111811
prompt_template_encode_start_idx = 36;
18121812
// prompt_template_encode_end_idx = 5;
1813+
max_length = 512;
18131814

18141815
prompt = "<|im_start|>system\nAs an image captioning expert, generate a descriptive text prompt based on an image content, suitable for input to a text-to-image model.<|im_end|>\n<|im_start|>user\n";
18151816

0 commit comments

Comments
 (0)