huggingface / huggingface/diffusers
Support for training with Grayscale images?
- Vorherrschende Sprache
- Python
- Sterne
- 34.5k
- Forks
- 7.3k
- Ø Merge
- 3 T. 3 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
I am trying to train an unconditional diffusion model on grayscale images using your [pipeline](https://huggingface.co/docs/diffusers/training/unconditional_training). When running training with the default parameters I discovered inferred images that contained colour (specifically green). Where it learnt such colours from I do not know but I would predict the issue lies within the initial processing of the image set:
`images = [augmentations(image.convert("RGB")) for image in examples["image"]]`
as such I created a fork of this [repo ](https://github.com/DavidGill159/diffusers/tree/main/examples/unconditional_image_generation)and changed this line to:
`images = [augmentations(image.convert("L")) for image in examples["image"]]`
I also updated the model configuration (UNet2DModel) to work with single-channel inputs and outputs by setting `in_channels=1` and `out_channels=1` when initialising the model.
Am I on the right track? or does the resolution lie elsewhere? I also noticed the resolution of the inferred images is very poor; not on par with the training set. What parameters can I adjust to improve this?
**Ultimately I am interested in a diffusion model that focuses more on the textural composition of images, rather than the colou**r.
Beitragsleitfaden
Rechercherichtung
Start with the examples/unconditional_image_generation training entry point and the linked unconditional training documentation. Check how image conversion and UNet2DModel channel settings affect grayscale training and generated outputs. Done should include a clear supported approach for single-channel images and guidance for the reported poor resolution.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python, pytorch
- Bereich
- computer-vision, machine-learning
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100