Skip to content

Possibility to add filters to the generation process (modifying latents at each step) #5268

Description

@TimothyAlexisVass

Is your feature request related to a problem? Please describe.
I've added filters to the inference process with a workaround solution.
It happens in the latent space.
It would be great if there was some similar solutio as callback called something like modifying_callback which would modify the latents at each step.

Additional context
The example below works similar to an unsharp mask.
I think the settings can be improved upon greatly (since using the ImageFilter.UnsharpMark from PIL will often give a better result), but it's promising.

The importance would be to open up the possibility to add filters to the process.
I think OpenCV may be a great candidate for this.

Example comparing sharpness = 2 and sharpness = 8 https://youtu.be/e2uf1_oQmGA
2
8

Example with manually applied unsharp mask on the resulting png where sharpness was set to 2
This was done with Pillow (PIL) ImageFilter image.filter(ImageFilter.UnsharpMask(radius = 0.777, percent = 345, threshold = 0))
result

Activity

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

Metadata

Metadata

Assignees

Labels

staleIssues that haven't received updates

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions