gitextract_bsd98edx/ ├── .gitignore ├── LICENSE ├── README.md ├── ddpm_exp/ │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── calc_fid.py │ ├── compute_flops.py │ ├── compute_pruned_ssim_curve.py │ ├── compute_ssim.py │ ├── compute_ssim_vis.py │ ├── configs/ │ │ ├── bedroom.yml │ │ ├── celeba.yml │ │ ├── church.yml │ │ ├── cifar10.yml │ │ └── cifar10_pruning.yml │ ├── datasets/ │ │ ├── __init__.py │ │ ├── celeba.py │ │ ├── ffhq.py │ │ ├── lsun.py │ │ ├── utils.py │ │ └── vision.py │ ├── draw_ssim_pruned_curve.py │ ├── extract_cifar10.py │ ├── fid_score.py │ ├── finetune.py │ ├── finetune_simple.py │ ├── functions/ │ │ ├── __init__.py │ │ ├── ckpt_util.py │ │ ├── denoising.py │ │ └── losses.py │ ├── inception.py │ ├── main.py │ ├── models/ │ │ ├── diffusion.py │ │ └── ema.py │ ├── prune.py │ ├── prune_kd.py │ ├── prune_ssim.py │ ├── prune_test.py │ ├── runners/ │ │ ├── __init__.py │ │ ├── diffusion.py │ │ └── diffusion_simple.py │ ├── scripts/ │ │ ├── finetune_bedroom_ddpm.sh │ │ ├── finetune_celeba_ddpm.sh │ │ ├── finetune_celeba_ddpm_kd.sh │ │ ├── finetune_church_ddpm.sh │ │ ├── finetune_cifar_ddpm.sh │ │ ├── finetune_cifar_ddpm_kd.sh │ │ ├── finetune_cifar_ddpm_random.sh │ │ ├── finetune_cifar_ddpm_taylor.sh │ │ ├── old/ │ │ │ ├── run_bedroom_sample_pratrained.sh │ │ │ ├── run_celeba_pruning_scratch.sh │ │ │ ├── run_celeba_pruning_taylor.sh │ │ │ ├── run_celeba_sample_pratrained.sh │ │ │ ├── run_church_pruning_taylor.sh │ │ │ ├── run_cifar_pruning_first_order_taylor.sh │ │ │ ├── run_cifar_pruning_magnitude.sh │ │ │ ├── run_cifar_pruning_random.sh │ │ │ ├── run_cifar_pruning_random_kd.sh │ │ │ ├── run_cifar_pruning_scratch.sh │ │ │ ├── run_cifar_pruning_second_order_taylor.sh │ │ │ ├── run_cifar_pruning_taylor.sh │ │ │ ├── run_cifar_pruning_taylor_kd.sh │ │ │ └── run_cifar_train.sh │ │ ├── prune_bedroom_ddpm.sh │ │ ├── prune_bedroom_ddpm_test.sh │ │ ├── prune_celeba_ddpm.sh │ │ ├── prune_celeba_ddpm_ssim.sh │ │ ├── prune_church_ddpm.sh │ │ ├── prune_church_ddpm_test.sh │ │ ├── prune_cifar_ddpm.sh │ │ ├── prune_cifar_ddpm_ssim.sh │ │ ├── prune_cifar_ddpm_test.sh │ │ ├── run_celeba.sh │ │ ├── sample_bedroom_ddpm_pretrained.sh │ │ ├── sample_bedroom_ddpm_pruning.sh │ │ ├── sample_celeba_ddpm_pruning.sh │ │ ├── sample_celeba_pretrained.sh │ │ ├── sample_church_ddpm_pruning.sh │ │ ├── sample_church_ddpm_pruning_old.sh │ │ ├── sample_church_ddpm_test.sh │ │ ├── sample_church_pretrained.sh │ │ ├── sample_cifar_ddpm_pruning.sh │ │ ├── sample_cifar_pretrained.sh │ │ ├── simple_celeba_our.sh │ │ └── simple_cifar_our.sh │ ├── tools/ │ │ ├── extract_cifar10.py │ │ └── transform_weights.py │ ├── torch_pruning/ │ │ ├── __init__.py │ │ ├── _helpers.py │ │ ├── dependency.py │ │ ├── importance.py │ │ ├── ops.py │ │ ├── pruner/ │ │ │ ├── __init__.py │ │ │ ├── algorithms/ │ │ │ │ ├── __init__.py │ │ │ │ ├── batchnorm_scale_pruner.py │ │ │ │ ├── group_norm_pruner.py │ │ │ │ ├── magnitude_based_pruner.py │ │ │ │ ├── metapruner.py │ │ │ │ ├── scaling_factor_pruner.py │ │ │ │ ├── scheduler.py │ │ │ │ └── taylor_pruner.py │ │ │ └── function.py │ │ └── utils/ │ │ ├── __init__.py │ │ ├── op_counter.py │ │ └── utils.py │ └── utils.py ├── ddpm_prune.py ├── ddpm_sample.py ├── ddpm_train.py ├── diffusers/ │ ├── __init__.py │ ├── commands/ │ │ ├── __init__.py │ │ ├── diffusers_cli.py │ │ └── env.py │ ├── configuration_utils.py │ ├── dependency_versions_check.py │ ├── dependency_versions_table.py │ ├── experimental/ │ │ ├── README.md │ │ ├── __init__.py │ │ └── rl/ │ │ ├── __init__.py │ │ └── value_guided_sampling.py │ ├── image_processor.py │ ├── loaders.py │ ├── models/ │ │ ├── README.md │ │ ├── __init__.py │ │ ├── attention.py │ │ ├── attention_flax.py │ │ ├── attention_processor.py │ │ ├── autoencoder_kl.py │ │ ├── controlnet.py │ │ ├── controlnet_flax.py │ │ ├── cross_attention.py │ │ ├── dual_transformer_2d.py │ │ ├── embeddings.py │ │ ├── embeddings_flax.py │ │ ├── modeling_flax_pytorch_utils.py │ │ ├── modeling_flax_utils.py │ │ ├── modeling_pytorch_flax_utils.py │ │ ├── modeling_utils.py │ │ ├── prior_transformer.py │ │ ├── resnet.py │ │ ├── resnet_flax.py │ │ ├── t5_film_transformer.py │ │ ├── transformer_2d.py │ │ ├── transformer_temporal.py │ │ ├── unet_1d.py │ │ ├── unet_1d_blocks.py │ │ ├── unet_2d.py │ │ ├── unet_2d_blocks.py │ │ ├── unet_2d_blocks_flax.py │ │ ├── unet_2d_condition.py │ │ ├── unet_2d_condition_flax.py │ │ ├── unet_3d_blocks.py │ │ ├── unet_3d_condition.py │ │ ├── vae.py │ │ ├── vae_flax.py │ │ └── vq_model.py │ ├── optimization.py │ ├── pipeline_utils.py │ ├── pipelines/ │ │ ├── README.md │ │ ├── __init__.py │ │ ├── alt_diffusion/ │ │ │ ├── __init__.py │ │ │ ├── modeling_roberta_series.py │ │ │ ├── pipeline_alt_diffusion.py │ │ │ └── pipeline_alt_diffusion_img2img.py │ │ ├── audio_diffusion/ │ │ │ ├── __init__.py │ │ │ ├── mel.py │ │ │ └── pipeline_audio_diffusion.py │ │ ├── audioldm/ │ │ │ ├── __init__.py │ │ │ └── pipeline_audioldm.py │ │ ├── controlnet/ │ │ │ ├── __init__.py │ │ │ ├── multicontrolnet.py │ │ │ ├── pipeline_controlnet.py │ │ │ ├── pipeline_controlnet_img2img.py │ │ │ ├── pipeline_controlnet_inpaint.py │ │ │ └── pipeline_flax_controlnet.py │ │ ├── dance_diffusion/ │ │ │ ├── __init__.py │ │ │ └── pipeline_dance_diffusion.py │ │ ├── ddim/ │ │ │ ├── __init__.py │ │ │ └── pipeline_ddim.py │ │ ├── ddpm/ │ │ │ ├── __init__.py │ │ │ └── pipeline_ddpm.py │ │ ├── deepfloyd_if/ │ │ │ ├── __init__.py │ │ │ ├── pipeline_if.py │ │ │ ├── pipeline_if_img2img.py │ │ │ ├── pipeline_if_img2img_superresolution.py │ │ │ ├── pipeline_if_inpainting.py │ │ │ ├── pipeline_if_inpainting_superresolution.py │ │ │ ├── pipeline_if_superresolution.py │ │ │ ├── safety_checker.py │ │ │ ├── timesteps.py │ │ │ └── watermark.py │ │ ├── dit/ │ │ │ ├── __init__.py │ │ │ └── pipeline_dit.py │ │ ├── latent_diffusion/ │ │ │ ├── __init__.py │ │ │ ├── pipeline_latent_diffusion.py │ │ │ └── pipeline_latent_diffusion_superresolution.py │ │ ├── latent_diffusion_uncond/ │ │ │ ├── __init__.py │ │ │ └── pipeline_latent_diffusion_uncond.py │ │ ├── onnx_utils.py │ │ ├── paint_by_example/ │ │ │ ├── __init__.py │ │ │ ├── image_encoder.py │ │ │ └── pipeline_paint_by_example.py │ │ ├── pipeline_flax_utils.py │ │ ├── pipeline_utils.py │ │ ├── pndm/ │ │ │ ├── __init__.py │ │ │ └── pipeline_pndm.py │ │ ├── repaint/ │ │ │ ├── __init__.py │ │ │ └── pipeline_repaint.py │ │ ├── score_sde_ve/ │ │ │ ├── __init__.py │ │ │ └── pipeline_score_sde_ve.py │ │ ├── semantic_stable_diffusion/ │ │ │ ├── __init__.py │ │ │ └── pipeline_semantic_stable_diffusion.py │ │ ├── spectrogram_diffusion/ │ │ │ ├── __init__.py │ │ │ ├── continous_encoder.py │ │ │ ├── midi_utils.py │ │ │ ├── notes_encoder.py │ │ │ └── pipeline_spectrogram_diffusion.py │ │ ├── stable_diffusion/ │ │ │ ├── README.md │ │ │ ├── __init__.py │ │ │ ├── convert_from_ckpt.py │ │ │ ├── pipeline_cycle_diffusion.py │ │ │ ├── pipeline_flax_stable_diffusion.py │ │ │ ├── pipeline_flax_stable_diffusion_controlnet.py │ │ │ ├── pipeline_flax_stable_diffusion_img2img.py │ │ │ ├── pipeline_flax_stable_diffusion_inpaint.py │ │ │ ├── pipeline_onnx_stable_diffusion.py │ │ │ ├── pipeline_onnx_stable_diffusion_img2img.py │ │ │ ├── pipeline_onnx_stable_diffusion_inpaint.py │ │ │ ├── pipeline_onnx_stable_diffusion_inpaint_legacy.py │ │ │ ├── pipeline_onnx_stable_diffusion_upscale.py │ │ │ ├── pipeline_stable_diffusion.py │ │ │ ├── pipeline_stable_diffusion_attend_and_excite.py │ │ │ ├── pipeline_stable_diffusion_controlnet.py │ │ │ ├── pipeline_stable_diffusion_depth2img.py │ │ │ ├── pipeline_stable_diffusion_diffedit.py │ │ │ ├── pipeline_stable_diffusion_image_variation.py │ │ │ ├── pipeline_stable_diffusion_img2img.py │ │ │ ├── pipeline_stable_diffusion_inpaint.py │ │ │ ├── pipeline_stable_diffusion_inpaint_legacy.py │ │ │ ├── pipeline_stable_diffusion_instruct_pix2pix.py │ │ │ ├── pipeline_stable_diffusion_k_diffusion.py │ │ │ ├── pipeline_stable_diffusion_latent_upscale.py │ │ │ ├── pipeline_stable_diffusion_model_editing.py │ │ │ ├── pipeline_stable_diffusion_panorama.py │ │ │ ├── pipeline_stable_diffusion_pix2pix_zero.py │ │ │ ├── pipeline_stable_diffusion_sag.py │ │ │ ├── pipeline_stable_diffusion_upscale.py │ │ │ ├── pipeline_stable_unclip.py │ │ │ ├── pipeline_stable_unclip_img2img.py │ │ │ ├── safety_checker.py │ │ │ ├── safety_checker_flax.py │ │ │ └── stable_unclip_image_normalizer.py │ │ ├── stable_diffusion_safe/ │ │ │ ├── __init__.py │ │ │ ├── pipeline_stable_diffusion_safe.py │ │ │ └── safety_checker.py │ │ ├── stochastic_karras_ve/ │ │ │ ├── __init__.py │ │ │ └── pipeline_stochastic_karras_ve.py │ │ ├── text_to_video_synthesis/ │ │ │ ├── __init__.py │ │ │ ├── pipeline_text_to_video_synth.py │ │ │ └── pipeline_text_to_video_zero.py │ │ ├── unclip/ │ │ │ ├── __init__.py │ │ │ ├── pipeline_unclip.py │ │ │ ├── pipeline_unclip_image_variation.py │ │ │ └── text_proj.py │ │ ├── versatile_diffusion/ │ │ │ ├── __init__.py │ │ │ ├── modeling_text_unet.py │ │ │ ├── pipeline_versatile_diffusion.py │ │ │ ├── pipeline_versatile_diffusion_dual_guided.py │ │ │ ├── pipeline_versatile_diffusion_image_variation.py │ │ │ └── pipeline_versatile_diffusion_text_to_image.py │ │ └── vq_diffusion/ │ │ ├── __init__.py │ │ └── pipeline_vq_diffusion.py │ ├── schedulers/ │ │ ├── README.md │ │ ├── __init__.py │ │ ├── scheduling_ddim.py │ │ ├── scheduling_ddim_flax.py │ │ ├── scheduling_ddim_inverse.py │ │ ├── scheduling_ddpm.py │ │ ├── scheduling_ddpm_flax.py │ │ ├── scheduling_deis_multistep.py │ │ ├── scheduling_dpmsolver_multistep.py │ │ ├── scheduling_dpmsolver_multistep_flax.py │ │ ├── scheduling_dpmsolver_multistep_inverse.py │ │ ├── scheduling_dpmsolver_sde.py │ │ ├── scheduling_dpmsolver_singlestep.py │ │ ├── scheduling_euler_ancestral_discrete.py │ │ ├── scheduling_euler_discrete.py │ │ ├── scheduling_heun_discrete.py │ │ ├── scheduling_ipndm.py │ │ ├── scheduling_k_dpm_2_ancestral_discrete.py │ │ ├── scheduling_k_dpm_2_discrete.py │ │ ├── scheduling_karras_ve.py │ │ ├── scheduling_karras_ve_flax.py │ │ ├── scheduling_lms_discrete.py │ │ ├── scheduling_lms_discrete_flax.py │ │ ├── scheduling_pndm.py │ │ ├── scheduling_pndm_flax.py │ │ ├── scheduling_repaint.py │ │ ├── scheduling_sde_ve.py │ │ ├── scheduling_sde_ve_flax.py │ │ ├── scheduling_sde_vp.py │ │ ├── scheduling_unclip.py │ │ ├── scheduling_unipc_multistep.py │ │ ├── scheduling_utils.py │ │ ├── scheduling_utils_flax.py │ │ └── scheduling_vq_diffusion.py │ ├── training_utils.py │ └── utils/ │ ├── __init__.py │ ├── accelerate_utils.py │ ├── constants.py │ ├── deprecation_utils.py │ ├── doc_utils.py │ ├── dummy_flax_and_transformers_objects.py │ ├── dummy_flax_objects.py │ ├── dummy_note_seq_objects.py │ ├── dummy_onnx_objects.py │ ├── dummy_pt_objects.py │ ├── dummy_torch_and_librosa_objects.py │ ├── dummy_torch_and_scipy_objects.py │ ├── dummy_torch_and_torchsde_objects.py │ ├── dummy_torch_and_transformers_and_k_diffusion_objects.py │ ├── dummy_torch_and_transformers_and_onnx_objects.py │ ├── dummy_torch_and_transformers_objects.py │ ├── dummy_transformers_and_torch_and_note_seq_objects.py │ ├── dynamic_modules_utils.py │ ├── hub_utils.py │ ├── import_utils.py │ ├── logging.py │ ├── model_card_template.md │ ├── outputs.py │ ├── pil_utils.py │ ├── testing_utils.py │ └── torch_utils.py ├── fid_score.py ├── inception.py ├── ldm_exp/ │ ├── LICENSE │ ├── README.md │ ├── configs/ │ │ ├── autoencoder/ │ │ │ ├── autoencoder_kl_16x16x16.yaml │ │ │ ├── autoencoder_kl_32x32x4.yaml │ │ │ ├── autoencoder_kl_64x64x3.yaml │ │ │ └── autoencoder_kl_8x8x64.yaml │ │ ├── latent-diffusion/ │ │ │ ├── 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 │ │ └── retrieval-augmented-diffusion/ │ │ └── 768x768.yaml │ ├── environment.yaml │ ├── fid_score.py │ ├── inception.py │ ├── ldm/ │ │ ├── lr_scheduler.py │ │ ├── models/ │ │ │ ├── autoencoder.py │ │ │ └── diffusion/ │ │ │ ├── __init__.py │ │ │ ├── classifier.py │ │ │ ├── ddim.py │ │ │ ├── ddpm.py │ │ │ └── plms.py │ │ ├── modules/ │ │ │ ├── __init__.py │ │ │ ├── attention.py │ │ │ ├── diffusionmodules/ │ │ │ │ ├── __init__.py │ │ │ │ ├── model.py │ │ │ │ ├── openaimodel.py │ │ │ │ └── util.py │ │ │ ├── distributions/ │ │ │ │ ├── __init__.py │ │ │ │ └── distributions.py │ │ │ ├── ema.py │ │ │ ├── encoders/ │ │ │ │ ├── __init__.py │ │ │ │ └── modules.py │ │ │ ├── image_degradation/ │ │ │ │ ├── __init__.py │ │ │ │ ├── bsrgan.py │ │ │ │ ├── bsrgan_light.py │ │ │ │ └── utils_image.py │ │ │ ├── losses/ │ │ │ │ ├── __init__.py │ │ │ │ ├── contperceptual.py │ │ │ │ └── vqperceptual.py │ │ │ └── x_transformer.py │ │ └── util.py │ ├── main.py │ ├── models/ │ │ ├── first_stage_models/ │ │ │ ├── kl-f16/ │ │ │ │ └── config.yaml │ │ │ ├── kl-f32/ │ │ │ │ └── config.yaml │ │ │ ├── kl-f4/ │ │ │ │ └── config.yaml │ │ │ ├── kl-f8/ │ │ │ │ └── config.yaml │ │ │ ├── vq-f16/ │ │ │ │ └── config.yaml │ │ │ ├── vq-f4/ │ │ │ │ └── config.yaml │ │ │ ├── vq-f4-noattn/ │ │ │ │ └── config.yaml │ │ │ ├── vq-f8/ │ │ │ │ └── config.yaml │ │ │ └── vq-f8-n256/ │ │ │ └── config.yaml │ │ └── ldm/ │ │ ├── bsr_sr/ │ │ │ └── config.yaml │ │ ├── celeba256/ │ │ │ └── config.yaml │ │ ├── cin256/ │ │ │ └── config.yaml │ │ ├── ffhq256/ │ │ │ └── config.yaml │ │ ├── inpainting_big/ │ │ │ └── config.yaml │ │ ├── layout2img-openimages256/ │ │ │ └── config.yaml │ │ ├── lsun_beds256/ │ │ │ └── config.yaml │ │ ├── lsun_churches256/ │ │ │ └── config.yaml │ │ ├── semantic_synthesis256/ │ │ │ └── config.yaml │ │ ├── semantic_synthesis512/ │ │ │ └── config.yaml │ │ └── text2img256/ │ │ └── config.yaml │ ├── notebook_helpers.py │ ├── profile_ldm.py │ ├── profile_ldm_pretrained.py │ ├── profile_model.py │ ├── prune_ldm.py │ ├── prune_ldm_no_grad.py │ ├── run.sh │ ├── sample_for_FID.py │ ├── sample_imagenet.py │ ├── sample_pruned.py │ ├── scripts/ │ │ ├── download_first_stages.sh │ │ ├── download_models.sh │ │ ├── inpaint.py │ │ ├── knn2img.py │ │ ├── latent_imagenet_diffusion.ipynb │ │ ├── sample_diffusion.py │ │ ├── train_searcher.py │ │ └── txt2img.py │ ├── setup.py │ ├── test_criterion.py │ └── test_diffusion.py ├── ldm_prune.py ├── requirements.txt ├── scripts/ │ ├── finetune_ddpm_cifar10.sh │ ├── prune_ddpm_cifar10.sh │ ├── prune_ddpm_ema_bedroom_random.sh │ ├── prune_ddpm_ema_church_random.sh │ ├── prune_ldm.sh │ ├── sample_ddpm_cifar10_pretrained.sh │ ├── sample_ddpm_cifar10_pretrained_distributed.sh │ └── sample_ddpm_cifar10_pruned.sh ├── tools/ │ ├── convert_cifar10_ddpm_ema.sh │ ├── convert_ddpm_original_checkpoint_to_diffusers_cifar10.py │ ├── convert_ldm_original_checkpoint_to_diffusers.py │ ├── ddpm_cifar10_config.json │ ├── extract_cifar10.py │ └── ldm_unet_config.json └── utils.py