diff --git a/README.md b/README.md index 157a8f9..0f43669 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ To use MagCache node, simply add `MagCache` node to your workflow after `Load Di | Models | magcache_thresh | retention_ratio | magcache_K | |:----------------------------:|:-----------------:|:-----------------:|:-----------------:| -| FLUX | 0.24 | 0.1 | 5 | +| FLUX | 0.24 | 0.1 | 3 | | HunyuanVideo-T2V | 0.24 | 0.2 | 6 | | Wan2.1-T2V-1.3B | 0.12 | 0.2 | 4 | | Wan2.1-T2V-14B | 0.24 | 0.2 | 6 | @@ -41,7 +41,7 @@ To use MagCache node, simply add `MagCache` node to your workflow after `Load Di -If the image/video after applying MagCache is of low quality, please reduce magcache_thresh and magcache_K. +If the image/video after applying MagCache is of low quality, please reduce **magcache_thresh** and **magcache_K**. The demo workflows ([flux](./examples/flux.json), [hunyuanvideo](./examples/hunyuanvideo.json), [wan2.1_t2v](./examples/wan2.1_t2v.json) and [wan2.1_i2v](./examples/wan2.1_i2v.json)) are placed in examples folder. **In our experiments, the videos generated by Wan2.1 are not as high-quality as those produced by the [original unquantized version](https://github.com/Wan-Video/Wan2.1).** diff --git a/examples/flux.json b/examples/flux.json index 39cbba5..6dda1f4 100644 --- a/examples/flux.json +++ b/examples/flux.json @@ -771,7 +771,7 @@ "flux", 0.24, 0.1, - 5 + 3 ] } ], diff --git a/nodes.py b/nodes.py index 21e4ff5..8146d84 100644 --- a/nodes.py +++ b/nodes.py @@ -74,7 +74,7 @@ def magcache_flux_forward( self.accumulated_ratio = 1 self.accumulated_steps = 0 skip_forward = False - if enable_magcache and cur_step!=11: + if enable_magcache and cur_step not in [11]: cur_mag_ratio = mag_ratios[cur_step] self.accumulated_ratio = self.accumulated_ratio*cur_mag_ratio # magnitude ratio between current step and the cached step self.accumulated_steps += 1 # skip steps plus 1