# US 2026/0064956 A1 · Methods and systems for meme generation with multi-modal input and planning

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0064956 A1
- Document ID: US20260064956A1
- Status: Published application
- Kind: A1
- Application number: 19/245,894
- Filed: 2025-06-23
- Published: 2026-03-05
- Earliest claimed: 2024-08-31
- Assignees: Tata Consultancy Services Limited
- Applicants: Tata Consultancy Services Limited
- Inventors: Vivek SRIVASTAVA; Ashutosh RANJAN; Jyotsana KHATRI; Savita Suhas BHAT; Shirish Subhash KARANDE
- Web page: https://patentgrep.com/patent/US20260064956A1

## CPC

- G06F 16/40: of multimedia data, e.g. slideshows comprising image and additional audio data (retrieval of still image data G06F16/50; retrieval of audio data G06F16/60; retrieval of video data G06F16/70)
- G06F 40/186: Templates
- G06F 16/90332: {Natural language query formulation or dialogue systems}
- G06T 11/60: Creating or editing images; Combining images with text
- G06T 2200/24: involving graphical user interfaces [GUIs]
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

The disclosure relates generally to methods and systems for meme generation with multi-modal input and planning. Conventional AI-based techniques either rely on input text prompt or the user-provided image as an input to generate the meme. Such input specification styles result in restrictive for clearly specifying an intent with a single modality. The present disclosure explores a multi-modal input specification style where a user can provide the input through a text prompt along with a widely popular meme template image. According to the present disclosure, the meme generation task is defined as a combination of two sub-tasks. In the first sub-task, a meme image template is retrieved from a dataset of existing meme templates using a template planning strategy. In the second sub-task, the text caption is generated for the retrieved template conditioned on the multi-modal input provided by the user through the caption planning strategy.

## Claims

### Claim 1

A processor-implemented method, comprising:
receiving, via one or more input/output (I/O) interfaces, a multi-modal input for which a meme is to be generated, from a user, wherein the multi-modal input comprises an input template image and a textual input obtained through multi-modalities;
generating, via one or more hardware processors, a contextual template plan from the input template image of the multi-modal input using a large language model (LLM) and a vision language model (VLM), wherein the contextual template plan comprises a description context, an action context, and an emotion context;
recontextualizing, via the one or more hardware processors, the contextual template plan and the textual input of the multi-modal input, using the LLM, to obtain a recontextualized template plan for the multi-modal input, wherein the recontextualized template plan comprises a recontextualized description, a recontextualized action, and a recontextualized emotion;
retrieving, via the one or more hardware processors, a final meme template for the multi-modal input based on the recontextualized template plan, using a max marginal relevance (MMR) search technique;
generating, via the one or more hardware processors, a caption text plan based on the multi-modal input and the final meme template retrieved for the multi-modal input, using the LLM, wherein the caption text plan comprises a content context and a style context;
generating, via the one or more hardware processors, a meme caption text for the multi-modal input, using the LLM, based on the caption text plan, the contextual template plan of the final meme template, and a reference caption repository, wherein the reference caption repository comprises a plurality of reference text captions; and
generating, via the one or more hardware processors, the meme for the multi-modal input, using the final meme template and the meme caption text.

### Claim 2 (depends on 1)

The processor-implemented method of claim 1, wherein the description context of the contextual template plan is generated from the input template image of the multi-modal input using the LLM, by:
obtaining a template metadata of the input template image, from a template metadata repository;
generating a plurality of tags depicting circumstances under which the input template image is relevant, from the template metadata, using the LLM; and
contextually combining the plurality of tags, using the LLM, to generate the description context of the contextual template plan.

### Claim 3 (depends on 1)

The processor-implemented method of claim 1, wherein the action context of the contextual template plan is generated from the input template image of the multi-modal input using the VLM, by:
passing the input template image of the multi-modal input to a vision encoder of the VLM, to obtain one or more vision embeddings;
passing a text instruction of an action associated with the input template image, to a text encoder of the VLM, to obtain one or more action textual embeddings; and
generating the action context of the contextual template plan from a text decoder of the VLM, by conditioning the one or more vision embeddings and the one or more action textual embeddings.

### Claim 4 (depends on 1)

The processor-implemented method of claim 1, wherein the emotion context of the contextual template plan is generated from the input template image of the multi-modal input using the VLM, by:
passing the input template image of the multi-modal input to a vision encoder of the VLM, to obtain one or more vision embeddings;
passing a text instruction of an emotion associated with the input template image, to a text encoder of the VLM, to obtain one or more emotion textual embeddings; and
generating the emotion context of the contextual template plan from a text decoder of the VLM, by conditioning the one or more vision embeddings and the one or more emotional textual embeddings.

### Claim 5 (depends on 1)

The processor-implemented method of claim 1, wherein retrieving the final meme template for the multi-modal input based on the recontextualized template plan, using the MMR technique, comprises:
retrieving (i) an initial description template based on the recontextualized description present in the recontextualized template plan, (ii) an initial action template based on the recontextualized action present in the recontextualized template plan, and (iii) an initial emotion template based on the recontextualized emotion present in the recontextualized template plan, from a meme template repository, using the MMR search technique; and
choosing the final meme template out of the initial description template, the initial action template and the initial emotion template that best matches the recontextualized template plan, using the MMR search technique.

