Skip to content

Commit 970b2a8

Browse files
chore: fix import path
1 parent 26b21ae commit 970b2a8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: tests/backend/patches/lora_conversions/test_flux_diffusers_lora_conversion_utils.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import unittest.mock
21
import pytest
32
import torch
4-
import unittest
3+
from unittest import mock
54

65

76
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():
140139
adaLN_layer_key = 'final_layer.adaLN_modulation.1'
141140
prefixed_layer_key = FLUX_LORA_TRANSFORMER_PREFIX + adaLN_layer_key
142141

143-
with unittest.mock.patch(
142+
with mock.patch(
144143
'invokeai.backend.patches.lora_conversions.flux_diffusers_lora_conversion_utils.approximate_flux_adaLN_lora_layer_from_diffusers_state_dict'
145144
) as mock_approximate_func:
146145
model = lora_model_from_flux_diffusers_state_dict(state_dict, alpha=8.0)

0 commit comments

Comments
 (0)