kartoon-ai/layer_diffusers

Diffusers implementation of LayerDiffuse

5

stars

7

commits

Python

primary language

May 29, 2024

updated

README

Diffuser-layerdiffuse

output_images

4 example of output images with model "Juggernaut-XL-v6"

How to install

Install package

pip install -e .

Note: xformers library is optional

How to use it

from layer_diffusers.transparency_manager import TransparencyManager

# instantiate the transparency manager
transparency_manager = TransparencyManager(pipe)
transparency_manager.patch_pipe()

# run any pipe you like
images = pipe(prompt=prompt, negative_prompt="bad, ugly", num_inference_steps=20,
                  width=1024, height=1024, generator=gen).images
    
# this should be run right after the forward pass of the pipe, as it operates on the latest latent
pixels, pixels_rgb, alpha, checkerboard_image = transparency_manager.post_process_transparency()

and have a look at the notebook demo.ipynb or the python script demo.py

Contributors

joelkartoon

7 commits

kartoon-ai/layer_diffusers

Diffusers implementation of LayerDiffuse

5

stars

7

commits

Python

primary language

May 29, 2024

updated

README

Diffuser-layerdiffuse

output_images

4 example of output images with model "Juggernaut-XL-v6"

How to install

Install package

pip install -e .

Note: xformers library is optional

How to use it

from layer_diffusers.transparency_manager import TransparencyManager

# instantiate the transparency manager
transparency_manager = TransparencyManager(pipe)
transparency_manager.patch_pipe()

# run any pipe you like
images = pipe(prompt=prompt, negative_prompt="bad, ugly", num_inference_steps=20,
                  width=1024, height=1024, generator=gen).images
    
# this should be run right after the forward pass of the pipe, as it operates on the latest latent
pixels, pixels_rgb, alpha, checkerboard_image = transparency_manager.post_process_transparency()

and have a look at the notebook demo.ipynb or the python script demo.py

Contributors

joelkartoon

7 commits

Languages

Python

82.6%

Jupyter Notebook

17.4%