Majesty Diffusion 👑

Majesty Diffusion is a collection of techniques for text to image by Dango233 and and additions made by multimodalart (us!), very open to community contributions. It has savable, loadable and sharable settings, so if you make good stuff there, share with others how you got there. Full guide and tutorials coming soon!

How to use Latent Majesty Diffusion custom schedule

Example of a custom schedule

custom_schedule_setting = [
 [200,1000,8],
 [50,200,5],
 "gfpgan:1.0",
 [1,50,8]
]

Each element of the custom_schedules array is a task that is executed in sequence with the output of each being used as init to the other. There are currently three: Array: a de-noising schedule in the format [final_step, init_step, step_size] final_step: the 'expected' value there is 0. Zero means the diffusion process ran until the end. You may want to end it earlier if results are too grainy or if you want to add more items to the schedule init_step: Determines the initial noise. Should start at 1000 except if you want to skip steps in case of an init_image step_size: a "regular" diffusion process starts from init_step 0 until final step 1000 with a step size of 1. Adding bigger step sizes you move faster through the diffusion process, with compromises on details. Usually between 5-12 are good step sizes. You can experiment and see.

gfpgan: A step to correct faces and upscale. Usage: gfpgan:1.5 means the image will be upscaled 1.5 times and faces will be corrected. If you wish just to correct faces, use gfpgan:1.0

RGB: A step to stretch the image. Usage RGB:2 means the image will be stretched 2x. Further diffusion steps should then adjust the stretchy parts

scale: Re-scales the image. Usage scale:.9

noise: Adds an amount of noise. Usage noise:.57. The noise is needed if you are going back in time on the steps.

Some back to the schedule in the beginning, let's explain what is happening:

custom_schedule_setting = [
 [200,1000,8],
 [50,200,5],
 "gfpgan:1.0",
 [1,50,5]
]

[200,1000,8] remember, the format is [final_step, init_step, step_size] - this means the denoising process happen from 1000 until 200 steps with a step_size of 8. (So 800 steps, but with each step advancing 8, means 100 real steps) [50,200,5] then, from steps 200 until 50, a smaller step size of 5 is used to add fine details to the last bit of the diffusion process gfpgan:1.0 In this step, it will try to correct faces and make them look cool, in case there were any in your picture [1,50,8] With this step, it will take the face-corrected image and run it through the last 50 diffusion steps with a step size of 5

For upscaling and keep increasing the image quality, you can do:

custom_schedule_setting = [
[50,1000,8], 
"gfpgan:2", #RGB:2 here would have a similar effect if you dont want to use face correction
"scale:.9",
"noise:.57",
[50,200,5]
]

In this example, the image will be denoised from steps 1000 until 50 with a step size of 8, then upscaled 2x, with a .9 scale and a .55 noise for smoothness, and then further denoised with the bigger image from steps 200 until 50. It will end at 50. This can add great and sharp results to the final structure. You can see that we went back from 50 to 200. That removes some details from the image to then re-add. However to do that you need to add some noise. This is a good cheat-sheet for the amount of noise to add: 200 steps, scale: 0.9, noise: 0.57 300 steps, scale: 0.85, noise: 0.65 400 steps, scale: 0.8, noise: 0.8