### Claim 6 (depends on 1)

The processor-implemented method of claim 1, wherein generating the caption text plan based on the multi-modal input and the final meme template retrieved for the multi-modal input, using the LLM, comprises:
deriving a plurality of key phrases from the textual input of the multi-modal input, using the LLM;
contextually combining the plurality of key phrases, using the LLM, to generate the content context;
retrieving a plurality of style specific attributes from the multi-modal input, using the LLM based on the contextual template plan of the final meme template;
contextually combining the plurality of style specific attributes, using the LLM, to generate the style context; and
generating the caption text plan using the content context and the style context.

### Claim 7 (depends on 1)

The processor-implemented method of claim 1, wherein generating the meme caption text for the multi-modal input, using the LLM, based on the caption text plan, the contextual template plan of the final meme template, and the reference caption repository, comprises:
extracting one or more reference captions out of the plurality of reference captions present in the reference caption repository, based on the contextual template plan of the final meme template; and
passing the one or more reference captions, the caption text plan, and the contextual template plan of the final meme template, to the LLM, to generate the meme caption text for the multi-modal input.

### Claim 8

A system, comprising:
a memory storing instructions;
one or more input/output (I/O) interfaces;
one or more hardware processors coupled to the memory via the one or more I/O interfaces, wherein the one or more hardware processors are configured by the instructions to:
receive a multi-modal input for which a meme is to be generated, from a user, wherein the multi-modal input comprises an input template image and a textual input obtained through multi-modalities;
generate a contextual template plan from the input template image of the multi-modal input using a large language model (LLM) and a vision language model (VLM), wherein the contextual template plan comprises a description context, an action context, and an emotion context;
recontextualize the contextual template plan and the textual input of the multi-modal input, using the LLM, to obtain a recontextualized template plan for the multi-modal input, wherein the recontextualized template plan comprises a recontextualized description, a recontextualized action, and a recontextualized emotion;
retrieve a final meme template for the multi-modal input based on the recontextualized template plan, using a max marginal relevance (MMR) search technique;
generate a caption text plan based on the multi-modal input and the final meme template retrieved for the multi-modal input, using the LLM, wherein the caption text plan comprises a content context and a style context;
generate meme caption text for the multi-modal input, using the LLM, based on the caption text plan, the contextual template plan of the final meme template, and a reference caption repository, wherein the reference caption repository comprises a plurality of reference text captions; and
generate the meme for the multi-modal input, using the final meme template and the meme caption text.

### Claim 9 (depends on 8)

The system of claim 8, wherein the one or more hardware processors are configured to generate the description context of the contextual template plan from the input template image of the multi-modal input using the LLM, by:
obtaining a template metadata of the input template image, from a template metadata repository;
generating a plurality of tags depicting circumstances under which the input template image is relevant, from the template metadata, using the LLM; and
contextually combining the plurality of tags, using the LLM, to generate the description context of the contextual template plan.

### Claim 10 (depends on 8)

The system of claim 8, wherein the one or more hardware processors are configured to generate the action context of the contextual template plan from the input template image of the multi-modal input using the VLM, by:
passing the input template image of the multi-modal input to a vision encoder of the VLM, to obtain one or more vision embeddings;
passing a text instruction of an action associated with the input template image, to a text encoder of the VLM, to obtain one or more action textual embeddings; and
generating the action context of the contextual template plan from a text decoder of the VLM, by conditioning the one or more vision embeddings and the one or more action textual embeddings.

### Claim 11 (depends on 8)

The system of claim 8, wherein the one or more hardware processors are configured to generate the emotion context of the contextual template plan from the input template image of the multi-modal input using the VLM, by:
passing the input template image of the multi-modal input to a vision encoder of the VLM, to obtain one or more vision embeddings;
passing a text instruction of an emotion associated with the input template image, to a text encoder of the VLM, to obtain one or more emotion textual embeddings; and
generating the emotion context of the contextual template plan from a text decoder of the VLM, by conditioning the one or more vision embeddings and the one or more emotional textual embeddings.

### Claim 12 (depends on 8)

The system of claim 8, wherein the one or more hardware processors are configured to retrieve the final meme template for the multi-modal input based on the recontextualized template plan, using the MMR search technique, by:
retrieving (i) an initial description template based on the recontextualized description present in the recontextualized template plan, (ii) an initial action template based on the recontextualized action present in the recontextualized template plan, and (iii) an initial emotion template based on the recontextualized emotion present in the recontextualized template plan, from a meme template repository, using the MMR search technique; and
choosing the final meme template out of the initial description template, the initial action template and the initial emotion template that best matches the recontextualized template plan, using the MMR search technique.

### Claim 13 (depends on 8)

