GithubHelp home page GithubHelp logo

couldnt-find-good-name / sd-webui-resharpen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haoming02/sd-webui-resharpen

0.0 0.0 0.0 5 KB

An Extension for Automatic1111 Webui that increases/decreases the details of images

License: MIT License

Python 100.00%

sd-webui-resharpen's Introduction

SD Webui ReSharpen

This is an Extension for the Automatic1111 Webui, which allows you to increase or decrease the amount of details of the generation during the Stable Diffusion pipeline.

ie. This is not just a postprocessing filter

How to Use

There is simply a slider that controls the "sharpness" of the images, defaulting to 0.

  • Positive values cause the images to be noisy
  • Negative values cause the images to be blurry

Though, don't actually use values too close 1 or -1 as it will become distorted

For txt2img, there is also a second slider for the Hires. Fix pass. You can set positive for the normal pass and negative for the hr pass, or vice versa, for some interesting effects.

Note: Ancestral samplers (eg. Euler a) do not work. Tested and confirmed to work for both Euler and DPM++ 2M Karras.

Samples

Sharpness -0.5 -0.25 0.0 0.25 0.5
Result

How does it work?

๐Ÿคท

In all seriousness, I initially wrote this Extension to try speeding up the Diffusion process. Since the latent noises gradually converges to around 0, I tried to see if I can just add the delta between the current step and the previous step, perhaps multipled by a scaler, to the current Tensor, in order to help it reaches 0 faster. However, after fiddling around for a week, I still couldn't get it to consistently produce an actually better result. So I gave up on the original idea.

Though in the process, I also found out this "sharpening" interaction. If I had to guess, since the Diffusion is a denoising process, if I add the delta again, then it will overly denoise to create a blurry image; if I subtract the delta, then it will basically add the noise back to create a noisy image.

To Do

  • Generation InfoText
  • Pasting InfoText Support
  • X/Y/Z Plot Support

sd-webui-resharpen's People

Contributors

haoming02 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.