Skip to main content

IDDM: Integrated Design Diffusion Model

Project description

IDDM: Integrated Design Diffusion Model

中文文档

About the Model

This diffusion model is based on the classic LDM (Latent Diffusion Models), DDPM (Denoising Diffusion Probabilistic Models), DDIM (Denoising Diffusion Implicit Models) and PLMS (Pseudo Numerical Methods for Diffusion Models on Manifolds) presented in the papers "High-Resolution Image Synthesis with Latent Diffusion Models", "Denoising Diffusion Probabilistic Models", "Denoising Diffusion Implicit Models" and "Pseudo Numerical Methods for Diffusion Models on Manifolds".

We named this project IDDM: Integrated Design Diffusion Model. It aims to reproduce the model, write trainers and generators, and improve and optimize certain algorithms and network structures. This repository is actively maintained.

If you have any questions, please check the existing issues first. If the issue persists, feel free to open a new one for assistance, or you can contact me via email at chenyu1998424@gmail.com or chairc1998@163.com. If you think my project is interesting, please give me a ⭐⭐⭐Star⭐⭐⭐ :)

Running Locally

Use the git clone or directly download the zip file of this repository's code, and then configure the environment locally to run it.

git clone https://github.com/chairc/Integrated-Design-Diffusion-Model.git
cd Integrated-Design-Diffusion-Model
# Run the project in a virtual environment (recommended)
conda create -n iddm python=3.10
pip install -r requirements.txt
# Train the model
cd iddm/tools
python train.py --xxx xxx # Replace --xxx with your training parameters
# Generate images
python generate.py --xxx xxx # Replace --xxx with your generation parameters

Installation

In addition to running locally, there are also the following two approachs for installing this code.

Approach 1: Use pip install (Recommend)

pip install iddm

The following packages are required.

coloredlogs==15.0.1
gradio==5.0.0
matplotlib==3.7.1
numpy==1.25.0
Pillow==10.3.0
Requests==2.32.0
scikit-image==0.22.0
torch_summary==1.4.5
tqdm==4.66.3
pytorch_fid==0.3.0
fastapi==0.115.6
tensorboardX==2.6.1

# If you want to download gpu version
# Please use: pip install torch==1.13.0+cu116 torchvision==0.14.0+cu116 -f https://download.pytorch.org/whl/torch_stable.html
# About more torch information please click: https://pytorch.org/get-started/previous-versions/#linux-and-windows-25
# More versions please click: https://pytorch.org/get-started/previous-versions
# [Note] torch versions must >= 1.9.0
torch>=1.9.0 # More info: https://pytorch.org/get-started/locally/ (recommended)
torchvision>=0.10.0 # More info: https://pytorch.org/get-started/locally/ (recommended)

Approach 2:Repository Installation

git clone https://github.com/chairc/Integrated-Design-Diffusion-Model.git
cd Integrated-Design-Diffusion-Model
pip install . # Or python setup.py install

Next Steps

  • [2023-07-15] Adding implement multi-GPU distributed training.
  • [2023-07-31] Adding implement cosine learning rate optimization.
  • [2023-08-03] Adding DDIM Sampling Method.
  • [2023-08-28] Adding fast deployment and API on cloud servers.
  • [2023-09-16] Support other image generation.
  • [2023-11-09] Adding a more advanced U-Net network model.
  • [2023-11-09] Support generate larger-sized images.
  • [2023-12-06] Refactor the overall structure of the model.
  • [2024-01-23] Adding visual webui training interface.
  • [2024-02-18] Support low-resolution generated images for super-resolution enhancement.[Super resolution model, the effect is uncertain]
  • [2024-03-12] Adding PLMS Sampling Method.
  • [2024-05-06] Adding FID calculator to verify image quality.
  • [2024-06-11] Adding visual webui generate interface.
  • [2024-07-07] Support custom images length and width input.
  • [2024-11-13] Adding the deployment of image-generating Sockets and Web server.
  • [2024-11-26] Adding PSNR and SSIM calculators to verify super resolution image quality.
  • [2024-12-10] Adding pretrain model download.
  • [2024-12-25] Refactor the overall structure of the trainer.
  • [2025-03-08] Support PyPI install.
  • [2025-08-01] Adding LDM Method. Support generate 512*512 images and use Latent Diffusion and reduce GPU memory usage.
  • [Maybe 2025-01-31] Adding the deployment of Docker and image.
  • [To be determined] Refactor the project by Baidu PaddlePaddle.

Guide

Please read the guide carefully before developing or using.

Guide Name Document
Model Training Training.md
Model Generation Generation.md
Model Results Results.md
Model Evaluation Evaluation.md
Model List Model List.md

Citation

If this project is used for experiments in an academic paper, where possible please cite our project appropriately and we appreciate this. The specific citation format can be found at this website.

@software{chen_2024_10866128,
  author       = {Chen Yu},
  title        = {IDDM: Integrated Design Diffusion Model},
  month        = mar,
  year         = 2024,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.10866128},
  url          = {https://doi.org/10.5281/zenodo.10866128}
}

Citation detail:

image-20241124174339833

Acknowledgements

@dome272 and @JetBrains

Sponsor

JetBrains logo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iddm-1.2.0.tar.gz (66.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iddm-1.2.0-py3-none-any.whl (99.0 kB view details)

Uploaded Python 3

File details

Details for the file iddm-1.2.0.tar.gz.

File metadata

  • Download URL: iddm-1.2.0.tar.gz
  • Upload date:
  • Size: 66.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for iddm-1.2.0.tar.gz
Algorithm Hash digest
SHA256 b0877431278a21ab5d194bca6ad26d1db8d3293246a02b17f04586e32bc37417
MD5 770e09532f191b8b28ce80123e5dc62f
BLAKE2b-256 11afa857853409fbdccaabea27984a197afec4c7f7695c8a81de6be2132382c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for iddm-1.2.0.tar.gz:

Publisher: python-publish.yml on chairc/Integrated-Design-Diffusion-Model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iddm-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: iddm-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 99.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for iddm-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4268b996e2d3b843ca46c03a5c9b95f576cc48b7460b96a9d6096132187cb0f
MD5 187812f0c63f625d1bd3fe687985e5b5
BLAKE2b-256 f7227fa73238e9ebe4cb7799481ad7905b6ee6a9584bd189cc653e1394efebfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for iddm-1.2.0-py3-none-any.whl:

Publisher: python-publish.yml on chairc/Integrated-Design-Diffusion-Model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page