Code Monkey home page Code Monkey logo

noise_latent_perlinpinpin's Introduction

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.

image

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

00296UI_00001_

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:

00049UI_00001_

Another comparison:

Upscaled with perlin-based noise:

261039117-ce59f1cb-f1d7-42ad-931c-996e6e952eba

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

261060650-c56fd782-6e24-49c6-946d-53c199d7272d

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.