- Collect and Preprocess Images: Gather the 20 images of the specific mural style. Ensure they are high-quality and resize them to a consistent resolution (e.g., 512x512 pixels) to match the input size required for Stable Diffusion models.
Automatic1111 WebUI: This is the most user-friendly option to set up and train LoRA models, especially if you are using SD Turbo based on the SD 1.5 architecture.
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
pip install -r requirements.txt
Launch the WebUI using the appropriate script (webui-user.bat
for Windows or webui.sh
for Linux).
Ensure the SD Turbo model is downloaded. This model is optimized for faster inference and training while maintaining compatibility with SD 1.5-based LoRAs. Place the model in the models/Stable-diffusion
directory within the WebUI installation.
Open the Automatic1111 WebUI in your web browser. Navigate to the DreamBooth or LoRA tab, depending on how it is named in your interface.
"houston mural style"
to label your training dataset."mural art"
to provide context.5e-6
.Click the "Train" button to start the training process. Monitor the training progress through the WebUI interface. Watch for overfitting by observing loss values; if the model converges too quickly or loss decreases too slowly, consider adjusting learning rates or increasing training steps.
Once training is complete, save the best-performing checkpoint from the training session. Load the trained LoRA model into the SD Turbo environment within the WebUI.
In the WebUI, select the SD Turbo model as your base. Apply the trained LoRA to the SD Turbo model to stylize outputs based on the mural style you trained on.
In TouchDesigner, set up your pipeline to feed video frames as input into the SD Turbo model with the applied LoRA. Ensure your inputs are configured as texture inputs (2D arrays of pixels) and that your system is optimized for real-time processing.
Adjust resolution, frame rate, and other settings in TouchDesigner to balance between performance and output quality. Use a high-performance GPU like the NVIDIA RTX 4090 to achieve the best real-time results.
Experiment with different prompts and inputs to see how the LoRA model performs with various styles and scenes. Fine-tune the model further if necessary, based on the initial results and feedback.
Use video editing software like Adobe Premiere or DaVinci Resolve to enhance and speed up the outputs as needed.
By using SD Turbo with the SD 1.5 architecture, you can effectively train and deploy a LoRA model for your specific use case. This approach allows you to leverage the performance optimizations of SD Turbo while maintaining compatibility with SD 1.5-based models and LoRAs, making it ideal for real-time stylization tasks in applications like TouchDesigner.