.

Inference
	
Now you can load the fine-tuned model for inference by passing the model path or model name on the Hub to the StableDiffusionPipeline:


Pytorch

Hide Pytorch content



	Copied
from diffusers import StableDiffusionPipeline

model_path = "path_to_saved_model"
pipe = StableDiffusionPipeline.from_pretrained(model_path, torch_dtype=torch.float16)
pipe.to("cuda")

image = pipe(prompt="yoda").images[0]
image.save("yoda-pokemon.png")

