Instructions to use Flo444/example-lora-realistic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Flo444/example-lora-realistic with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("Flo444/example-lora-realistic") prompt = "Beautiful realistic landscape, mountains, river" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
File size: 648 Bytes
1cfa1c4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | from diffusers import StableDiffusionPipeline
import torch
import PIL
from IPython.display import display
# Load the base model
pipe = StableDiffusionPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5", # base model
torch_dtype=torch.float16,
).to("cuda")
# Load your LoRA
pipe.load_lora_weights("Flo444/example-lora-realistic")
# Fuse LoRA (optional: set strength 0.7 or whatever you want)
pipe.fuse_lora(lora_scale=0.7)
# Prompt
prompt = "beautiful realistic landscape, mountains, river"
# Generate
image = pipe(prompt, num_inference_steps=30, guidance_scale=7).images[0]
# Display the image directly in Colab
display(image) |