--- title: Ckpt2safetensors emoji: 🚀 colorFrom: red colorTo: blue sdk: gradio sdk_version: 5.9.0 app_file: app.py pinned: true license: mit short_description: Checkpoint to Safetensors convertor. --- # CKPT to Safetensors Converter This is a simple Gradio app that allows users to convert .ckpt (checkpoint) files to the safetensors format. It provides an easy-to-use web interface for uploading .ckpt files and converting them with a single click. ## Features - Web-based interface for easy file uploading - Converts .ckpt files to safetensors format - Handles state dictionaries stored directly or under a "state_dict" key - Provides feedback on successful conversion or errors ## Requirements - Python 3.7+ - Gradio - PyTorch - Safetensors ## Installation 1. Clone this repository: ```bash git clone https://github.com/yourusername/ckpt-to-safetensors-converter.git cd ckpt-to-safetensors-converter ``` 2. Install the required dependencies: ```bash pip install -r requirements.txt ``` ## Usage 1. Run the Gradio app: ```bash python app.py ``` 2. Open your web browser and go to the URL displayed in the terminal (usually `http://127.0.0.1:7860`). 3. Upload a .ckpt file using the file upload component. 4. The app will process the file and convert it to the safetensors format. 5. Once complete, you'll see a success message with the name of the output file, or an error message if the conversion failed. ## Contributing Contributions are welcome! Please feel free to submit a Pull Request. ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. --- Feel free to customize any part of this README as needed, including updating the repository URL and adding more specific instructions or details about your project! Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference