Instructions to use prithivMLmods/Photo-Restore-i2i with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use prithivMLmods/Photo-Restore-i2i with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("prithivMLmods/Photo-Restore-i2i") prompt = "[photo content], restore and enhance the image by repairing any damage, scratches, or fading. Colorize the photo naturally while preserving authentic textures and details, maintaining a realistic and historically accurate look." input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
thank you for this great model.
#1
by Francisco2025 - opened
It’s simply amazing. I have used it for some family photos and they look great, like I have never seen them before. It’s so impressive, my family members can’t believe it was AI. Here are a few tips for others who want awesome results:
- Use the prompt exactly as it is.
- Resize your images to multiples of 32, either by adding white borders or cropping.
- Try different seeds. Once you find a good seed, you can use it for all other pictures.
Thank you!