--- base_model: stable-diffusion-v1-5/stable-diffusion-v1-5 library_name: diffusers license: creativeml-openrail-m inference: true tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image - diffusers - diffusers-training - lora - album-covers - rock - metal --- # SD 1.5 LoRA — Rock & Metal album-cover style (trigger: `rocov`) LoRA adapter for [`stable-diffusion-v1-5/stable-diffusion-v1-5`](https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5), fine-tuned on [`kramp/album-covers-rock-metal-blip`](https://huggingface.co/datasets/kramp/album-covers-rock-metal-blip): 6,000 album covers from [`eong/20k-Album-Covers-within-20-Genres`](https://huggingface.co/datasets/eong/20k-Album-Covers-within-20-Genres) filtered to the DeathMetal, DoomMetal, HeavyMetal, PsychedelicRock, Punk and Rock classes, captioned with BLIP (`Salesforce/blip-image-captioning-large`) and prefixed with the trigger phrase. ## Usage ```python import torch from diffusers import StableDiffusionPipeline pipe = StableDiffusionPipeline.from_pretrained( "stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch.float16 ).to("cuda") pipe.load_lora_weights("kramp/sd15-lora-album-covers-rock") image = pipe( "rocov, album cover art, a chrome skull on a black background", num_inference_steps=30, guidance_scale=7.0, ).images[0] image.save("cover.png") ``` Prefix prompts with `rocov, album cover art,` to activate the style; without the `rocov` trigger the pipeline behaves like base SD 1.5. ## Training details - Script: diffusers [`examples/text_to_image/train_text_to_image_lora.py`](https://github.com/huggingface/diffusers/blob/v0.40.0/examples/text_to_image/train_text_to_image_lora.py) (v0.40.0, run verbatim) - LoRA rank 16 (alpha = 16), target modules `to_k/to_q/to_v/to_out.0` on the UNet - lr 1e-4 (constant), resolution 512, fp16, gradient checkpointing, seed 42 - batch 8 × gradient accumulation 2, **2,000 optimizer steps ≈ 5.3 epochs** - Final training loss ≈ 0.18; loss curve on the [training dashboard](https://huggingface.co/spaces/kramp/sd15-lora-album-covers-rock-trackio) - Source covers are 300×300 upsampled to 512 — expect some softness at output edges ## Validation images (generated during training) ![img_0](./image_0.png) ![img_1](./image_1.png) ![img_2](./image_2.png) ![img_3](./image_3.png) ## Held-out samples ![chrome skull](./samples/sample_chrome_skull.png) ![psychedelic liquid](./samples/sample_psychedelic_liquid.png) ![punk collage](./samples/sample_punk_collage.png) ![gothic cathedral](./samples/sample_gothic_cathedral.png) ![desert highway](./samples/sample_desert_highway.png) ![wolf in flames](./samples/sample_wolf_flames.png) ## Limitations & bias - Trained only on covers from the 6 rock/metal classes — outputs drift toward dark metal/punk aesthetics even for neutral prompts. - BLIP captions are generic scene descriptions; any text/logo on real covers is not learned and will not be legible at 512px. - SD 1.5's safety checker occasionally flags dark metal-style outputs and returns a black image — if that happens, retry with a different seed.