Coder Social home page Coder Social logo

comfyui-layerdiffuse's Introduction

ComfyUI-layerdiffuse

ComfyUI implementation of https://github.com/layerdiffusion/LayerDiffuse.

Installation

Download the repository and unpack into the custom_nodes folder in the ComfyUI installation directory.

Or clone via GIT, starting from ComfyUI installation directory:

cd custom_nodes
git clone [email protected]:huchenlei/ComfyUI-layerdiffuse.git

Run pip install -r requirements.txt to install python dependencies. You might experience version conflict on diffusers if you have other extensions that depends on other versions of diffusers. In this case, it is recommended to setup separate Python venvs.

Workflows

rgba

If you want more control of getting RGB image and alpha channel mask separately, you can use this workflow. readme1

Blending given FG fg_cond

Blending given BG bg_cond

diff_bg

Forge impl's sanity check sets Stop at to 0.5 to get better quality BG. This workflow might be inferior comparing to other object removal workflows. diff_fg

In SD Forge impl, there is a stop at param that determines when layer diffuse should stop in the denosing process. In the background, what this param does is unapply the LoRA and c_concat cond after a certain step threshold. This is hard/risky to implement directly in ComfyUI as it requires manually load a model that has every changes except the layer diffusion change applied. A workaround in ComfyUI is to have another img2img pass on the layer diffuse result to simulate the effect of stop at param. diff_fg_stop_at

Combines previous workflows to generate blended and FG given BG. We found that there are some color variations in the extracted FG. Need to confirm with layer diffusion authors on whether this is expected. fg_all

Note

TODO

  • Foreground conditioning
  • Background conditioning
  • Blended + foreground => background
  • Blended + background => foreground

comfyui-layerdiffuse's People

Contributors

huchenlei avatar kijai avatar xingren23 avatar

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.