Instructions to use peter-sushko/RealEdit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use peter-sushko/RealEdit 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("peter-sushko/RealEdit", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" 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] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files13 unmodified lines1415161718192035 unmodified lines5657585960616212 unmodified lines757677787980813 unmodified lines8586878889909113 unmodified lines**There are 2 ways to run inference: either via Diffusers or original InstructPix2Pix pipeline.****Option 1: With 🧨Diffusers:**Install diffusers, transformers library:35 unmodified lines```**Option 2: via InstructPix2Pix pipeline:**Clone the repository and set up the directory structure:12 unmodified linesReturn to the repo root and follow the [InstructPix2Pix installation guide](https://github.com/timothybrooks/instruct-pix2pix) to set up the environment.### Edit a single image```bashpython edit_cli.py \3 unmodified lines--ckpt checkpoints/realedit_model.ckpt```### Launch the Gradio interface```bashpython edit_app.py --ckpt checkpoints/realedit_model.ckpt13 unmodified lines1415161718192035 unmodified lines5657585960616212 unmodified lines757677787980813 unmodified lines8586878889909113 unmodified lines**There are 2 ways to run inference: either via Diffusers or original InstructPix2Pix pipeline.**## Option 1: With 🧨Diffusers:Install diffusers, transformers library:35 unmodified lines```## Option 2: via InstructPix2Pix pipeline:Clone the repository and set up the directory structure:12 unmodified linesReturn to the repo root and follow the [InstructPix2Pix installation guide](https://github.com/timothybrooks/instruct-pix2pix) to set up the environment.Edit a single image```bashpython edit_cli.py \3 unmodified lines--ckpt checkpoints/realedit_model.ckpt```Launch the Gradio interface```bashpython edit_app.py --ckpt checkpoints/realedit_model.ckpt
README.md+4-4