--- 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](https://github.com/timothybrooks/instruct-pix2pix) model. ## Setup 1. Install the required dependencies: ```bash pip install -r requirements.txt ``` 2. Run the application: ```bash 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](https://huggingface.co/timbrooks/instruct-pix2pix) model from Hugging Face with the Diffusers library. The model was designed to edit images based on natural language instructions.