--- license: mit --- # SDv1.5 Patterns1K LoRA Usage Guide ## Introduction `SDv1.5 Patterns1K LoRA` is a fine-tuned model based on Stable Diffusion v1.5, specifically optimized for generating patterns from the Patterns-1K dataset. Using LoRA (Low-Rank Adaptation) technology, the model has been adapted to produce higher-quality patterns relevant to the dataset. ## Usage Instructions ### 1. Download Stable Diffusion v1.5 Weights Before you begin, ensure you have downloaded the pre-trained weights for Stable Diffusion v1.5. You can download the weights from the [official Stable Diffusion repository](https://huggingface.co/runwayml/stable-diffusion-v1-5). ### 2. Prepare LoRA Weights We have trained LoRA weights for the Patterns-1K dataset. You can download the trained LoRA weights from the following links: - LoRA weights after 1 epoch: [1epoch_lora.safetensors](link) - LoRA weights after 100 epochs: [100epoch_lora.safetensors](link) ### 3. Test the Model After downloading the weights, you can use the `test_lora.py` script to test the model's performance. Follow these steps: #### Install Dependencies Ensure you have the following Python libraries installed: ```bash pip install diffusers transformers torch ``` ### 4. Run the Test Script To test the model with the LoRA weights trained for 1 epoch: ```bash python test_lora.py ``` The param `lcm_speedup` decide use lcm speed up or not. #### View the Results The generated images will be saved to the specified paths: Results after 1 epoch: `1epoch_test_results.png` Results after 100 epochs: `100epoch_test_results.png` Here are the example results: - ![1 epoch test results](1epoch_test_results.png)