stable-diffusion icon indicating copy to clipboard operation
stable-diffusion copied to clipboard

how to retrain a image-condition model?

Open pokameng opened this issue 2 years ago • 2 comments

@justinpinkney hello,bro Your work is great!!! Can you tell me how to train the image-condition model on custdom dataset? I don't find the Training was done using a [modified version of the original Stable Diffusion training code](https://huggingface.co/lambdalabs/sd-image-variations-diffusers/blob/main/(https://github.com/justinpinkney/stable-diffusion). Something is empty.

Can you reload this code? Thanks!!!

pokameng avatar Dec 17 '22 14:12 pokameng

@justinpinkney

pokameng avatar Feb 04 '23 10:02 pokameng

@pokameng I solve this issue: from io import BytesIO from PIL import Image def pre_process(examples): processed = {} processed[image_key] = [Image.open(BytesIO(tform(im['bytes']))) for im in examples[image_column]] processed[caption_key] = examples[text_column] return processed

GuangTingZheng avatar Dec 06 '23 18:12 GuangTingZheng