fastsdcpu / src /backend /upscale /aura_sr_upscale.py
Rodneyontherock1067's picture
Upload folder using huggingface_hub
87c5489 verified
raw
history blame contribute delete
275 Bytes
from backend.upscale.aura_sr import AuraSR
from PIL import Image
def upscale_aura_sr(image_path: str):
aura_sr = AuraSR.from_pretrained("fal/AuraSR-v2", device="cpu")
image_in = Image.open(image_path) # .resize((256, 256))
return aura_sr.upscale_4x(image_in)