The Locality-aware Parallel Decoding (LPD) project focuses on improving the efficiency of autoregressive image generation. By leveraging locality-aware techniques, we can significantly speed up the decoding process while maintaining high-quality output. This repository includes implementations and benchmarks to showcase the effectiveness of our approach.
For the latest releases, visit Releases.
- Acceleration: Optimized for fast decoding.
- Autoregressive: Implements state-of-the-art autoregressive models.
- Efficient Algorithm: Utilizes locality-aware strategies for better performance.
- Image Generation: Capable of generating high-quality images.
- ImageNet Compatibility: Works seamlessly with ImageNet datasets.
- Parallel Decoding: Supports parallel processing to enhance speed.
To get started with LPD, clone the repository and install the required dependencies.
git clone https://github.com/chunyu0208/lpd.git
cd lpd
pip install -r requirements.txtMake sure you have Python 3.7 or higher installed on your machine.
After installation, you can start using LPD for your image generation tasks. The main script is located in the src directory.
To generate images, run the following command:
python src/generate.py --config config.yamlMake sure to modify the config.yaml file according to your requirements. You can specify parameters such as the number of images to generate, output directory, and model checkpoints.
For detailed examples, refer to the Examples section.
The architecture of LPD is designed for efficiency and scalability. It consists of the following components:
- Data Loader: Handles loading and preprocessing of image datasets.
- Model: Implements the autoregressive model with locality-aware features.
- Decoder: Responsible for the parallel decoding process.
- Evaluator: Measures the quality of generated images.
Each component is modular, allowing for easy customization and extension.
Here are a few examples of how to use LPD for image generation.
To generate a single image, you can use the following command:
python src/generate.py --config config_single.yamlTo generate multiple images at once, modify the config_multiple.yaml file:
python src/generate.py --config config_multiple.yamlYou can customize the output size and format by adjusting parameters in the configuration file.
Refer to the documentation for more examples and detailed explanations.
We welcome contributions to improve LPD. To contribute, follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes and commit them (
git commit -m 'Add new feature'). - Push to the branch (
git push origin feature-branch). - Create a pull request.
Please ensure that your code adheres to our coding standards and includes appropriate tests.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or feedback, feel free to reach out:
- Email: [email protected]
- GitHub: chunyu0208
For the latest releases, visit Releases.