noise_latent_perlinpinpin

noise_latent_perlinpinpin
★ 34

潜在空间Perlin噪声samplers兼容纹理细节控制
生成基于Perlin噪声的latent空间,输出可被samplers直接使用的可控噪声,用于控制纹理、细节和中途上采样。
💡 在采样前生成可用于控制纹理和细节的Perlin潜在噪声。
🍴 8 Forks💻 Python🔄 2024-08-13
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/c73fe210bae7
image
00296UI_00001_
00049UI_00001_
261039117-ce59f1cb-f1d7-42ad-931c-996e6e952eba
261060650-c56fd782-6e24-49c6-946d-53c199d7272d
📄 README

noise_latent_perlinpinpin

This allows to create latent spaces filled with perlin-based noise that can actually be used by the samplers.

Update!

I simplified the algorith to now be able to support all resolutions (you should keep the same aspect ratio if you’re upscaling however).

It is also much more simple to use as well as it will have no artifacts.

The simple trick to break the perlin pattern is now the following line:

noise = torch.remainder(torch.abs(noise)*1000000,11)/11

This just detroys the smooth pattern while keeping it predictable at all scales.

installation:

Just drop the .py file in your custom nodes folder or download the repository as zip and put it in the custom nodes folder.

You will also need BlenderNeko noise related nodes to use this and the workflow:

https://github.com/BlenderNeko/ComfyUI_Noise

I highly recommend to use city96 latent upscaler in order to upscale the latent in the middle of the generation if you want to use this node for better upscales!

A workflow using his node is within the house picture at the end of the readme.

known limitation:

  • You should keep the exact same aspect ratios if you want to upscale or the patterns will not match. ⚠⚠⚠⚠⚠⚠
  • Use

    I’ve included a workflow with notes in it to give you the basics but this is uncharted territory.

    Euler works good with normal noise, dpmpp2m with karras is pretty nice.

    Now you can reinject the same noise pattern after an upscale and get more coherent results.

    Example / Idea

    This Perlin Merlin Rabbit has been made with SDXL using the perlin based noise.

    The workflow has been noisy perlin injection (defaults settings from the shared node) -> SDXL Base (15 steps) -> VAE decode -> lanczos resize (x1.5) -> VAE encode -> same seed noisy perlin injection (but 1.5x bigger) -> SDXL refiner (5 steps)

    The lanczos resize nodes are here and here

    Comfy workflow included in this image. It has been upscaled x2 mid generation using SD1.5 (realistic vision 30). BNK_Noise generator is present yet disconnected (delete it if you don’t have it then), it uses city96 latent upscaler:

    Another comparison:

    Upscaled with perlin-based noise:

    Here the noise that has been injected in the latent space after the upscale is the usual noise:

    It think that we can conclude that it works 😉

    If you like my work and don’t want me to starve don’t hesitate to check my ko-fi page