The system of claim 8, wherein the one or more hardware processors are configured to generate the caption text plan based on the multi-modal input and the final meme template retrieved for the multi-modal input, using the LLM, by:
deriving a plurality of key phrases from the textual input of the multi-modal input, using the LLM;
contextually combining the plurality of key phrases, using the LLM, to generate the content context;
retrieving a plurality of style specific attributes from the multi-modal input, using the LLM based on the contextual template plan of the final meme template;
contextually combining the plurality of style specific attributes, using the LLM, to generate the style context; and
generating the caption text plan using the content context and the style context.

### Claim 14 (depends on 8)

The system of claim 8, wherein the one or more hardware processors are configured to generate the meme caption text for the multi-modal input, using the LLM, based on the caption text plan, the contextual template plan of the final meme template, and the reference caption repository, by:
extracting one or more reference captions out of the plurality of reference captions present in the reference caption repository, based on the contextual template plan of the final meme template; and
passing the one or more reference captions, the caption text plan, and the contextual template plan of the final meme template, to the LLM, to generate the meme caption text for the multi-modal input.

### Claim 15

One or more non-transitory machine-readable information storage mediums comprising one or more instructions which when executed by one or more hardware processors cause:
receiving a multi-modal input for which a meme is to be generated, from a user, wherein the multi-modal input comprises an input template image and a textual input obtained through multi-modalities;
generating a contextual template plan from the input template image of the multi-modal input using a large language model (LLM) and a vision language model (VLM), wherein the contextual template plan comprises a description context, an action context, and an emotion context;
recontextualizing the contextual template plan and the textual input of the multi-modal input, using the LLM, to obtain a recontextualized template plan for the multi-modal input, wherein the recontextualized template plan comprises a recontextualized description, a recontextualized action, and a recontextualized emotion;
retrieving a final meme template for the multi-modal input based on the recontextualized template plan, using a max marginal relevance (MMR) search technique;
generating a caption text plan based on the multi-modal input and the final meme template retrieved for the multi-modal input, using the LLM, wherein the caption text plan comprises a content context and a style context;
generating a meme caption text for the multi-modal input, using the LLM, based on the caption text plan, the contextual template plan of the final meme template, and a reference caption repository, wherein the reference caption repository comprises a plurality of reference text captions; and
generating the meme for the multi-modal input, using the final meme template and the meme caption text.

### Claim 16 (depends on 15)

The one or more non-transitory machine readable information storage mediums of claim 15, wherein the description context of the contextual template plan is generated from the input template image of the multi-modal input using the LLM, by:
obtaining a template metadata of the input template image, from a template metadata repository;
generating a plurality of tags depicting circumstances under which the input template image is relevant, from the template metadata, using the LLM; and
contextually combining the plurality of tags, using the LLM, to generate the description context of the contextual template plan.

### Claim 17 (depends on 15)

The one or more non-transitory machine readable information storage mediums of claim 15, wherein the action context of the contextual template plan is generated from the input template image of the multi-modal input using the VLM, by:
passing the input template image of the multi-modal input to a vision encoder of the VLM, to obtain one or more vision embeddings;
passing a text instruction of an action associated with the input template image, to a text encoder of the VLM, to obtain one or more action textual embeddings; and
generating the action context of the contextual template plan from a text decoder of the VLM, by conditioning the one or more vision embeddings and the one or more action textual embeddings.

### Claim 18 (depends on 15)

The one or more non-transitory machine readable information storage mediums of claim 15, wherein the emotion context of the contextual template plan is generated from the input template image of the multi-modal input using the VLM, by:
passing the input template image of the multi-modal input to a vision encoder of the VLM, to obtain one or more vision embeddings;
passing a text instruction of an emotion associated with the input template image, to a text encoder of the VLM, to obtain one or more emotion textual embeddings; and
generating the emotion context of the contextual template plan from a text decoder of the VLM, by conditioning the one or more vision embeddings and the one or more emotional textual embeddings.

### Claim 19 (depends on 15)

The one or more non-transitory machine readable information storage mediums of claim 15, wherein retrieving the final meme template for the multi-modal input based on the recontextualized template plan, using the MMR technique, comprises:
retrieving (i) an initial description template based on the recontextualized description present in the recontextualized template plan, (ii) an initial action template based on the recontextualized action present in the recontextualized template plan, and (iii) an initial emotion template based on the recontextualized emotion present in the recontextualized template plan, from a meme template repository, using the MMR search technique; and
choosing the final meme template out of the initial description template, the initial action template and the initial emotion template that best matches the recontextualized template plan, using the MMR search technique.

### Claim 20 (depends on 15)

The one or more non-transitory machine readable information storage mediums of claim 15, wherein generating the caption text plan based on the multi-modal input and the final meme template retrieved for the multi-modal input, using the LLM, comprises:
deriving a plurality of key phrases from the textual input of the multi-modal input, using the LLM;
contextually combining the plurality of key phrases, using the LLM, to generate the content context;
retrieving a plurality of style specific attributes from the multi-modal input, using the LLM based on the contextual template plan of the final meme template;
contextually combining the plurality of style specific attributes, using the LLM, to generate the style context; and
generating the caption text plan using the content context and the style context.
