Views
No views yet
1# Example code for loading the model and generating an image
2from diffusers import StableDiffusionPipeline
3
4model_id = "runwayml/stable-diffusion-v1-5" # Replace with your model ID
5pipeline = StableDiffusionPipeline.from_pretrained(model_id)
6
7prompt = "A photo of a cat wearing a hat in a field of sunflowers"
8image = pipeline(prompt, num_inference_steps=100) # Adjust num_inference_steps as needed
9image.save("generated_art.png")