generation.py¶

Source: LION/reconstructors/diffusion/padis/generation.py

Unconditional image-generation routines for PaDIS.

class LION.reconstructors.diffusion.padis.generation.PaDISGeneration[source]¶

Bases: object

Generate images with either the assembled prior or independent patches.

generate_sample(params, *, channels, height, width, device, dtype, generator)[source]¶

Generate one image using the assembled PaDIS score.

Parameters:
  • channels (int)

  • height (int)

  • width (int)

  • device (device)

  • dtype (dtype)

  • generator (Generator | None)

Return type:

Tensor

generate_naive_patch_sample(params, *, channels, height, width, device, dtype, generator)[source]¶

Generate and stitch one partition of independently sampled patches.

Parameters:
  • channels (int)

  • height (int)

  • width (int)

  • device (device)

  • dtype (dtype)

  • generator (Generator | None)

Return type:

Tensor