Spaces:
Running
on
L4
Running
on
L4
Update MagicQuill/brushnet_nodes.py
Browse files
MagicQuill/brushnet_nodes.py
CHANGED
|
@@ -969,6 +969,13 @@ def add_brushnet_patch(model, brushnet, torch_dtype, conditioning_latents,
|
|
| 969 |
prompt_embeds, negative_prompt_embeds,
|
| 970 |
pooled_prompt_embeds, negative_pooled_prompt_embeds, time_ids,
|
| 971 |
debug):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 972 |
|
| 973 |
is_SDXL = isinstance(model.model.model_config, comfy.supported_models.SDXL)
|
| 974 |
|
|
|
|
| 969 |
prompt_embeds, negative_prompt_embeds,
|
| 970 |
pooled_prompt_embeds, negative_pooled_prompt_embeds, time_ids,
|
| 971 |
debug):
|
| 972 |
+
|
| 973 |
+
if model.model.model_config.custom_operations is None:
|
| 974 |
+
fp8 = model.model.model_config.optimizations.get("fp8", model.model.model_config.scaled_fp8 is not None)
|
| 975 |
+
operations = comfy.ops.pick_operations(model.model.model_config.unet_config.get("dtype", None), model.model.manual_cast_dtype,
|
| 976 |
+
fp8_optimizations=fp8, scaled_fp8=model.model.model_config.scaled_fp8)
|
| 977 |
+
else:
|
| 978 |
+
operations = model.model.model_config.custom_operations
|
| 979 |
|
| 980 |
is_SDXL = isinstance(model.model.model_config, comfy.supported_models.SDXL)
|
| 981 |
|