Instructions to use Th4dd3us/sd14-oldbook-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Th4dd3us/sd14-oldbook-lora with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("Th4dd3us/sd14-oldbook-lora") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Stable Diffusion v1.4 · Old Book Illustrations LoRA
LoRA adapter for CompVis/stable-diffusion-v1-4,
fine-tuned on gigant/oldbookillustrations
to generate images in the style of 19th-century book engravings: ink outlines, line hatching and a sepia/monochrome palette.
Only the UNet attention layers were adapted; the VAE and the CLIP text encoder are unchanged.
Usage
import torch
from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained(
"CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16
).to("cuda")
pipe.load_lora_weights("Th4dd3us/sd14-oldbook-lora")
image = pipe("An old woman spinning wool by the fireplace").images[0]
No trigger word is needed: plain scene descriptions (like the dataset captions) work best.
A version with the LoRA already fused into the weights is available at
Th4dd3us/sd14-oldbook-fused.
Training
| Setting | Value |
|---|---|
| Training images | 500 (first 500 rows of the train split) |
| Image column / caption column | 1600px / info_alt |
| Preprocessing | resize shorter side to 512 → center crop 512×512 |
| LoRA rank / alpha | 16 / 16 |
| Target modules | to_q, to_k, to_v, to_out.0 (UNet) |
| Trainable parameters | 3,188,736 (0.37% of the UNet) |
| Optimizer / learning rate | AdamW / 1e-4 |
| Batch size / epochs | 3 / 5 (835 steps) |
| Precision | fp32 |
| Hardware | 1× NVIDIA T4 (Google Colab), ~55 min |
This adapter was selected from three runs (rank 8 vs 16, 500 vs 1500 images); rank 16 produced the most consistent engraving texture on the evaluation prompts.
Limitations
- Style transfer is strongest on figures and interiors; landscapes and seascapes keep more of the base model's painterly colour.
- Evaluation is qualitative (3 prompts, fixed seed), not a quantitative benchmark.
License
The adapter inherits the CreativeML OpenRAIL-M license of the base model.
The training data (gigant/oldbookillustrations) is licensed CC BY-NC 4.0, so use of this adapter should be limited to non-commercial purposes.
- Downloads last month
- 7
Model tree for Th4dd3us/sd14-oldbook-lora
Base model
CompVis/stable-diffusion-v1-4