diff --git a/conditioner.hpp b/conditioner.hpp index 33857eb..481ee78 100644 --- a/conditioner.hpp +++ b/conditioner.hpp @@ -1698,7 +1698,7 @@ struct LLMEmbedder : public Conditioner { std::vector> image_embeds; std::pair prompt_attn_range; int prompt_template_encode_start_idx = 34; - int max_length = 0; + int max_length = 0; std::set out_layers; if (llm->enable_vision && conditioner_params.ref_images.size() > 0) { LOG_INFO("QwenImageEditPlusPipeline"); @@ -1810,6 +1810,7 @@ struct LLMEmbedder : public Conditioner { } else if (sd_version_is_longcat(version)) { prompt_template_encode_start_idx = 36; // prompt_template_encode_end_idx = 5; + max_length = 512; 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";