We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26b21ae commit 970b2a8Copy full SHA for 970b2a8
tests/backend/patches/lora_conversions/test_flux_diffusers_lora_conversion_utils.py
@@ -1,7 +1,6 @@
1
-import unittest.mock
2
import pytest
3
import torch
4
-import unittest
+from unittest import mock
5
6
7
from invokeai.backend.patches.layers.utils import swap_shift_scale_for_linear_weight
@@ -140,7 +139,7 @@ def test_adaLN_should_be_approximated_if_present_while_converting():
140
139
adaLN_layer_key = 'final_layer.adaLN_modulation.1'
141
prefixed_layer_key = FLUX_LORA_TRANSFORMER_PREFIX + adaLN_layer_key
142
143
- with unittest.mock.patch(
+ with mock.patch(
144
'invokeai.backend.patches.lora_conversions.flux_diffusers_lora_conversion_utils.approximate_flux_adaLN_lora_layer_from_diffusers_state_dict'
145
) as mock_approximate_func:
146
model = lora_model_from_flux_diffusers_state_dict(state_dict, alpha=8.0)
0 commit comments