You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (llm->enable_vision && conditioner_params.ref_images.size() > 0) {
1733
1735
LOG_INFO("QwenImageEditPlusPipeline");
@@ -1828,6 +1830,8 @@ struct LLMEmbedder : public Conditioner {
1828
1830
} elseif (sd_version_is_longcat(version)) {
1829
1831
prompt_template_encode_start_idx = 36;
1830
1832
// prompt_template_encode_end_idx = 5;
1833
+
max_length = 512;
1834
+
pad = true;
1831
1835
1832
1836
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";
1833
1837
@@ -1848,7 +1852,7 @@ struct LLMEmbedder : public Conditioner {
1848
1852
prompt += "<|im_end|>\n<|im_start|>assistant\n";
1849
1853
}
1850
1854
1851
-
auto tokens_and_weights = tokenize(prompt, prompt_attn_range, 0, false);
1855
+
auto tokens_and_weights = tokenize(prompt, prompt_attn_range, max_length, pad);
0 commit comments