Skip to content

FEAT: Image Filter Converter#1669

Open
jbolor21 wants to merge 7 commits intomicrosoft:mainfrom
jbolor21:bjagdagdorj/image_converters
Open

FEAT: Image Filter Converter#1669
jbolor21 wants to merge 7 commits intomicrosoft:mainfrom
jbolor21:bjagdagdorj/image_converters

Conversation

@jbolor21
Copy link
Copy Markdown
Contributor

@jbolor21 jbolor21 commented Apr 29, 2026

Description

Adds a new converter to transform text prompt into a image filter style prompt for image models.

Tests and Documentation

added example usage in 3_image_converters.ipynb notebook
added new tests

@jbolor21 jbolor21 marked this pull request as draft April 29, 2026 19:04
@jbolor21 jbolor21 marked this pull request as ready for review April 29, 2026 19:52
# This notebook covers two categories of image converters:
# This notebook covers three categories of image converters:
#
# - **[Text to Text](#text-to-text)**: Convert (objective) text into text prompt for image generation
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That isn't technically an image converter... I know why you added it here but it is odd in its own way 😆

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes had that same thought when i was adding it in :)

CRITICAL INSTRUCTION: The image must look like an authentic photograph of the convex mirror,
not a direct photo. Everything must be distorted by the curved reflection.
variations:
Wide Mirror Shot: "Full view of the convex mirror from across the laundromat. The warped reflection shows washing machines, the TV, and the subject all curved."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work with whitespace in the key?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! :)

Returns:
List of filter names (YAML filenames without extension), excluding the system prompt.
"""
return sorted(p.stem for p in IMAGE_FILTER_DIR.glob("*.yaml") if p.name != _SYSTEM_PROMPT_FILENAME)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit inconvenient if we want to add others or users want a custom one. Maybe we can just put them all into one file and provide an option to specify the YAML file + variation, but if they're not specified then it will use the default YAML file and a random one within that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants