Skip to content

Commit fa1c23b

Browse files
committed
remove unused dependencies.
1 parent 064a3a7 commit fa1c23b

5 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/maxdiffusion/generate_flux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
"""
1616

17-
from typing import Any, Callable, Dict, List, Optional, Union, Sequence
17+
from typing import Callable, List, Union, Sequence
1818
from absl import app
1919
import functools
2020
import math

src/maxdiffusion/models/flux/transformers/transformer_flux_flax.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
from ...embeddings_flax import (FluxPosEmbed, CombinedTimestepGuidanceTextProjEmbeddings, CombinedTimestepTextProjEmbeddings)
2929
from .... import common_types
3030
from ....common_types import BlockSizes
31-
from .... import max_logging
3231
from ....utils import BaseOutput
33-
from dataclasses import dataclass
3432

3533
AxisNames = common_types.AxisNames
3634
BATCH = common_types.BATCH

src/maxdiffusion/models/flux/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def validate_flax_state_dict(expected_pytree: dict, new_pytree: dict):
127127
if key in new_pytree.keys():
128128
try:
129129
expected_pytree_shape = expected_pytree[key].shape
130-
except:
130+
except Exception:
131131
expected_pytree_shape = expected_pytree[key].value.shape
132132
if expected_pytree_shape != new_pytree[key].shape:
133133
max_logging.log(

src/maxdiffusion/tests/text_encoders_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import os
1818
import unittest
1919
import pytest
20-
import jax.numpy as jnp
2120
from absl.testing import absltest
2221

2322
from transformers import CLIPTokenizer, FlaxCLIPTextModel

src/maxdiffusion/tests/vae_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import jax
2525
import jax.numpy as jnp
2626
from maxdiffusion import FlaxAutoencoderKL
27-
from maxdiffusion.image_processor import VaeImageProcessor
2827
from skimage.metrics import structural_similarity as ssim
2928

3029
THIS_DIR = os.path.dirname(os.path.abspath(__file__))

0 commit comments

Comments
 (0)