芋出し画像

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.


この蚘事が気に入ったらサポヌトをしおみたせんか