Skip to content

Commit

Permalink
Merge pull request #8 from duskfallcrew/Ver0.4
Browse files Browse the repository at this point in the history
Ver0.4
  • Loading branch information
duskfallcrew authored Dec 28, 2024
2 parents b714773 + 0ad3218 commit a4d0033
Show file tree
Hide file tree
Showing 11 changed files with 339 additions and 297 deletions.
104 changes: 60 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,78 +1,94 @@
# **Hugging Face Hub Uploader Plugin for Automatic1111**
# Hugging Face Backup Extension for Stable Diffusion WebUI

Welcome to our peculiar plugin repository! This project is a unique extension of our Jupyter notebook editions, curated by a diverse DID system with a passion for experimentation. We affectionately call it "opinionated," reflecting our unconventional approach.
Welcome to our unique extension, designed to help you easily back up your valuable Stable Diffusion WebUI files to the Hugging Face Hub! This project is brought to you by the Duskfall Portal Crew, a diverse DID system passionate about creativity and AI.

<img width="1283" alt="Screenshot 2024-11-10 at 15 02 44" src="https://github.com/user-attachments/assets/79c32865-cf54-4a7b-aa9d-32e971210926">

## About This Extension

This extension provides a simple way to back up your Stable Diffusion WebUI models, embeddings, and other important files to a repository on the Hugging Face Hub. We prioritize ease of use and reliability, helping you safeguard your valuable work.

## **About this Plugin**
## Key Features

This plugin enables seamless uploading of checkpoint files from Automatic1111 to the Hugging Face Hub, a popular platform for machine learning model sharing and collaboration. Our primary goal is to facilitate quick and easy uploads, while prioritizing simplicity and accessibility.
* **Easy Backup:** Back up your model files, VAEs, embeddings, and LoRAs directly from your Stable Diffusion WebUI.
* **Hugging Face Integration:** Seamlessly upload your files to your Hugging Face Hub repository.
* **Automatic Backup (Manual Start):** Backups are performed automatically in the background, after you manually start them using the UI.
* **Granular Status Updates:** Clear progress information provided during the backup process.
* **Credential Store:** The extension uses the git credential store for secure authentication, and you can opt-out by using an environment variable.

## **Features**
## Getting Started

* Upload checkpoint files from Automatic1111 to the Hugging Face Hub
* Supports multiple file uploads and batch processing
* Automatically generates a PR on the Hugging Face Hub for easy model sharing and collaboration
1. **Install:** Install this extension by placing it in the `extensions` folder of your Stable Diffusion WebUI.
2. **Configure:**
* In the Stable Diffusion WebUI settings, go to the `Hugging Face` section and set your write access token.
* In the extension's UI tab, configure your Hugging Face username, repository name, paths to back up, and the SD Webui folder.
3. **Start Backup:** Click the "Start Backup" button to begin backing up your files.

## **Getting Started**
## Requirements

1. Install the plugin by following the instructions in the Automatic1111 plugin repository.
2. Configure your Hugging Face Hub credentials and repository settings.
3. Select the checkpoint files you want to upload and click the "Upload to Hugging Face Hub" button.
* Stable Diffusion WebUI (Automatic1111)
* Hugging Face Hub account and a write access token.
* Python 3.7 or later.

## **Requirements**
## How it Works

* Automatic1111 - At this stage we're not sure which version this works with but we're testing it as we go.
* Hugging Face Hub account and credentials - Instructions will come soon on this.
* Python 3.7 or later
1. **Configuration:** When you start the extension, it will load the required settings.
2. **Cloning or Creation:** The extension will clone the provided Hugging Face repository, or create it if it doesn't exist.
3. **Copy Files:** The files in the specified paths will be copied to the cloned repository.
4. **Pushing:** The changes will be pushed to your repository in the Hugging Face Hub.
5. **Scheduled backups** By default, backups are done when the user triggers them, and then after a specified interval, you can configure that interval by modifying the `BACKUP_INTERVAL` constant in your `hfbackup_script.py` file, or by implementing a scheduler.

## **License**
## Settings

This plugin is licensed under the MIT License.
### Hugging Face Settings
* **Hugging Face Write API Key:** Required to upload to your Hugging Face Repository.
* **Use Git Credential Store:** By default the extension will try to use your system's git credentials, but you can disable this behavior by turning this toggle off, and use the environment variable `HF_TOKEN` to provide the token.

## **Acknowledgments**
### Extension settings
* **Huggingface Token**: Your Huggingface token.
* **Huggingface Username:** Your Huggingface username or organization name.
* **SD Webui Path:** The folder where Stable Diffusion Webui is installed.
* **Backup Paths:** The paths to your models, embeddings, etc. that you wish to back up (one path per line), it must be relative to the root folder where Stable Diffusion is installed.

