huggingface / huggingface/diffusers
Support for training with Grayscale images?
- Lingua principale
- Python
- Stelle
- 34.5k
- Fork
- 7.3k
- Merge medio
- 3g 3h
- PR unite (30g)
- 91
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, pytorch
- Ambito
- computer-vision, machine-learning
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100