Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions generative/inferers/inferer.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ def __call__(

diffuse = diffusion_model
if isinstance(diffusion_model, SPADEDiffusionModelUNet):
diffuse = partial(diffusion_model, seg = seg)
diffuse = partial(diffusion_model, seg=seg)

prediction = diffuse(
x=noisy_image,
Expand Down Expand Up @@ -746,7 +746,7 @@ def get_likelihood(

diffuse = diffusion_model
if isinstance(diffusion_model, SPADEDiffusionModelUNet):
diffuse = partial(diffusion_model, seg = seg)
diffuse = partial(diffusion_model, seg=seg)

if mode == "concat":
noisy_image = torch.cat([noisy_image, conditioning], dim=1)
Expand Down Expand Up @@ -832,6 +832,7 @@ def get_likelihood(
else:
return total_kl


class ControlNetLatentDiffusionInferer(ControlNetDiffusionInferer):
"""
ControlNetLatentDiffusionInferer takes a stage 1 model (VQVAE or AutoencoderKL), diffusion model, controlnet,
Expand Down Expand Up @@ -1085,6 +1086,7 @@ def get_likelihood(
outputs = (outputs[0], intermediates)
return outputs


class VQVAETransformerInferer(Inferer):
"""
Class to perform inference with a VQVAE + Transformer model.
Expand Down
Loading