From 43793ddd86a3d3b459d2db3b64426db0cf8ece3d Mon Sep 17 00:00:00 2001 From: Alexander R Izquierdo <105170707+DataCTE@users.noreply.github.com> Date: Sat, 1 Jun 2024 11:54:14 -0400 Subject: [PATCH] Update README.md --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9fbbb09..835011d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -Prompt Injection Node for ComfyUI +# Prompt Injection Node for ComfyUI + This custom node for ComfyUI allows you to inject specific prompts at specific blocks of the Stable Diffusion UNet, providing fine-grained control over the generated image. It is based on the concept that the content/subject understanding of the model is primarily contained within the MID0 and MID1 blocks, as demonstrated in the B-Lora (Content Style implicit separation) paper. Features @@ -7,27 +8,27 @@ Three different node variations for flexible workflow integration Customize the learning rate of specific blocks to focus on content, lighting, style, or other aspects Potential for developing a "Mix of Experts" approach by swapping blocks on-the-fly based on prompt content -Usage +# Usage Add the prompt_injection.py node to your ComfyUI custom nodes directory In your ComfyUI workflow, connect the desired node variation based on your input preferences Specify the prompts for each UNet block you want to customize Connect the output to the rest of your workflow and generate the image -Node Variations +# Node Variations Prompt Injection (Single Prompt): Injects a single prompt into the specified UNet blocks Prompt Injection (Multiple Prompts): Allows injecting different prompts into each specified UNet block Prompt Injection (Prompt Dictionary): Accepts a dictionary of block names and their corresponding prompts -Example +# Example Injecting the prompt "white cat" into the OUTPUT0 and OUTPUT1 blocks, while using the prompt "blue dog" for all other blocks, results in an image with the composition of the "blue dog" prompt but with a cat as the subject/content. Acknowledgements Modified and simplified version of the node from: https://github.com/pamparamm/sd-perturbed-attention Inspired by discussions and findings shared by @Mobioboros and @DataVoid -Future Work +# Future Work Investigate the location of different concepts (e.g., lighting) within the UNet blocks Develop a "guts diagram" of the SDXL UNet to understand where each aspect is stored