Diffusers
TensorBoard
controlnet
stable-diffusion
medical-imaging
retinal-imaging
diabetic-retinopathy
counterfactual
Instructions to use KylianSu/vessel-bezier-retinal-weights with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use KylianSu/vessel-bezier-retinal-weights with Diffusers:
pip install -U diffusers transformers accelerate
from diffusers import ControlNetModel, StableDiffusionControlNetPipeline controlnet = ControlNetModel.from_pretrained("KylianSu/vessel-bezier-retinal-weights") pipe = StableDiffusionControlNetPipeline.from_pretrained( "fill-in-base-model", controlnet=controlnet ) - Notebooks
- Google Colab
- Kaggle
File size: 4,157 Bytes
fa59996 | 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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | ---
license: other
tags:
- diffusers
- controlnet
- stable-diffusion
- medical-imaging
- retinal-imaging
- diabetic-retinopathy
- counterfactual
---
# ST — Weights & Training Logs
Companion HuggingFace repo for the private GitHub source repo
[`KylianSu/vessel-bezier-retinal`](https://github.com/KylianSu/vessel-bezier-retinal).
This repo holds all weights, training logs, and reviewer-facing artifacts for
the NeurIPS 2026 submission on Bezier-conditioned ControlNet + parameter-level
counterfactual verification of vessel geometry → diabetic retinopathy (DR).
## Layout
```
weights/
sd21_lora_fundus_v2/ <- Paper-final LoRA (noise_offset=0.1, rank=64)
pytorch_lora_weights.safetensors 51 MB
sd21_lora_fundus_v1/ <- Earlier LoRA, kept for comparison
pytorch_lora_weights.safetensors 51 MB
controlnet_g3_bezier_v3/ <- Paper-final G3 (Bezier-hint) ControlNet
best_controlnet.pth 78 MB
train.log + hint_preview_epoch*.png
controlnet_g2_encoder_v2/ <- Paper-final G2 (z_spatial-hint) ControlNet
best_controlnet.pth 78 MB
train.log
controlnet_g3_bezier_v1_legacy/ <- Earlier G3 versions (logs + previews only;
controlnet_g3_bezier_v2_legacy/ weights already pruned during 2026-04-23 cleanup)
clip_finetune/ <- BiomedCLIP two-stage finetune (Stage 2 final)
20260326_041223/best_model.pth 748 MB
train.log + history.json + config.json
vessel_encoder_v2/ <- VesselEncoderV2 (z_tok / z_spatial producer)
20260407_201552/best_encoder_v2.pth 382 MB
train.log + history.json + config.json
cls_binary_leakfree/ <- Downstream DR classifiers (leak-free baselines)
baseline/best_model.pth 30 MB (EfficientNet-B2 @ 384)
baseline_resnet50/best_model.pth 90 MB (ResNet-50 @ 384)
baseline_vitb16/best_model.pth 329 MB (ViT-B/16 @ 384, low DR sensitivity)
augmented_g{2,3}_{400,4k}[_10pct]/ Prompt-bug-era synth augmentation (retained for comparison)
cls_binary_leakfree_pfix/ <- Prompt-fixed augmentation (paper §5.3 main table)
aug_g{2,3}_{400,4k}[_10pct]_pfix/ 8 variants, 30 MB each
experiment_E/ <- Track 4 DR-prompt main experiment
hints/ + gen/ hints + generated images for every start x config
stage{1,2,3}*.csv + stems.json + causal_curves*.png
experiment_E_uncond/ <- Track 4 Uncond (paper's strongest Delta = +0.781 cohort)
hints/ + gen/ + CSV + top-5 champion visualization
```
## How to download
```bash
# Whole repo (~2.8 GB)
hf download KylianSu/vessel-bezier-retinal-weights --repo-type model --local-dir ./hf_weights
# Or a single subtree
hf download KylianSu/vessel-bezier-retinal-weights --include "weights/sd21_lora_fundus_v2/*" --local-dir ./hf_weights
```
## How the code expects the files
After download, copy (or symlink) the relevant folders back under the code
repo's `train_logs/`, `cls_binary_leakfree/`, `cls_binary_leakfree_pfix/`,
`experiment_E/`, `experiment_E_uncond/`:
```bash
rsync -a hf_weights/weights/sd21_lora_fundus_v2/ $ST_BASE/train_logs/sd21_lora_fundus_v2/
rsync -a hf_weights/weights/controlnet_g3_bezier_v3/ $ST_BASE/train_logs/diffusion_sd21/20260415_140655_group3_bezier_v3/
# ... etc, matching paths referenced in scripts/*.sh
```
See the source repo's `HANDOFF_MANIFEST.md` §3 for the full reproducibility
recipe.
## Other artifacts you still need (not in this repo)
- **Stable Diffusion 2.1 base** (24 GB): https://huggingface.co/stabilityai/stable-diffusion-2-1-base
- **BiomedCLIP pretrained** (753 MB): https://huggingface.co/microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224
- **EyePACS + APTOS + Messidor dataset** (38 GB): Kaggle — see HANDOFF §2 for the bundle the authors used.
## License
TBD — please contact the project owner (see GitHub repo) before any external
redistribution.
|