Comments (12)
Thanks for your feedback. I tried AnimateDiff according to https://github.com/guoyww/AnimateDiff.
The following results without pick๏ผ
FreeU (different factors):
from freeu.
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.
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.
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)
from freeu.
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.
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.
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.
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.
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)
Can you share full code snippet?
from freeu.
@ChenyangSi , @rkfg
Hi, have you tested with torch.complex32? It loses all features and a gray photo appears.
from freeu.
Can you share full code snippet?
I describe my changes in the diffusers repo: huggingface/diffusers#5164 (comment)
from freeu.
@ChenyangSi Hi, can you share how to add FreeU code in T2V, like AnimateDiff?
from freeu.
ykk648/AnimateDiff-I2V@0842585
@YisuiTT you can refer to my codes
from freeu.
@ykk648 Thank u for your codes
from freeu.
Related Issues (20)
- Hyperparameter range HOT 2
- Implemented in a genAI add-on for Blender HOT 4
- What's your class UNetModel and function timestep_embedding HOT 1
- What are the parameters for Stable Diffusion 1.5 and required Sampler? HOT 2
- Where are the install instructions??? HOT 6
- UnetModel HOT 2
- generate the similar image pairs HOT 1
- Some question about FreeU code
- How to use it in SimpleCrossAttnUpBlock2D?
- Where should it be placed when used in comfyui?
- Is there code for the experiment
- How do you create the figures in your research paper? HOT 12
- You should look to input blocks
- Threshold of factor s
- how did u generate the SDXL image samples in the paper?
- FreeU with Lora Stack
- wrong page, cant delete post.
- FreeU doesn't work with ZLUDA on auto1111
- Whether freeu can be applied to Stable Cascade
- running FreeU on SM_52 cards
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freeu.