PnPInversion
[ICLR2024] Official repo for paper "PnP Inversion: Boosting Diffusion-based Editing with 3 Lines of Code"
File Explorer
- edict_requirements.txt
- instructdiffusion_requirements.txt
- masactrl_requirements.txt
- p2p_requirements.txt
- pix2pix_zero_requirements.txt
- pnp_requirements.txt
- evaluate.py
- matrics_calculator.py
- __init__.py
- diffusers_cli.py
- env.py
- __init__.py
- attention.py
- embeddings.py
- resnet.py
- unet_2d.py
- unet_2d_condition.py
- unet_blocks.py
- vae.py
- __init__.py
- pipeline_ddim.py
- __init__.py
- pipeline_ddpm.py
- __init__.py
- pipeline_latent_diffusion.py
- __init__.py
- pipeline_latent_diffusion_uncond.py
- __init__.py
- pipeline_pndm.py
- __init__.py
- pipeline_score_sde_ve.py
- __init__.py
- pipeline_stable_diffusion.py
- pipeline_stable_diffusion_img2img.py
- pipeline_stable_diffusion_inpaint.py
- pipeline_stable_diffusion_onnx.py
- safety_checker.py
- __init__.py
- pipeline_stochastic_karras_ve.py
- __init__.py
- __init__.py
- scheduling_ddim.py
- scheduling_ddpm.py
- scheduling_karras_ve.py
- scheduling_lms_discrete.py
- scheduling_pndm.py
- scheduling_sde_ve.py
- scheduling_sde_vp.py
- scheduling_utils.py
- __init__.py
- dummy_scipy_objects.py
- dummy_transformers_and_inflect_and_unidecode_objects.py
- dummy_transformers_and_onnx_objects.py
- dummy_transformers_objects.py
- import_utils.py
- logging.py
- model_card_template.md
- outputs.py
- __init__.py
- configuration_utils.py
- dependency_versions_check.py
- dependency_versions_table.py
- dynamic_modules_utils.py
- hub_utils.py
- modeling_utils.py
- onnx_utils.py
- optimization.py
- pipeline_utils.py
- testing_utils.py
- training_utils.py
- edict_functions.py
- inversion_utils.py
- ptp_classes.py
- ptp_utils.py
- seq_aligner.py
- instruct_diffusion.yaml
- edit_zip_dataset.py
- lowlevel_clwd.py
- lowlevel_gopro.py
- lowlevel_reds.py
- lowlevel_sidd.py
- pose.py
- color_list_train_small.txt
- prompt_deblur.txt
- prompt_denoise.txt
- prompt_dewatermark.txt
- prompt_pose.txt
- prompt_seg.txt
- coco_stuff.py
- grefcoco.py
- grefcoco_segmentation.py
- refcoco.py
- refcoco_segmentation.py
- zip_manager.py
- README.md
- animals.png
- mirrorcat.jpg
- people.jpg
- teaser.png
- watermark.png
- convert_ckpt.py
- download_pretrained_sd.sh
- inference_example.sh
- run_multinode.sh
- mountains-1.png
- mountains-2.png
- mountains-3.png
- sketch-mountains-input.jpg
- upscaling-in.png.REMOVED.git-id
- upscaling-out.png.REMOVED.git-id
- 000002025.png
- 000002035.png
- merged-0005.png.REMOVED.git-id
- merged-0006.png.REMOVED.git-id
- merged-0007.png.REMOVED.git-id
- a-painting-of-a-fire.png
- a-photograph-of-a-fire.png
- a-shirt-with-a-fire-printed-on-it.png
- a-shirt-with-the-inscription-'fire'.png
- a-watercolor-painting-of-a-fire.png
- birdhouse.png
- fire.png
- inpainting.png
- modelfigure.png
- rdm-preview.jpg
- reconstruction1.png
- reconstruction2.png
- results.gif.REMOVED.git-id
- rick.jpeg
- the-earth-is-on-fire,-oil-on-canvas.png
- txt2img-convsample.png
- txt2img-preview.png.REMOVED.git-id
- v1-variants-scores.jpg
- autoencoder_kl_16x16x16.yaml
- autoencoder_kl_32x32x4.yaml
- autoencoder_kl_64x64x3.yaml
- autoencoder_kl_8x8x64.yaml
- celebahq-ldm-vq-4.yaml
- cin-ldm-vq-f8.yaml
- cin256-v2.yaml
- ffhq-ldm-vq-4.yaml
- lsun_bedrooms-ldm-vq-4.yaml
- lsun_churches-ldm-kl-8.yaml
- txt2img-1p4B-eval.yaml
- 768x768.yaml
- v1-inference.yaml
- __init__.py
- dpm_solver.py
- sampler.py
- __init__.py
- classifier.py
- ddim.py
- ddpm.py
- ddpm_edit.py
- plms.py
- autoencoder.py
- __init__.py
- model.py
- openaimodel.py
- util.py
- __init__.py
- distributions.py
- __init__.py
- modules.py
- test.png
- __init__.py
- bsrgan.py
- bsrgan_light.py
- utils_image.py
- __init__.py
- contperceptual.py
- vqperceptual.py
- attention.py
- ema.py
- x_transformer.py
- lr_scheduler.py
- util.py
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- test_watermark.py
- download_first_stages.sh
- download_models.sh
- img2img.py
- inpaint.py
- knn2img.py
- latent_imagenet_diffusion.ipynb.REMOVED.git-id
- sample_diffusion.py
- train_searcher.py
- txt2img.py
- environment.yaml
- LICENSE
- main.py
- notebook_helpers.py
- README.md
- setup.py
- Stable_Diffusion_v1_Model_Card.md
- deepspeed.py
- logger.py
- utils.py
- .DS_Store
- .gitignore
- edit_app.py
- edit_cli.py
- environment.yaml
- LICENSE
- main.py
- README.md
- generate.yaml
- train.yaml
- generate_img_dataset.py
- generate_txt_dataset.py
- prepare_dataset.py
- prepare_for_gpt.py
- dataset.jpg
- edit_app.jpg
- example.jpg
- prompt_app.jpg
- clip_similarity.py
- compute_metrics.py
- download_checkpoints.sh
- download_data.sh
- download_pretrained_sd.sh
- mountains-1.png
- mountains-2.png
- mountains-3.png
- sketch-mountains-input.jpg
- upscaling-in.png.REMOVED.git-id
- upscaling-out.png.REMOVED.git-id
- 000002025.png
- 000002035.png
- merged-0005.png.REMOVED.git-id
- merged-0006.png.REMOVED.git-id
- merged-0007.png.REMOVED.git-id
- a-painting-of-a-fire.png
- a-photograph-of-a-fire.png
- a-shirt-with-a-fire-printed-on-it.png
- a-shirt-with-the-inscription-'fire'.png
- a-watercolor-painting-of-a-fire.png
- birdhouse.png
- fire.png
- inpainting.png
- modelfigure.png
- rdm-preview.jpg
- reconstruction1.png
- reconstruction2.png
- results.gif.REMOVED.git-id
- rick.jpeg
- the-earth-is-on-fire,-oil-on-canvas.png
- txt2img-convsample.png
- txt2img-preview.png.REMOVED.git-id
- v1-variants-scores.jpg
- autoencoder_kl_16x16x16.yaml
- autoencoder_kl_32x32x4.yaml
- autoencoder_kl_64x64x3.yaml
- autoencoder_kl_8x8x64.yaml
- celebahq-ldm-vq-4.yaml
- cin-ldm-vq-f8.yaml
- cin256-v2.yaml
- ffhq-ldm-vq-4.yaml
- lsun_bedrooms-ldm-vq-4.yaml
- lsun_churches-ldm-kl-8.yaml
- txt2img-1p4B-eval.yaml
- 768x768.yaml
- v1-inference.yaml
- __init__.py
- dpm_solver.py
- sampler.py
- __init__.py
- classifier.py
- ddim.py
- ddpm.py
- ddpm_edit.py
- plms.py
- autoencoder.py
- __init__.py
- model.py
- openaimodel.py
- util.py
- __init__.py
- distributions.py
- __init__.py
- modules.py
- test.png
- __init__.py
- bsrgan.py
- bsrgan_light.py
- utils_image.py
- __init__.py
- contperceptual.py
- vqperceptual.py
- attention.py
- ema.py
- x_transformer.py
- lr_scheduler.py
- util.py
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- config.yaml
- test_watermark.py
- download_first_stages.sh
- download_models.sh
- img2img.py
- inpaint.py
- knn2img.py
- latent_imagenet_diffusion.ipynb.REMOVED.git-id
- sample_diffusion.py
- train_searcher.py
- txt2img.py
- environment.yaml
- LICENSE
- main.py
- notebook_helpers.py
- README.md
- setup.py
- Stable_Diffusion_v1_Model_Card.md
- edit_app.py
- edit_cli.py
- edit_dataset.py
- environment.yaml
- LICENSE
- main.py
- prompt_app.py
- README.md
- diffuser_utils.py
- masactrl.py
- masactrl_utils.py
- attention_control.py
- inversion.py
- p2p_guidance_forward.py
- proximal_guidance_forward.py
- scheduler_dev.py
- seq_aligner.py
- base_pipeline.py
- cross_attention.py
- ddim_inv.py
- edit_directions.py
- edit_pipeline.py
- scheduler.py
- clip_util.py
- global_var.py
- inversion.py
- ptp_utils_v.py
- seq_aligner.py
- utils.py
- p2p_editor.py
- code_sample.png
- compare_direct_inversion_with_other_inversion_techniques.png
- example_cake.jpg
- example_cat.jpg
- outline.png
- vis_1.png
- vis_2.png
- utils.py
- .gitignore
- README.md
- run_editing_blended_latent_diffusion.py
- run_editing_edict.py
- run_editing_edit_friendly_p2p.py
- run_editing_instructdiffusion.py
- run_editing_instructpix2pix.py
- run_editing_masactrl.py
- run_editing_p2p.py
- run_editing_p2p_one_image.ipynb
- run_editing_p2p_one_image.py
- run_editing_pix2pix_zero.py
- run_editing_pnp.py
- run_editing_stylediffusion.py
# Use via CDN
jsDelivrjsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.
Command Glossary
Commands referenced in this DOCs, explained below.
conda activate
View Details ▼
conda activate
Activate a conda environment.
See also: `conda deactivate`.
conda activate myenv
Activate an existing environment named `myenv`:
conda activate {{path/to/myenv}}
Activate an existing environment located at custom path:
conda activate --stack myenv
Stack `myenv` environment on top of a previous environment making libraries/commands/variables from both accessible:
conda create
View Details ▼
conda create
Create new conda environments.
conda create {{[-y|--yes]}} {{[-n|--name]}} py39 python=3.9 "numpy>=1.11" scipy
Create a new environment named `py39`, install Python 3.9, NumPy v1.11 or above in it, and the latest stable version of SciPy. Say yes to all confirmations:
conda create {{[-n|--name]}} myenv --file {{file1.yml}} --file {{file2.yml}}
Create a new environment named `myenv` and install packages listed in files:
conda create {{[-p|--prefix]}} {{path/to/myenv}}
Create a new environment at a custom path (i.e. prefix):
conda install
View Details ▼
conda install
Install packages into an existing conda environment.
conda install {{package1 package2 ...}}
Install one or more package into the currently active conda environment:
conda install {{[-c|--channel]}} conda-forge {{package}}
Install a single package into the currently active conda environment using channel conda-forge:
conda install {{[-c|--channel]}} conda-forge --override-channels {{package}}
Install a single package into the currently active conda environment using channel conda-forge and ignoring other channels:
pip install
View Details ▼
pip install
Install Python packages.
pip install {{package1 package2 ...}}
Install one or more packages:
pip install {{package1 package2 ...}} {{[-U|--upgrade]}}
Upgrade all specified packages to the latest version, installing any that are not already present:
pip install {{package}}=={{version}}
Install a specific version of a package:
python
View Details ▼
python
Python language interpreter.
python
Start a REPL (interactive shell):
python {{path/to/file.py}}
Execute a specific Python file:
python -i {{path/to/file.py}}
Execute a specific Python file and start a REPL:
