diff --git a/__init__.py b/__init__.py index ef5d143..1aa35c4 100644 --- a/__init__.py +++ b/__init__.py @@ -1,10 +1,11 @@ from .brushnet_nodes import BrushNetLoader, BrushNet, BlendInpaint, PowerPaintCLIPLoader, PowerPaint, CutForInpaint from .raunet_nodes import RAUNet + """ @author: nullquant @title: BrushNet @nickname: BrushName nodes -@description: This repository contains an custom nodes for inpaint using BrushNet and PowerPaint models +@description: These are custom nodes for ComfyUI native implementation of BrushNet, PowerPaint and RAUNet models """ # A dictionary that contains all nodes you want to export with their names diff --git a/model_patch.py b/model_patch.py index 8dde60d..5103bd2 100644 --- a/model_patch.py +++ b/model_patch.py @@ -1,4 +1,3 @@ -import math import torch import comfy @@ -35,7 +34,7 @@ def patch_model_function_wrapper(model, forward_patch): all_sigmas = mp['all_sigmas'] sigma = to['sigmas'][0].item() - total_steps = all_sigmas.shape[0] + total_steps = all_sigmas.shape[0] - 1 step = torch.argmin((all_sigmas - sigma).abs()).item() mp['step'] = step @@ -103,6 +102,10 @@ def modified_sample(model, noise, positive, negative, cfg, device, sampler, sigm to = add_model_patch_option(model) to['model_patch']['all_sigmas'] = sigmas # + #sigma_start = model.get_model_object("model_sampling").percent_to_sigma(start_at) + #sigma_end = model.get_model_object("model_sampling").percent_to_sigma(end_at) + # + # #if math.isclose(cfg, 1.0) and model_options.get("disable_cfg1_optimization", False) == False: # to['model_patch']['free_guidance'] = False #else: