Zeqiang-Lai / OpenDMD

Open source implementation and models of One-step Diffusion with Distribution Matching Distillation
GNU General Public License v2.0
109 stars 10 forks source link

To run the gradio demo successfully, you should…… #4

Open ChangeFWorld opened 5 months ago

ChangeFWorld commented 5 months ago

The origin gradio_dmd.py has bug 🐛 and can not run. To get it launched, replace some code with below snippets.


parser = argparse.ArgumentParser()
# parser.add_argument("--unet-path", type='Lykon/dreamshaper-8')
# parser.add_argument("--model-path", type='aaronb/dreamshaper-8-dmd-1kstep')
args = parser.parse_args()

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

unet = UNet2DConditionModel.from_pretrained('aaronb/dreamshaper-8-dmd-1kstep')
pipe = DiffusionPipeline.from_pretrained('lykon/dreamshaper-8', unet = unet, safety_checker=None)