# ControlNet "resume from checkpoint"

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcontrolnet-resume-from-checkpoint%2F97371%3E%5C
**Category:** Models\
**Created:** [July 15, 2024, 7:56am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcontrolnet-resume-from-checkpoint%2F97371 "2024-07-15T07:56:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GKYagami](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@GKYagami](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FGKYagami)%5C
**Post date:** [July 15, 2024, 7:56am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcontrolnet-resume-from-checkpoint%2F97371%2F1 "2024-07-15T07:56:10Z")

</div>

Hi,

I am trying to load [lllyasviel/sd-controlnet-canny · Hugging Face](https://huggingface.co/lllyasviel/sd-controlnet-canny) as a checkpoint for [train\_controlnet.py](https://github.com/huggingface/diffusers/blob/main/examples/controlnet/train_controlnet.py)

But I don’t have the required files (scheduler.bin, optimizer.bin, random\_states\_0.pkl)  
I tried putting these files from a checkpoint of my own but I get the following error

```auto
Resuming from checkpoint controlnet
07/15/2024 04:51:30 - INFO - accelerate.accelerator - Loading states from train_controlnet_test_custom_dataset/controlnet
07/15/2024 04:51:33 - INFO - accelerate.checkpointing - All model weights loaded successfully
07/15/2024 04:51:38 - INFO - accelerate.checkpointing - All optimizer states loaded successfully
07/15/2024 04:51:38 - INFO - accelerate.checkpointing - All scheduler states loaded successfully
07/15/2024 04:51:38 - INFO - accelerate.checkpointing - All dataloader sampler states loaded successfully
07/15/2024 04:51:38 - INFO - accelerate.checkpointing - Could not load random states
Traceback (most recent call last):
  File "/content/drive/MyDrive/train_controlnet.py", line 1187, in <module>
    main(args)
  File "/content/drive/MyDrive/train_controlnet.py", line 1018, in main
    accelerator.load_state(os.path.join(args.output_dir, path))
  File "/usr/local/lib/python3.10/dist-packages/accelerate/accelerator.py", line 3147, in load_state
    self.step = override_attributes["step"]
KeyError: 'step'

```

Please Help
