# How to resume training from checkpoint

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-resume-training-from-checkpoint%2F81164%3E%5C
**Category:** Models\
**Created:** [April 11, 2024, 1:17am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-resume-training-from-checkpoint%2F81164 "2024-04-11T01:17:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ULZIITOGTOKH](https://avatars.discourse-cdn.com/v4/letter/u/d26b3c/32.png) [@ULZIITOGTOKH](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FULZIITOGTOKH)%5C
**Post date:** [April 11, 2024, 1:17am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-resume-training-from-checkpoint%2F81164%2F1 "2024-04-11T01:17:13Z")

</div>

i want to resume training unconditional image generation from latest checkpoint. But after loaded checkpoints, doesn’t continue training. Here is my code and output:

!accelerate launch --multi\_gpu train\_unconditional.py  
–dataset\_name=“-------”  
–resolution=64 --center\_crop --random\_flip  
–output\_dir=“--------”  
–train\_batch\_size=16  
–num\_epochs=1000  
–gradient\_accumulation\_steps=1  
–use\_ema  
–learning\_rate=1e-4  
–lr\_warmup\_steps=500  
–mixed\_precision=no  
–push\_to\_hub  
–resume\_from\_checkpoint=“checkpoint-4000”

Output:  
Resuming from checkpoint checkpoint-4000  
04/08/2024 08:51:40 - INFO - accelerate.accelerator - Loading states from checkpoint-4000  
The config attributes {‘decay’: 0.9999, ‘inv\_gamma’: 1.0, ‘min\_decay’: 0.0, ‘optimization\_step’: 4000, ‘power’: 0.75, ‘update\_after\_step’: 0, ‘use\_ema\_warmup’: True} were passed to UNet2DModel, but are not expected and will be ignored. Please verify your config.json configuration file.  
04/08/2024 08:51:41 - INFO - accelerate.checkpointing - All model weights loaded successfully  
04/08/2024 08:51:42 - INFO - accelerate.checkpointing - All optimizer states loaded successfully  
04/08/2024 08:51:42 - INFO - accelerate.checkpointing - All scheduler states loaded successfully  
04/08/2024 08:51:42 - INFO - accelerate.checkpointing - All dataloader sampler states loaded successfully  
04/08/2024 08:51:42 - INFO - accelerate.checkpointing - All random states loaded successfully  
04/08/2024 08:51:42 - INFO - accelerate.accelerator - Loading in 0 custom states

```auto
                             this is output and stopped running

```

Help me pls ))
