Skip to content

Magic Prompt Injection SDXL and SD 1.5 node for ComfyUI. Direct-to-block prompt injection, bypass "nightmare limb" layers, and improving AI video by prompting .weight and .bias layers directly. (video support coming soon)

License

Notifications You must be signed in to change notification settings

311-code/Magic-Prompt-Injection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 

Repository files navigation

✨🔮 ComfyUI Magic Prompt Injection 🔮✨

Prompt Injection

Support me on Ko-Fi

✨ Introduction

This project integrates advanced prompt injection techniques with the ComfyUI framework to enhance your SDXL and SD 1.5 based AI image generation capabilities.

The image above has a blurry background because the layers that affect it were disabled! Another example coming soon with a more detailed prompt.

🔮 Features

  • 🪄 Advanced Prompt Injection: Leverage state-of-the-art techniques for prompt injection of SDXL-based/SD1.5 models, ensuring better control and significantly reducing unwanted outputs.
  • 🪄 SDXL/SD1.5 Block Prompting: Directly prompt an SDXL model's unet blocks and set individual block strengths for precise control over image content. Use two conditioning zero out nodes for full utilization (workflow coming soon)
  • 🪄 Enhanced Scheduler Integration: Recommended to use Nvidia Align your steps scheduler with a samplercustomadvanced in ComfyUI for optimal results.
  • 🪄 Magic Model Injector: A forthcoming node to inject SD3 weights and bias layers, improving common issues like the "woman in grass" problem. this is sort of "swiss army knife" nodes and does many other things, such as batch images latent injection at one time to a tensor or latent and squeezing it all in.

🛠️ How to Use

  1. Download and Install:
    • Option 1: Download the ZIP file from the repository and extract it:
      Place in /ComfyUI/custom_nodes
    • or Option 2: Clone the repository directly into the ComfyUI\custom_nodes directory (Windows):
      Install git https://git-scm.com/downloads
      cd to ComfyUI/custom_nodes go to top of explorer and type "cmd"
      git clone https://github.com/brentjohnston/prompt_injection_advanced.git
      Start comfyui and load the example workflow
      Zerooutconditioning to positive and negative prompt to ksampler. Use this node instead to prompt, but you can do it either way.
    • or option 3 Linux users: You know what to do!

⚙️ Recommended Configuration

  • Scheduler: Use Nvidia Align your steps scheduler.
  • Sampler: Attach to a samplercustomadvanced in ComfyUI.
  • Guider: Connect the guider and other requirements of samplercustomadvanced.
  • Conditioning: Use conditioningzeroout on both positive and negative prompts.
  • Connect Node: Connect the Magic Prompt Injection node and start prompting directly to unet blocks in the model. decrease and increase weights per layer.

🔮 Preview of Magic Model Injector SD3, SDXL, and soon Flux

PS. I am working on another more advanced node (that will do all of this and lot more). It injects SD3 weights and bias layers to help mitigate common issues like the woman in grass nightmare limbs SD3 or model ablation. This upcoming project is called Magic Model Injector.

Disclaimer: This came out a bit lewd somehow, apologies ahead of time. SD3 example:

Magic Model Injector Coming Soon with SD3 support.. preview_magic_model_injector

Don't ask me why the woman shows up in a bikini.. it happened when I inject certain SD3 joint block layers with real women in grass! Maybe it breaks some sort of ablation here, I dunno. Quality is bad for now and I will attempt to fix it before release.

💖 Support Me

Creating and maintaining this project takes a lot of effort and dedication. If you find it useful, please consider supporting me:

Support me on Ko-Fi

Your support helps me keep these projects alive and continually improve it.

🤝 Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.

📜 License

This project is licensed under the Apache License - see the LICENSE file for details.

About

Magic Prompt Injection SDXL and SD 1.5 node for ComfyUI. Direct-to-block prompt injection, bypass "nightmare limb" layers, and improving AI video by prompting .weight and .bias layers directly. (video support coming soon)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%