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

Inference from local fine-tuned checkpoints

Open Thedatababbler opened this issue 1 year ago • 3 comments

Hi, Thank you for your brilliant work and beautiful code. I found most of your tutorial scripts and codes to be quite self-explanatory, but I do not find code samples how to load fine-tuned checkpoints to do inference. I've trained my own model use the pytorch training trainer with lora, as you showed in your examples. However, since I'm not quite familiar with the diffuser and peft modules, I have trouble load the the checkpoints I trade. Currently, I just set up the model as I did in the training script and load every parameter from the ckpt file, but I feel that might not be the best practice. Would you mind to provide some sample code for inferencing from loading local ckpt file? Thank you!

Thedatababbler avatar Jun 27 '24 21:06 Thedatababbler

Plus, I use the .sample function from the flash_diffusion_model to do inference. However, with this method, all of my generated images are like following: image

Thedatababbler avatar Jun 27 '24 21:06 Thedatababbler

+1

daqingliu avatar Sep 27 '24 02:09 daqingliu

Hi, Thank you for your brilliant work and beautiful code. I found most of your tutorial scripts and codes to be quite self-explanatory, but I do not find code samples how to load fine-tuned checkpoints to do inference. I've trained my own model use the pytorch training trainer with lora, as you showed in your examples. However, since I'm not quite familiar with the diffuser and peft modules, I have trouble load the the checkpoints I trade. Currently, I just set up the model as I did in the training script and load every parameter from the ckpt file, but I feel that might not be the best practice. Would you mind to provide some sample code for inferencing from loading local ckpt file? Thank you!

I have met the same problem. Have you solved it?

solitaryTian avatar Feb 10 '25 06:02 solitaryTian