gojasper / flash-diffusion

Official implementation of ⚡ Flash Diffusion ⚡: Accelerating Any Conditional Diffusion Model for Few Steps Image Generation
https://gojasper.github.io/flash-diffusion-project/
Other
397 stars 26 forks source link

Inference from local fine-tuned checkpoints #13

Open Thedatababbler opened 3 weeks ago

Thedatababbler commented 3 weeks ago

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 commented 3 weeks ago

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