🎮

instruct-pix2pix

FNI 8.8
by timbrooks gradio

"--- title: InstructPix2Pix sdk: gradio sdk_version: 3.16.2 app_file: edit_app.py pinned: true --- PyTorch implementation of InstructPix2Pix, an instruction-based image editing model, based on the original CompVis/stable_diffusion repo. InstructPix2Pix: Learning to Follow Image Editing Instructions ..."

Best Scenarios

Interactive UI Demo

Technical Constraints

Generic Use
gradio SDK
CPU Config
Running Status
1.5K Likes

🕸️ Neural Graph Explorer

v15.13

Graph Overview

263 Entities
273 Connections
Explore Full Graph →

📈 Interest Trend

--

* Real-time activity index across HuggingFace, GitHub and Research citations.

🔬Deep Dive

Expand Details [+]

🛠️ Technical Profile

Hardware & Scale

SDK
gradio
Hardware
V100
Status
Running

🌐 Cloud & Rights

Source
huggingface
License
Open Access

🎮 Demo Preview

Interact with caution. Content generated by third-party code.

💻 Usage

pip install gradio
git clone https://huggingface.co/spaces/timbrooks/instruct-pix2pix

Space Overview

InstructPix2Pix: Learning to Follow Image Editing Instructions

Project Page | Paper | Data

PyTorch implementation of InstructPix2Pix, an instruction-based image editing model, based on the original CompVis/stable_diffusion repo.

InstructPix2Pix: Learning to Follow Image Editing Instructions Tim Brooks\*, Aleksander Holynski\*, Alexei A. Efros
UC Berkeley
\*denotes equal contribution

TL;DR: quickstart

Set up a conda environment, and download a pretrained model:

code
conda env create -f environment.yaml
conda activate ip2p
bash scripts/download_checkpoints.sh

Edit a single image:

code
python edit_cli.py --input imgs/example.jpg --output imgs/output.jpg --edit "turn him into a cyborg"

<h1 class="text-2xl font-bold mt-8 mb-4 text-gray-900 dark:text-white">Optionally, you can specify parameters to tune your result:</h1> <h1 class="text-2xl font-bold mt-8 mb-4 text-gray-900 dark:text-white">python edit_cli.py --steps 100 --resolution 512 --seed 1371 --cfg-text 7.5 --cfg-image 1.2 --input imgs/example.jpg --output imgs/output.jpg --edit "turn him into a cyborg"</h1>

Or launch your own interactive editing Gradio app:

code
python edit_app.py
!Edit app

_(For advice on how to get the best results by tuning parameters, see the Tips section)._

Setup

Install all dependencies with:

code
conda env create -f environment.yaml

Download the pretrained models by running:

code
bash scripts/download_checkpoints.sh

Generated Dataset

Our image editing model is trained on a generated dataset consisting of 454,445 examples. Ea

13,657 characters total