energy-based-model / Compositional-Visual-Generation-with-Composable-Diffusion-Models-PyTorch

[ECCV 2022] Compositional Generation using Diffusion Models
https://energy-based-model.github.io/Compositional-Visual-Generation-with-Composable-Diffusion-Models/
Other
456 stars 41 forks source link

Error in colab #12

Closed deepinthewoods closed 2 years ago

deepinthewoods commented 2 years ago

Trying to run this on a Colab Pro account and I'm getting this error.

TypeError Traceback (most recent call last) in 6 7 with autocast('cpu' if not has_cuda else 'cuda'): ----> 8 image = pipe(prompt, scale=scale, num_inference_steps=steps)["sample"][0] 9 display(image)

1 frames /usr/local/lib/python3.7/dist-packages/composable_diffusion/pipeline_composable_stable_diffusion.py in call(self, prompt, height, width, num_inference_steps, guidance_scale, eta, generator, output_type, **kwargs) 160 image = self.vae.decode(latents) 161 --> 162 image = (image / 2 + 0.5).clamp(0, 1) 163 image = image.cpu().permute(0, 2, 3, 1).numpy() 164

TypeError: unsupported operand type(s) for /: 'DecoderOutput' and 'int'

nanlliu commented 2 years ago

thanks for the heads up! I think diffuser library changed the class architecture a bit. I just updated it. Feel free to reopen it if you still encounter the same issue.