Skip to content

Commit cfe2c64

Browse files
committed
fixed importing issue
1 parent c18c0c6 commit cfe2c64

5 files changed

Lines changed: 64 additions & 8 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2025 Lightricks Ltd.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://github.com/Lightricks/LTX-Video/blob/main/LICENSE
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# This implementation is based on the Torch version available at:
16+
# https://github.com/Lightricks/LTX-Video/tree/main

src/maxdiffusion/models/ltx_video/transformers_pytorch/embeddings.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright 2025 Lightricks Ltd.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://github.com/Lightricks/LTX-Video/blob/main/LICENSE
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# This implementation is based on the Torch version available at:
16+
# https://github.com/Lightricks/LTX-Video/tree/main
117
# Adapted from: https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/embeddings.py
218
import math
319

src/maxdiffusion/models/ltx_video/transformers_pytorch/symmetric_patchifier.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright 2025 Lightricks Ltd.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://github.com/Lightricks/LTX-Video/blob/main/LICENSE
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# This implementation is based on the Torch version available at:
16+
# https://github.com/Lightricks/LTX-Video/tree/main
117
from abc import ABC, abstractmethod
218
from typing import Tuple
319

src/maxdiffusion/models/ltx_video/transformers_pytorch/transformer3d.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright 2025 Lightricks Ltd.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://github.com/Lightricks/LTX-Video/blob/main/LICENSE
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# This implementation is based on the Torch version available at:
16+
# https://github.com/Lightricks/LTX-Video/tree/main
117
# Adapted from: https://github.com/huggingface/diffusers/blob/v0.26.3/src/diffusers/models/transformers/transformer_2d.py
218
import math
319
from dataclasses import dataclass

src/maxdiffusion/models/ltx_video/utils/convert_torch_weights_to_jax.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,6 @@ def main(args):
218218
"the model parameters and optimizer state. This can affect optimizer moments and may result in a spike in "
219219
"training loss when resuming from the converted checkpoint."
220220
)
221-
# print("Downloading files from GitHub...")
222-
# github_url = "https://raw.githubusercontent.com/Lightricks/LTX-Video/main/ltx_video/models/transformers/"
223-
# ltx_repo_path = "../"
224-
# target_folder = "transformers_pytorch"
225-
# files = ["attention.py", "embeddings.py", "symmetric_patchifier.py", "transformer3d.py"]
226-
# module_path = "maxdiffusion.models.ltx_video.transformers_pytorch.transformer3d"
227-
228-
# Transformer3DModel = download_and_move_files(github_url, ltx_repo_path, target_folder, files, module_path)
229221

230222
print("Loading safetensors, flush = True")
231223
weight_file = "ltxv-13b-0.9.7-dev.safetensors"

0 commit comments

Comments
 (0)