| --- |
| license: creativeml-openrail-m |
| tags: |
| - stable-diffusion |
| - sdxl |
| - layerdiffusion |
| - attention-injection |
| - diff-patches |
| - comfyui |
| --- |
| |
| # LayerDiffusion-SDXL-Attn-Diff |
|
|
| This repository contains a converted version of the `layer_xl_transparent_attn.safetensors` model from [LayerDiffusion/layerdiffusion-v1](https://huggingface.co/LayerDiffusion/layerdiffusion-v1) |
|
|
| ## Model Details |
| - **Base Model**: `layer_xl_transparent_attn.safetensors` from [LayerDiffusion/layerdiffusion-v1](https://huggingface.co/LayerDiffusion/layerdiffusion-v1) |
| - **Conversion**: LoRA patches (`::lora::0`, `::lora::1`) are converted to `diff` patches (`::diff::0`) using matrix multiplication (`torch.mm`). |
| - **License**: [CreativeML Open RAIL-M](https://huggingface.co/spaces/license/cml-openrail-m), same as the original model. |
| - **File**: `layer_xl_transparent_attn.safetensors` (contains precomputed `diff` patches) |
|
|
| ## Usage in ComfyUI |
| 1. Download `layer_xl_transparent_attn.safetensors` and place it in `ComfyUI/models/layer_model/`. |
| 2. Install the [ComfyUI-layerdiffuse](https://github.com/huchenlei/ComfyUI-layerdiffuse) custom node. |
| 3. In your workflow, use the `LayeredDiffusionApply` node with `config` set to `SDXL, Attention Injection`. |
|
|
| ## Credits |
| This model is a derivative of the original work by Lvmin Zhang and Maneesh Agrawala, as described in their paper: |
|
|
| > Zhang, L., & Agrawala, M. (2024). Transparent Image Layer Diffusion using Latent Transparency. *arXiv preprint arXiv:2402.17113*. [https://arxiv.org/abs/2402.17113](https://arxiv.org/abs/2402.17113) |
|
|
| - **Original Model**: [LayerDiffusion/layerdiffusion-v1](https://huggingface.co/LayerDiffusion/layerdiffusion-v1) by the LayerDiffusion team. |
|
|
| ## License |
| This model is distributed under the [CreativeML Open RAIL-M](https://huggingface.co/spaces/license/cml-openrail-m) license, as required by the original model. Please review the license for usage terms, including non-commercial restrictions. |