diff --git a/brushnet_nodes.py b/brushnet_nodes.py index e8bc9f1..4e83b7f 100644 --- a/brushnet_nodes.py +++ b/brushnet_nodes.py @@ -937,9 +937,13 @@ def add_brushnet_patch(model, brushnet, torch_dtype, conditioning_latents, is_SDXL = isinstance(model.model.model_config, comfy.supported_models.SDXL) - fp8 = model.model.model_config.optimizations.get("fp8", model.model.model_config.scaled_fp8 is not None) - operations = comfy.ops.pick_operations(model.model.model_config.unet_config.get("dtype", None), model.model.manual_cast_dtype, - fp8_optimizations=fp8, scaled_fp8=model.model.model_config.scaled_fp8) + if model.model.model_config.custom_operations is None: + fp8 = model.model.model_config.optimizations.get("fp8", model.model.model_config.scaled_fp8 is not None) + operations = comfy.ops.pick_operations(model.model.model_config.unet_config.get("dtype", None), model.model.manual_cast_dtype, + fp8_optimizations=fp8, scaled_fp8=model.model.model_config.scaled_fp8) + else: + # such as gguf + operations = model.model.model_config.custom_operations if is_SDXL: input_blocks = [[0, operations.Conv2d],