--- # For reference on model card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1 # Doc / guide: https://huggingface.co/docs/hub/model-cards {} --- # Model Card for Model ID copy/paste/save as inference.py ``` from diffusers import DiffusionPipeline import argparse # Parse command line arguments parser = argparse.ArgumentParser(description='Generate an image using a Hugging Face diffusion model') parser.add_argument('--model', type=str, default="uisikdag/ddpm-few-shot-art-painting", help='Hugging Face model name/path') parser.add_argument('--steps', type=int, default=500, help='Number of inference steps') args = parser.parse_args() # Load the model generator = DiffusionPipeline.from_pretrained(args.model).to("cuda") # Generate image image = generator(num_inference_steps=args.steps).images[0] # Save the image with model name in the filename output_filename = f"output_{args.model.split('/')[-1]}.png" image.save(output_filename) print(f"Image saved as {output_filename}") ``` python inference.py