Coder Social home page Coder Social logo

Some feedback about freeu HOT 12 OPEN

rkfg avatar rkfg commented on June 20, 2024 5
Some feedback

from freeu.

Comments (12)

ChenyangSi avatar ChenyangSi commented on June 20, 2024 10

Thanks for your feedback. I tried AnimateDiff according to https://github.com/guoyww/AnimateDiff.

The following results without pick๏ผš

Original:
0-best-quality,-masterpiece,-1girl,-looking-at-viewer,-blurry-background,-upper

FreeU (different factors):

0-best-quality,-masterpiece,-1girl,-looking-at-viewer,-blurry-background,-upper
0-best-quality,-masterpiece,-1girl,-looking-at-viewer,-blurry-background,-upper

from freeu.

ChenyangSi avatar ChenyangSi commented on June 20, 2024 1

This is just a simple attempt according to the readme of AnimateDiff. We will be providing more results on the FreeU page and paper. We appreciate your continued interest.

from freeu.

justindujardin avatar justindujardin commented on June 20, 2024 1

Maybe it works better for cartoon-style images and animations because they naturally lack high frequencies... What were the factors that you used in the above? I can try with anime models.

@rkfg I also had poor results with FreeU, and then I started switching s1/s2/b1/b2 back to 1.0 at some point during the denoising process. The global features seem to be mostly settled early so that you can transition back to normal values between about 30% and 75% of the way through your steps.

And the results are greatly improved. I've tested it thoroughly, and most of the FreeU "fixes" are kept while still letting the fine details shine through at the end.

freeu_partial_mario

This is basically what I'm doing:

    steps = 30
    unet.freeu.sd21()

    def cb(step, _, __):
        if step == int(steps * 0.5):
            unet.freeu.ones()

    output = pipe(prompt, num_inference_steps=steps, callback=cb)

freeu_partial_waterfall

from freeu.

dajes avatar dajes commented on June 20, 2024 1

RuntimeError: cuFFT only supports dimensions whose sizes are powers of two when computing in half precision, but got a signal size of[12, 8]

To fix this you can just cast x to float for this operation in the first line of the Fourier_filter function
x_freq = fft.fftn(x.float(), dim=(-2, -1))
And cast back at the last line
return x_filtered.to(x.dtype)

from freeu.

rkfg avatar rkfg commented on June 20, 2024

Maybe it works better for cartoon-style images and animations because they naturally lack high frequencies... What were the factors that you used in the above? I can try with anime models.

from freeu.

rkfg avatar rkfg commented on June 20, 2024

Mario is noticeably improved, yes, but I prefer the vanilla waterfall, it's more detailed and interesting even though the contrast is a bit lower. SD 2.1 isn't that good in general, even with finetunes. Can you try on the best 1.5 models? Both cartoon and realistic? Would be interesting to see if this method can improve the output over what we can get without it.

from freeu.

adhikjoshi avatar adhikjoshi commented on June 20, 2024

Maybe it works better for cartoon-style images and animations because they naturally lack high frequencies... What were the factors that you used in the above? I can try with anime models.

@rkfg I also had poor results with FreeU, and then I started switching s1/s2/b1/b2 back to 1.0 at some point during the denoising process. The global features seem to be mostly settled early so that you can transition back to normal values between about 30% and 75% of the way through your steps.

And the results are greatly improved. I've tested it thoroughly, and most of the FreeU "fixes" are kept while still letting the fine details shine through at the end.

freeu_partial_mario

This is basically what I'm doing:

    steps = 30

    unet.freeu.sd21()



    def cb(step, _, __):

        if step == int(steps * 0.5):

            unet.freeu.ones()



    output = pipe(prompt, num_inference_steps=steps, callback=cb)

freeu_partial_waterfall

Can you share full code snippet?

from freeu.

kadirnar avatar kadirnar commented on June 20, 2024

@ChenyangSi , @rkfg
Hi, have you tested with torch.complex32? It loses all features and a gray photo appears.

from freeu.

justindujardin avatar justindujardin commented on June 20, 2024

freeu_partial_waterfall

Can you share full code snippet?

I describe my changes in the diffusers repo: huggingface/diffusers#5164 (comment)

from freeu.

YisuiTT avatar YisuiTT commented on June 20, 2024

@ChenyangSi Hi, can you share how to add FreeU code in T2V, like AnimateDiff?

from freeu.

ykk648 avatar ykk648 commented on June 20, 2024

ykk648/AnimateDiff-I2V@0842585
@YisuiTT you can refer to my codes

from freeu.

YisuiTT avatar YisuiTT commented on June 20, 2024

@ykk648 Thank u for your codes

from freeu.

Related Issues (20)

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.