This plugin builds upon the work of the Automatic1111 community and the Hugging Face Hub team. We appreciate their efforts in creating a robust and scalable platform for machine learning model sharing and collaboration.
## License

## **Support**
This extension is licensed under the MIT License.

If you encounter any issues or have questions about this plugin, please open an issue in the Automatic1111 plugin repository or reach out to the developer directly.
## Acknowledgments

## **Issues**
This extension is built with the help of the Automatic1111 and Hugging Face communities. We are grateful for their efforts in creating such amazing and useful projects.

Currently there is no "BACK END" settings file, so right now it auto just yeets the write API key to the tab.
## Support

Currently struggling with something, it is currently not liking me but it's at least showing up for once.
If you encounter any issues or have questions about this extension, please open an issue in our GitHub repository.

## **Changelog**
## Known Issues

* Initial release: [Insert date]
* Pre Alpha: June 8 2024 - "NOT OFFICIALLY A RELEASE"
* November 1 - 2024: Rejigged the code via Claude, will test asap and add feature logs.
* November 10 - Tested it on A111, it's SEMI working -- I just uhhh need to poke at it more? - Right now i'ts doing the WHOLE folder rather than allowing to select, so i'll be fixing that next.
* No "BACK END" settings file: Settings are saved in the script and are loaded directly by A1111.
* Currently, the backup occurs only when the user clicks the "Start Backup" button, and then on a timer, until the extension stops.

## Changelog

* **Initial release:** *June 8 2024*
* **Pre Alpha:** *June 8 2024* - "NOT OFFICIALLY A RELEASE"
* **Rejig:** *November 1 2024* - Rejigged the code via Claude, will test asap and add feature logs.
* **Semi Working:** *November 10 2024* - Tested it on A1111, it's SEMI working

## About & Links

### About Us

We are the Duskfall Portal Crew, a DID system with over 300 alters, navigating life with DID, ADHD, Autism, and CPTSD. We believe in AI’s potential to break down barriers and enhance mental health, despite its challenges. Join us on our creative journey exploring identity and expression.
We are the Duskfall Portal Crew, a DID system with over 300 alters, navigating life with DID, ADHD, Autism, and CPTSD. We believe in AI’s potential to break down barriers and enhance mental health.

#### Join Our Community

Website: [End Media](https://end-media.org/) WEBSITE UNDER CONSTRUCTION LOOKING FOR SPONSORS

Discord: [Join our Discord](https://discord.gg/5t2kYxt7An)

Backups: [Hugging Face](https://huggingface.co/EarthnDusk)

Support Us: [Send a Pizza](https://ko-fi.com/duskfallcrew/)

Coffee: [BuyMeSomeMochas!](https://www.buymeacoffee.com/duskfallxcrew)

Patreon: [Our Barely Used Patreon](https://www.patreon.com/earthndusk)
* **Website:** [End Media](https://end-media.org/) (WEBSITE UNDER CONSTRUCTION)
* **Discord:** [Join our Discord](https://discord.gg/5t2kYxt7An)
* **Hugging Face:** [Hugging Face](https://huggingface.co/EarthnDusk)
* **Support Us:** [Send a Pizza](https://ko-fi.com/duskfallcrew/)
* **Coffee:** [BuyMeSomeMochas!](https://www.buymeacoffee.com/duskfallxcrew)
* **Patreon:** [Our Barely Used Patreon](https://www.patreon.com/earthndusk)

Community Groups:
#### Community Groups

Subreddit: [Reddit](https://www.reddit.com/r/earthndusk/)
* **Subreddit:** [Reddit](https://www.reddit.com/r/earthndusk/)
32 changes: 0 additions & 32 deletions index.js

This file was deleted.

10 changes: 4 additions & 6 deletions install.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import launch

if not launch.is_installed("huggingface_hub"):
launch.run_pip("install huggingface_hub==4.30.2", "requirements for Hugging Face Hub Uploader")

if not launch.is_installed("glob2"):
launch.run_pip("install glob2", "requirements for Hugging Face Hub Uploader")
if not launch.is_installed("apscheduler"):
launch.run_pip("install apscheduler", "requirements for Hugging Face Backup")

launch.run_pip("install -r requirements.txt")
if not launch.is_installed("huggingface_hub"):
launch.run_pip("install huggingface_hub", "requirements for Hugging Face Backup")
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
huggingface_hub==4.30.2
glob2
huggingface_hub
apscheduler
110 changes: 0 additions & 110 deletions scripts/hfbackup.py

This file was deleted.

Loading

0 comments on commit a4d0033

Please sign in to comment.