instruct_pix2pix / README.md
yingzhac's picture
Update README.md
6c21b6b verified

A newer version of the Gradio SDK is available: 5.44.1

Upgrade
metadata
title: instruct_pix2pix
emoji: 🖼
colorFrom: purple
colorTo: red
sdk: gradio
sdk_version: 5.25.2
app_file: app.py
pinned: false
license: mit
short_description: instruct_pix2pix

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

InstructPix2Pix Application

This application allows you to edit images using natural language instructions powered by the InstructPix2Pix model.

Setup

  1. Install the required dependencies:
pip install -r requirements.txt
  1. Run the application:
python app.py

Usage

  1. Upload an image or use one of the examples
  2. Enter an instruction for how you want to edit the image (e.g., "Make it look like winter", "Turn the sky into a sunset")
  3. Click "Run" to generate the edited image
  4. Adjust settings in the "Advanced Settings" section for more control:
    • Image guidance scale: Controls how closely the output follows the input image structure
    • Guidance scale: Controls how closely the output follows your text instruction
    • Number of inference steps: Higher values provide better quality but take longer

Examples of Instructions

  • "Turn the sky into a sunset"
  • "Make it look like winter"
  • "Turn him into a cyborg"
  • "Make it look like a painting"
  • "Add rain to the scene"
  • "Make it look like night time"

Technical Details

This app uses the timbrooks/instruct-pix2pix model from Hugging Face with the Diffusers library. The model was designed to edit images based on natural language instructions.