# Workflow for lowerimg a checkpoint from civitai

**URL:** <https://discuss.pytorch.org/t/workflow-for-lowerimg-a-checkpoint-from-civitai/223538>\
**Category:** ExecuTorch\
**Created:** [October 9, 2025, 3:05am UTC](https://discuss.pytorch.org/t/workflow-for-lowerimg-a-checkpoint-from-civitai/223538 "2025-10-09T03:05:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdumke](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jdumke/32/78315_2.png) [@jdumke](https://discuss.pytorch.org/u/jdumke)\
**Post date:** [October 9, 2025, 3:05am UTC](https://discuss.pytorch.org/t/workflow-for-lowerimg-a-checkpoint-from-civitai/223538/1 "2025-10-09T03:05:17Z")

</div>

Hello all,

I’m going fully bananas by reading tons of documentation [1, 2] and many more.

The point of struggle is extracting the state\_dict from the safetensors file with the checkpoint.

I can load the data from the file in many variants, but none of these leads a step further and let me extract the desired parts.

Could somebody give me a description of a typical workflow?

Greets,

Jonathan

* * *

[1] [Tranformers Executorch preexporter](https://huggingface.co/docs/transformers/executorch)

[2] [Executorch docs](https://docs.pytorch.org/executorch/stable/index.html)

---

<div class="post-metadata">

**Author:** ![lucylq](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/lucylq/32/65270_2.png) [@lucylq](https://discuss.pytorch.org/u/lucylq)\
**Post date:** [November 10, 2025, 7:24pm UTC](https://discuss.pytorch.org/t/workflow-for-lowerimg-a-checkpoint-from-civitai/223538/2 "2025-11-10T19:24:33Z")

</div>

Hi Jonathan, thanks for trying out executorch!

Could you help me understand what you’re trying to do? Are you trying to export a model to executorch, with weights in a safetensors file?

---

<div class="post-metadata">

**Author:** ![lucylq](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/lucylq/32/65270_2.png) [@lucylq](https://discuss.pytorch.org/u/lucylq)\
**Post date:** [November 10, 2025, 7:30pm UTC](https://discuss.pytorch.org/t/workflow-for-lowerimg-a-checkpoint-from-civitai/223538/3 "2025-11-10T19:30:19Z")

</div>

I guess a typical workflow is:

1. Take an eager model (nn.Module, or model from Huggingface)
2. Export it using torch.export.export
3. Lower it to edge dialect (to\_edge), and potentially lower to a hardware backend for performance (to\_backend)
4. Serialize it to executorch (to\_executorch) and save.  
This will create the model artifact.

Then, we can run the model in pybindings, or build the C++ runtime and run it there.
