Home

Awesome

ComfyUI_fabric

ComfyUI nodes based on the paper "FABRIC: Personalizing Diffusion Models with Iterative Feedback" (Feedback via Attention-Based Reference Image Conditioning)

Paper: https://arxiv.org/abs/2307.10159

Main Repo: https://github.com/sd-fabric/fabric

SD Web UI Extension: https://github.com/dvruette/sd-webui-fabric

Installation

This has been tested for ComfyUI for the following commit: f21bb41787ce590ea6eff16163ee83404d9ff0d5

Navigate to ComfyUI/custom_nodes/ and run the following command:

git clone https://github.com/ssitu/ComfyUI_fabric

Usage

Nodes can be found in the node menu under FABRIC/:

NodeDescription
FABRIC Patch ModelPatch a model to use FABRIC so you can use it in any sampler node.
FABRIC Patch Model (Advanced)Same as the basic model patcher but with the null_pos and null_neg inputs instead of a clip input.
KSampler FABRICHas the same inputs as a KSampler but with full FABRIC inputs.
KSampler FABRIC (Advanced)Has the same inputs as an Advanced KSampler but with full FABRIC inputs.
KSampler FABRIC (Simple)Same inputs of a KSampler with the simplified (intended) FABRIC inputs.
Batch LatentsHelper node for adding two latents together in a batch. Useful for using multiple positive/negative latents in FABRIC.

Parameters' Descriptions

ParameterDescription
pos_latentsOptional input for latents that you want the resulting latent to borrow characteristics from (e.g. "liked" images).
neg_latentsOptional input for latents that you want the resulting latent to avoid characteristics of (e.g. "disliked" images).
pos_weightThe weight of the positive latents.
neg_weightThe weight of the negative latents.
null_posThe conditioning for computing the hidden states of the positive latents. Intended to just be an empty clip text embedding (output from an empty clip text encode), but it might be interesting to experiment with.
null_negSame as null_pos but for negative latents.
feedback_startThe step to start applying feedback.
feedback_endThe step to stop applying feedback.
feedback_percentThe percentage of steps to apply feedback (e.g. if set to 0.8, the first 80% of the steps will have feedback)

Tips

Examples

Round by round feedback: image

FABRIC patch model: image