Run this model with HF Jobs
Run RISHIKAMASHETTY/diffusion-models on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/RISHIKAMASHETTY/diffusion-models. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/RISHIKAMASHETTY/diffusion-models on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use RISHIKAMASHETTY/diffusion-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use RISHIKAMASHETTY/diffusion-models with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("RISHIKAMASHETTY/diffusion-models", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
|
Download sd-1.5/README.md from RISHIKAMASHETTY/diffusion-models: direct link, hf CLI and curl.
- Browser
- Download file 2.66 kB
-
https://huggingface.co/RISHIKAMASHETTY/diffusion-models/resolve/main/sd-1.5/README.md
- Command line
-
hf download hf://RISHIKAMASHETTY/diffusion-models/sd-1.5/README.md
-
curl -L -o README.md https://huggingface.co/RISHIKAMASHETTY/diffusion-models/resolve/main/sd-1.5/README.md
2.66 kB
| # SD-1.5-Inpainting LoRA - damaged Indian painting restoration | |
| Pipeline: damaged image -> YOLOv8s-seg damage mask (dilated 9px) -> `stable-diffusion-v1-5/stable-diffusion-inpainting` + LoRA -> composite (pixels outside the mask are kept). | |
| | Folder | Contents | | |
| |---|---| | |
| | `lora/` | final LoRA weights (`pytorch_lora_weights.safetensors`) - `pipe.load_lora_weights(...)` | | |
| | `checkpoints/` | intermediate LoRA checkpoints: none saved for this run | | |
| | `merged_model/` | LoRA-fused full pipeline (fp16), loads with `StableDiffusionInpaintPipeline.from_pretrained` | | |
| | `data/` | `train.csv`, `val.csv`, `split_manifest.csv`, `split_info.json`, `mask_pred/` (YOLOv8s masks), `segmented/` (mask overlays), `train|val/{damaged,mask_gt,original}/` | | |
| | `yolo/` | YOLOv8s mask quality vs GT masks | | |
| | `results/` | training log + loss curve, `*_full_val_*` metrics (all val images), FID/KID, grids, qualitative samples | | |
| | `config.json` | hyper-parameters and library versions | | |
| Source data: `RISHIKAMASHETTY/indian-paintings-synthetic-damage`. Split grouped by base painting: 4095 train / 455 val. All damage is synthetic. | |
| ## Full validation metrics (455 val images, 512px; baseline = unrestored damaged image) | |
| | method | psnr_mean | psnr_std | ssim_mean | ssim_std | lpips_mean | lpips_std | psnr_masked_mean | psnr_masked_std | mae_masked_mean | mae_masked_std | n_images | | |
| |:-----------------|------------:|-----------:|------------:|-----------:|-------------:|------------:|-------------------:|------------------:|------------------:|-----------------:|-----------:| | |
| | baseline_damaged | inf | nan | 0.9553 | 0.0577 | 0.062 | 0.0698 | 11.944 | 17.2929 | 76.5548 | 24.8945 | 455 | | |
| | sd15_gt_mask | inf | nan | 0.9567 | 0.0589 | 0.0233 | 0.0369 | 17.8767 | 16.177 | 31.9562 | 17.3033 | 455 | | |
| | sd15_yolo_mask | inf | nan | 0.9568 | 0.0594 | 0.0253 | 0.0404 | 17.6851 | 16.7258 | 33.2313 | 17.3045 | 455 | | |
| ## FID / KID vs original paintings | |
| | method | fid | kid_mean | kid_std | | |
| |:-----------------|--------:|-----------:|----------:| | |
| | baseline_damaged | 24.0088 | -0.0007 | 0.0024 | | |
| | sd15_yolo_mask | 8.2129 | -0.0013 | 0.0029 | | |
| | sd15_gt_mask | 7.5614 | -0.0016 | 0.0027 | | |
| Training config: `{"LORA_RANK": 16, "LR": 0.0001, "BS": 2, "ACCUM": 4, "MAX_STEPS": 2000, "P_GT_MASK": 0.3, "MASK_W": 2.0, "CONF": 0.15, "DILATE": 9}` | |