Majesty Diffusion
Majesty Diffusionð
Majesty Diffusionã¯ãDango233ã«ããããã¹ãããç»åãžã®ãã¯ããã¯ã®ã³ã¬ã¯ã·ã§ã³ã§ããããã«ãã¢ãŒãã«ã¢ãŒãïŒusïŒïŒã«ãã£ãŠè¿œå ããããã®ã§ãããã³ãã¥ããã£ã®è²¢ç®ã«éåžžã«ãªãŒãã³ã§ããä¿åå¯èœãããŒãå¯èœãå ±æå¯èœãªèšå®ãããã®ã§ãããã§è¯ããã®ãäœã£ãããã©ããã£ãŠããã«ãã©ãçããããä»ã®äººãšå ±æããŠãã ãããå®å šãªã¬ã€ããšãã¥ãŒããªã¢ã«ããŸããªãç»å ŽããŸãïŒ
LatentMajestyDiffusionã«ã¹ã¿ã ã¹ã±ãžã¥ãŒã«ã®äœ¿çšæ¹æ³
ã«ã¹ã¿ã ã¹ã±ãžã¥ãŒã«ã®äŸ
custom_schedule_setting = [
[200,1000,8],
[50,200,5],
"gfpgan:1.0",
"latent:1.5",
[1,50,8]
]
custom_schedulesé åã®åèŠçŽ ã¯ãé çªã«å®è¡ãããã¿ã¹ã¯ã§ãããããããã®åºåãä»ã®èŠçŽ ã®initãšããŠäœ¿çšãããŸããçŸåšã次ã®3ã€ããããŸããé åïŒ[final_stepãinit_stepãstep_size]圢åŒã®ãã€ãºé€å»ã¹ã±ãžã¥ãŒã«final_stepïŒãæåŸ ããããå€ã¯0ã§ãããŒãã¯ãæ¡æ£ããã»ã¹ãæåŸãŸã§å®è¡ãããããšãæå³ããŸããçµæãç²ãããå ŽåããŸãã¯ã¹ã±ãžã¥ãŒã«ã«ã¢ã€ãã ãè¿œå ããå Žåã¯ãæ©æã«çµäºããããšããå§ãããŸããinit_stepïŒåæãã€ãºã決å®ããŸããinit_image step_sizeã®å Žåã«ã¹ããããã¹ãããããå Žåãé€ããŠã1000ããéå§ããå¿ èŠããããŸãããéåžžã®ãæ¡æ£ããã»ã¹ã¯ãinit_step 0ããã¹ããããµã€ãº1ã®æçµã¹ããã1000ãŸã§éå§ããŸãããã倧ããªã¹ããããµã€ãºãè¿œå ãããšãæ¡æ£ããã»ã¹ãããéã移åã§ããŸãã ã现éšã«åŠ¥åããããŸããéåžžã5ã12ãé©åãªã¹ããããµã€ãºã§ãã
gfpganïŒé¡ãä¿®æ£ããŠé«çŽæãåºãããã®ã¹ãããã䜿çšæ³ïŒgfpgan:1.5ç»åã1.5åã«æ¡å€§ãããé¡ãä¿®æ£ãããããšãæå³ããŸããé¡ãä¿®æ£ãããã ãã®å Žåã¯ãgfpgan:1.0
latentïŒç»åã倧ããããããã«æœåšæ¡æ£ã䜿çšããã¹ããããç»åã¯æœåšæ¡æ£æœåšç©ºéã§ã¢ããã¹ã±ãŒã«ãããŸãããã ããããã¯å šäœçãªåœ¢ç¶ãäžããã ãã§ããç»åãã¢ããã¹ã±ãŒã«ãããåŸããã€ãºé€å»ã¹ããããããã«è¿œå ããå¿ èŠããããŸããæœåšçãªã¢ããã¹ã±ãŒãªã³ã°ã䜿çšããå Žåãå¹ ãšé«ãã¯128ã®åæ°ã§ããå¿ èŠããããŸã
æåã®ã¹ã±ãžã¥ãŒã«ã«æ»ã£ãŠãäœãèµ·ãã£ãŠããã®ãã説æããŸãããã
custom_schedule_setting = [
[200,1000,8],
[50,200,5],
"gfpgan:1.0",
[1,50,5]
]
[200,1000,8]圢åŒã¯[final_step, init_step, step_size]次ã®ãšããã§ããããã¯ããã€ãºé€å»ããã»ã¹ã1000ãã200ã¹ãããã§step_sizeã8ã§çºçããããšãæå³ããŸãïŒã€ãŸãã800ã¹ãããã§ãããåã¹ãããã8é²ããšã100ã®å®éã®ã¹ããããæå³ããŸãïŒ [50,200,5] ãã¹ããããµã€ãº5ã¯ãæ¡æ£ããã»ã¹ã®æåŸã®ãããã«çŽ°ãã詳现ãè¿œå ããããã«äœ¿çšãããŸã gfpgan:1.0ããã®ã¹ãããã§ã¯ãé¡ãä¿®æ£ããåçã«äœãããã£ãå Žåã«åããŠãé¡ããã£ãããèŠããããšããŸã [1,50,8]ããã®ã¹ãããã§ã¯ãé¡ãä¿®æ£ããç»åããã¹ããããµã€ãº5ã§æåŸã®50åã®æ¡æ£ã¹ããããå®è¡ããŸãã
å¥ã®ã¹ã±ãžã¥ãŒãªã³ã°äŸïŒ
custom_schedule_setting = [
[500,1000,8],
"latent:1.5",
[50,500,8]
]
ãã®äŸã§ã¯ãç»åã¯ã¹ããã1000ãã500ãŸã§ã¹ããããµã€ãº8ã§ãã€ãºé€å»ããã次ã«1.5åã«ã¢ããã¹ã±ãŒã«ãããããã«ã¹ããã500ãã50ãŸã§ã®ãã倧ããªç»åã§ãã€ãºé€å»ãããŸãã50ã§çµäºããŸãã
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",
"latent:1.5",
[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
latent: A step to use latent diffusion to make the image bigger. The image gets upscaled in the latent diffusion latent space. However, this will only give you the overall shape. You have to then add more denoising steps after the image got upscaled. If you use latent upscaling, your width-height have to be multiples of 128
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
Another scheduling example:
custom_schedule_setting = [
[500,1000,8],
"latent:1.5",
[50,500,8]
]
In this example, the image will be denoised from steps 1000 until 500 with a step size of 8, then upscaled 1.5x and then further denoised with the bigger image from steps 500 til 50. It will end at 50.