This is an automated archive made by the Lemmit Bot.

The original was posted on /r/stablediffusion by /u/panchovix on 2024-07-29 02:29:09+00:00.


Hi there guys, hope all is going good for you!

After some days without announcing some updates, I come here again with more info!

The link is

To remember from the past thread, we have 2 branches:

* main: with A1111 upstream changes.

* dev\_upstream: with A1111 and Comfy upstream backend changes.

main now has all the A1111 upstream changes! But:

  • img2img batch uploading: This breaks img2img basically on Forge. I haven’t found a way out to implement it.
  • DDIM CFG++: sd_samplers_cfg_denoiser.py is a bit different from A1111 to make it work with forge/comfy backend, so well, even if it’s on code, it will just output a black image.
  • SD3: This comes from A1111 backend, so for now, it isn’t implemented on reForge.

So, if you read the A1111 changelog, it was pretty big! Mostly of that is on reForge now, except what I mentioned.

Also, if you have noticed, Illyasviel have started to update OG Forge again, but with other experimental features, mostly Gradio 4.

I tried to create a branch based on that and well it works, but it has a lot of bugs making the UI mostly unusable for a lot of tasks, and probably breaks about half the extensions out there, so at the moment, I will keep using Gradio 3.x for reForge.


About new samplers, from the recommendation of /u/No-Educator-249, I added some samplers, called ODE Samplers.

These samplers are adaptive/fixed ODE Solvers (samplers), you can find more info here: and

By the way, AYS Gits, iPNDM and CFG++ samplers are on reForge as well!

The new samplers are:

  • ODE (Bosh3)
  • ODE (Fehlberg2)
  • ODE (Adaptive Heun)
  • ODE (Dopri5)
  • ODE Custom

The custom one is reserved to be able to personalize the sampler as you want.


Related about the last thing, I added a new Setting section, called Forge Alter Parameters.

New section

This section let you “personalize” forge alter samplers, so you can set for:

  • CFG++ Samplers
    • eta
    • s_noise
    • r (when applicable)
  • Euler DY/SMEA DY/Negative/Negative DY
    • s_churn
    • s_min
    • s_noise
  • ODE Samplers
    • relative tolerance
    • absolute tolerance
    • max steps
  • ODE Custom Sampler
    • Solver, between:
      • adaptive_heun
      • bosh3
      • dopri5
      • dopri8
      • euler
      • explicit_adams
      • fehlberg2
      • heun3
      • implicit_adams
      • midpoint
      • rk4
    • relative tolerance
    • absolute tolerance
    • max steps

ODE Custom


Also, updated to torch 2.3.1, torchvision 0.18.1 and xformers 0.0.27.

All these changes are available on both main and dev_upstream branch.

For main branch, also some specific fixes:

  • Fixed lowram DoRA issues.
  • Reduce memory usage when applying DoRA.
  • Fix DoRA strength.
  • Added turbo scheduler (again), this time from Forge upstream.
  • Updated forge_clip to Forge upstream.

Now, only for the dev_upstream branch.

  • Comfy upstream backend changes (up to 2024-07-26, still not as of today because, you will know!)
  • Fixed normalmap controlnet.
  • Added controlnet union support (in the backend at least!).
  • Fix (I think) inpaint_only + lama inpainting preprocessor.
  • And last but not least, added HiDiffusion as a built-in extension!

---------

What is HiDiffusion? You can read more about it here and .

But for this post, what it does:

  • HiDiffusion: Unlocking Higher-Resolution Creativity and Efficiency in Pretrained Diffusion Models.
  • A training-free method that increases the resolution and speed of pretrained diffusion models.
  • Supports various tasks, including text-to-image, image-to-image, inpainting.

HiDiffusion seems to help a lot SD1.5 models, and it helps SD2.x/SDXL models as well.

I took the implementation of from Comfy, and ported it over reForge!

This extension uses code from upstream comfy backend, so this extension doesn’t work either on main branch, or OG Forge.

On the extension, we have RAUNet and MSW-MSA.

RAUNet

This feature is Resolution-Aware U-Net.

It dynamically adjusts the feature map size to resolve object duplication and engages.

This feature makes higher-resolution possible, take it as a kohya hi-res fix alternative (that it should work correctly, I think I have to fix kohya hi-res fix built in implementation!)

From Github:

"The concept is to scale down the image at the start of generation to let the model set up major details like how many legs a character has and then allow the model to refine and add detail once the scaling effect ends. The main difference for that part is the downscale methods - it uses convolution with stride/dilation and pool averaging to downscale while Deep Shrink usually uses bicubic downscaling. Where the scaling occurs also may be important — it does seem to work noticeably better than Deep Shrink, at least for SD 1.5. "

MSW-MSA

This feature is Modified Shifted Window Multi-head Self-Attention.

It utilizes optimized window attention to reduce computations.

MSW-MSA is introduced to improve the inference efficiency of diffusion for higher-resolution image synthesis!

From Github:

"Not sure how to describe MSW-MSA attention. It seems like a big performance boost for SD 1.5 at high res and also appears to increase quality. Note that it does not enable high res generation by itself. "


I’ve converted it to work in Forge, and you can find it as “RAUNet and MSW-MSA for Forge” on the UI.

This is what looks like

RAUNet advanced tab

I suggest to start and see how it works with the Simple tabs (those were like the nodes on Comfy) and if you want to test more, move to the Advanced ones.


This was a lot of work to be honest, but I learned a lot. With this, I think I may be able to port more Comfy extensions into reForge! Also thanks to CasualDev242 on github for the suggestion ()


I think that’s all the updates. I hope you guys can enjoy them!

Again, many thanks for all the nice comments and positive vibes, it helps me a lot.

Also someone suggested to use buymeacoffe instead of Paypal, so I did it! (Sorry for the funny dog image, but I love dogs)

I did receive some donations on Paypal and I’m really, really grateful for that!

Also updated tree view and added dir view. I’m not sure why I didn’t use this before, but I love it.

That’s all, take care!