Text-to-Image
Diffusers
TensorBoard
Safetensors
StableDiffusionPipeline
stable-diffusion
stable-diffusion-diffusers
textual_inversion
Instructions to use hcarrion/keloid with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use hcarrion/keloid with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1-base", dtype=torch.bfloat16, device_map="cuda") pipe.load_textual_inversion("hcarrion/keloid") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
|
Download README.md from hcarrion/keloid: direct link, hf CLI and curl.
- Browser
- Download file 2.68 kB
-
https://huggingface.co/hcarrion/keloid/resolve/main/README.md
- Command line
-
hf download hf://hcarrion/keloid/README.md
-
curl -L -o README.md https://huggingface.co/hcarrion/keloid/resolve/main/README.md
2.68 kB
| base_model: stabilityai/stable-diffusion-2-1-base | |
| license: creativeml-openrail-m | |
| library_name: diffusers | |
| pipeline_tag: text-to-image | |
| tags: | |
| - stable-diffusion | |
| - stable-diffusion-diffusers | |
| - textual_inversion | |
| inference: true | |
| # cgDDI: Keloid Textual Inversion Model | |
| This repository contains the textual inversion adaptation weights for `stabilityai/stable-diffusion-2-1-base` representing the **keloid** disease concept. | |
| It is part of the **cgDDI** (Controllable Generation of Diverse Dermatological Imagery) framework introduced in the paper [Controllable Generation of Diverse Dermatological Imagery for Fair and Efficient Malignancy Classification](https://huggingface.co/papers/2607.12987) (MICCAI 2026). | |
| ## Model Description | |
| cgDDI is a hybrid framework designed to address the systematic lack of expertly annotated dermatological images across diverse skin tones and rare diseases. This model learns the specific concept of **keloid** through textual inversion and fine-tuning, allowing the generation of diverse, realistic, and skin-tone-controlled synthetic samples. | |
| - **Disease Category:** Keloid | |
| - **Trigger Token/Concept:** `<keloid-class>` | |
| - **Base Model:** `stabilityai/stable-diffusion-2-1-base` | |
| ## cgDDI Framework Overview | |
| <p align="center"> | |
| <img src="https://raw.githubusercontent.com/hectorcarrion/ControllableGenDDI/main/assets/cgddi_framework_colors_2.png" width="900" alt="cgDDI framework: healthy synthetics, lesion-mapped synthetics, semantic synthetics, and fair classification"> | |
| </p> | |
| 1. **Healthy Synthetics:** Synthesizes realistic healthy skin samples without disturbing other input properties. | |
| 2. **Lesion Mapping:** Maps single-sample rare lesions onto novel skin-tones and locations non-parametrically. | |
| 3. **Semantic Synthetics:** Allows for efficient parametric generation of targeted dermatological conditions using textual inversion and LoRA. | |
| ## Resources | |
| - **Paper:** [Controllable Generation of Diverse Dermatological Imagery for Fair and Efficient Malignancy Classification](https://huggingface.co/papers/2607.12987) | |
| - **Code:** [GitHub Repository](https://github.com/hectorcarrion/ControllableGenDDI) | |
| - **Dataset:** [Hugging Face Dataset](https://huggingface.co/datasets/hcarrion/ControllableGenDDI) | |
| ## Citation | |
| ```bibtex | |
| @inproceedings{carrion2026cgddi, | |
| title = {Controllable Generation of Diverse Dermatological Imagery for Fair and Efficient Malignancy Classification}, | |
| author = {Carri{\'o}n, H{\'e}ctor and Norouzi, Narges}, | |
| booktitle = {Medical Image Computing and Computer-Assisted Intervention (MICCAI)}, | |
| year = {2026}, | |
| publisher = {Springer}, | |
| series = {Lecture Notes in Computer Science} | |
| } | |
| ``` |