Skip to content

Commit 0c2125c

Browse files
test: remove dedicated logging regressions
1 parent 93add35 commit 0c2125c

3 files changed

Lines changed: 0 additions & 101 deletions

File tree

tests/models/autoencoders/test_models_vq.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
import logging
17-
18-
import numpy as np
1916
import pytest
2017
import torch
2118

2219
from diffusers import VQModel
23-
from diffusers.models.autoencoders.vae import VectorQuantizer
2420
from diffusers.utils.torch_utils import randn_tensor
2521

2622
from ...testing_utils import backend_manual_seed, enable_full_determinism, torch_device
@@ -68,19 +64,6 @@ def get_dummy_inputs(self) -> dict:
6864

6965

7066
class TestVQModel(VQModelTesterConfig, ModelTesterMixin):
71-
def test_vector_quantizer_logs_remap_configuration(self, caplog, capsys, tmp_path):
72-
remap_path = tmp_path / "used.npy"
73-
np.save(remap_path, np.array([0, 2, 4], dtype=np.int64))
74-
75-
logger_name = "diffusers.models.autoencoders.vae"
76-
with caplog.at_level(logging.INFO, logger=logger_name):
77-
VectorQuantizer(n_e=8, vq_embed_dim=4, beta=0.25, remap=str(remap_path), unknown_index="extra")
78-
79-
assert [(record.name, record.levelno, record.getMessage()) for record in caplog.records] == [
80-
(logger_name, logging.INFO, "Remapping 8 indices to 4 indices. Using 3 for unknown indices.")
81-
]
82-
assert capsys.readouterr().out == ""
83-
8467
@pytest.mark.skipif(
8568
torch_device not in ["cuda", "xpu"],
8669
reason="float16 and bfloat16 can only be use for inference with an accelerator",

tests/pipelines/longcat_image/test_prepare_pos_ids.py

Lines changed: 0 additions & 54 deletions
This file was deleted.

tests/pipelines/wan/test_wan_animate.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import logging
16-
1715
import pytest
1816
import torch
1917
from PIL import Image
@@ -151,34 +149,6 @@ def get_dummy_inputs(self):
151149

152150

153151
class TestWanAnimatePipeline(WanAnimatePipelineTesterConfig, PipelineTesterMixin):
154-
def test_prepare_prev_segment_cond_latents_logs_interpolation_warning(self, caplog, capsys):
155-
pipe = self.get_pipeline()
156-
prev_segment_cond_video = torch.zeros((1, 3, 1, 8, 8), dtype=torch.float32)
157-
caplog.clear()
158-
159-
logger_name = "diffusers.pipelines.wan.pipeline_wan_animate"
160-
with caplog.at_level(logging.WARNING, logger=logger_name):
161-
pipe.prepare_prev_segment_cond_latents(
162-
prev_segment_cond_video=prev_segment_cond_video,
163-
batch_size=1,
164-
segment_frame_length=5,
165-
height=16,
166-
width=16,
167-
prev_segment_cond_frames=1,
168-
task="animate",
169-
dtype=torch.float32,
170-
device=torch.device("cpu"),
171-
)
172-
173-
assert [(record.name, record.levelno, record.getMessage()) for record in caplog.records] == [
174-
(
175-
logger_name,
176-
logging.WARNING,
177-
"Interpolating prev segment cond video from (8, 8) to (16, 16)",
178-
)
179-
]
180-
assert capsys.readouterr().out == ""
181-
182152
def test_inference(self):
183153
# Basic inference in animation mode. Run on CPU.
184154
pipe = self.get_pipeline()

0 commit comments

Comments
 (0)