Skip to content

Instantly share code, notes, and snippets.

@8bitnand
Created November 9, 2023 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 8bitnand/fea25507ffb5d0ab72d9590c0e7d5a15 to your computer and use it in GitHub Desktop.
Save 8bitnand/fea25507ffb5d0ab72d9590c0e7d5a15 to your computer and use it in GitHub Desktop.
unconditional image generation part 1 : Generate images from pipeline
def generate(pretrained_pipe_dir):
pipeline = DDPMPipeline.from_pretrained(pretrained_pipe_dir).to("cuda")
images = pipeline(
batch_size=1,
generator=torch.manual_seed(123),
).images
return images
generate("path/to/saved/pipeline")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment