Skip to content

Commit 60ac6c6

Browse files
committed
removed comments from conversion script
1 parent 8cd7dbe commit 60ac6c6

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/maxdiffusion/checkpointing/checkpointing_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,11 @@ def load_state_if_possible(
213213
max_logging.log(f"restoring from this run's directory latest step {latest_step}")
214214
try:
215215
if not enable_single_replica_ckpt_restoring:
216-
# item = {checkpoint_item: orbax.checkpoint.args.PyTreeRestore(item=abstract_unboxed_pre_state)}
217-
# return checkpoint_manager.restore(latest_step, args=orbax.checkpoint.args.Composite(**item)) #currently changed to this
218216
if checkpoint_item == " ":
219217
return checkpoint_manager.restore(latest_step, args=ocp.args.StandardRestore(abstract_unboxed_pre_state))
220218
else:
221219
item = {checkpoint_item: orbax.checkpoint.args.PyTreeRestore(item=abstract_unboxed_pre_state)}
222-
return checkpoint_manager.restore(latest_step, args=orbax.checkpoint.args.Composite(**item)) #currently changed to this
220+
return checkpoint_manager.restore(latest_step, args=orbax.checkpoint.args.Composite(**item))
223221

224222
def map_to_pspec(data):
225223
pspec = data.sharding.spec

src/maxdiffusion/generate_ltx_video.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def run(config):
5050

5151

5252
transformer = Transformer3DModel(**model_config, dtype=jnp.float32, gradient_checkpointing="matmul_without_batch", sharding_mesh=mesh)
53-
transformer_param_shapes = transformer.init_weights(in_channels, model_config['caption_channels'], eval_only = True) #use this to test!
53+
transformer_param_shapes = transformer.init_weights(in_channels, model_config['caption_channels'], eval_only = True)
5454

5555
weights_init_fn = functools.partial(
5656
transformer.init_weights,

src/maxdiffusion/max_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,6 @@ def setup_initial_state(
402402
config.enable_single_replica_ckpt_restoring,
403403
)
404404
if state:
405-
###!Edited
406405
if checkpoint_item == " ":
407406
state = state
408407
else:

0 commit comments

Comments
 (0)