This repository is for creating your own Tungsten model with a stable diffusion checkpoint.
Using this template, you can create a Stable Diffusion model in tungsten including followings:
- Basic functionalities in automatic1111/stable-diffusion-webui (e.g. prompt syntax)
- ControlNet - reference only, openpose & depth
- LoRA
- Textual inversion
- Default prompt and negative prompt
- Install Docker Desktop for Windows
- Download
tungsten-sd.zip
from v0.1.1 and extract its contents - Run
update.bat
- Put your SD files into following directories
- 1 Checkpoint:
tungsten-sd/models/Stable-diffusion
- LoRAs (optional):
tungsten-sd/models/Lora
- embeddings (optional):
tungsten-sd/embeddings
- VAEs (optional):
tungsten-sd/models/VAE
- 1 Checkpoint:
- Run
build_and_push.bat
and enter the responses (e.g. username and password at tungsten.run).
- Stable diffusion weights
- Python 3.7+
- Docker
git clone --recursive https://github.com/tungsten-ai/tungsten-sd.git
cd tungsten-sd
First, install Tungstenkit:
pip install tungstenkit
Put your Stable Diffusion model weights to models/Stable-diffusion
.
If you want to have your own LoRA and VAE, refer to advanced configuration.
tungsten build . -n tungsten-stable-diffusion
Go to tungsten.run and create a project.
Log in to Tungsten:
tungsten login
Add tag of the model:
# Example: tungsten tag tungsten-stable-diffusion myproject:v1
tungsten tag tungsten-stable-diffusion <YOUR_PROJECT_NAME>:<YOUR_MODEL_VERSION>
Then, push the model to the project:
tungsten push <YOUR_PROJECT_NAME>
Visit tungsten.run and go to the project page.
Refer to this page: https://tungsten-ai.github.io/docs/running_models/using_gpus/
tungsten demo tungsten-stable-diffusion
- Put your LoRA model weights to
models/Lora
. - Modify
StableDiffusion.get_loras
function intungsten_model.py
to adjust the lora magnitude.
Put your VAE model weights to models/VAE
.
- Put your embedding files to
embeddings
. - Customize prompt (see Prompt customization)
Modify following functions in tungsten_model.py
:
StableDiffusion.get_trigger_words
- Add trigger words at the start of the prompt.StableDiffusion.get_extra_prompt_chunks
- Add extra prompt chunks at the end of the prompt.StableDiffusion.get_extra_negative_prompt_chunks
- Add extra negative prompt chunks at the end of the negative prompt.