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.
File size: 2,659 Bytes
fed9a9a
6a0ca7a
fed9a9a
6a0ca7a
 
 
fed9a9a
 
 
 
 
 
6a0ca7a
 
fed9a9a
6a0ca7a
fed9a9a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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}`