Forked from here
The model is gated, see here
ComfyUI workflow here
- Add Gradio interface
- Use the uncensored version of the model used in this repo (And some other more)
One-time pasting version
git clone https://github.com/ManHinnn0509/DyPE.git
cd DyPE && mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm ~/miniconda3/miniconda.sh && source ~/miniconda3/bin/activate
conda create -n dype python=3.10
conda activate dype
pip install -r requirements.txt
# missing in requirements.txt
pip install sqlalchemy
pip install protobuf
# for the interface
pip install gradio-
Open the terminal
-
Install miniconda
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm ~/miniconda3/miniconda.sh- Clone the repo
git clone https://github.com/ManHinnn0509/DyPE.git
cd DyPE- Init conda, create venv and install dependencies
source ~/miniconda3/bin/activate
conda create -n dype python=3.10
conda activate dype
pip install -r requirements.txt
# missing in requirements.txt
pip install sqlalchemy
pip install protobuf
# for the interface
pip install gradio- Run the script (if you want)
python run_dype.py --prompt "Your text prompt here"DyPE (Dynamic Position Extrapolation) enables pre-trained diffusion transformers to generate ultra-high-resolution images far beyond their training scale. It dynamically adjusts positional encodings during denoising to match evolving frequency content—achieving faithful 4K × 4K results without retraining or extra sampling cost.
Create a conda environment and install dependencies:
conda create -n dype python=3.10
conda activate dype
pip install -r requirements.txtGenerate ultra-high resolution images with DyPE using the run_dype.py script:
python run_dype.py --prompt "Your text prompt here"Key Arguments:
| Argument | Default | Description |
|---|---|---|
--prompt |
Dark fantasy scene | Text prompt for image generation |
--height |
4096 | Image height in pixels |
--width |
4096 | Image width in pixels |
--steps |
28 | Number of inference steps |
--seed |
42 | Random seed for reproducibility |
--method |
yarn |
Position encoding method: yarn, ntk, or base |
--no_dype |
False | Disable DyPE (enabled by default) |
Examples:
# Generate 4K image with default settings (YARN + DyPE)
python run_dype.py --prompt "A serene mountain landscape at sunset"
# Use NTK method without DyPE
python run_dype.py --method ntk --no_dype --prompt "A futuristic city skyline"
# Baseline comparison (no position encoding modifications)
python run_dype.py --method baseGenerated images will be saved to the outputs/ folder (created automatically).
This work is patent pending. For commercial use or licensing inquiries, please contact the authors.
If you find this useful for your research, please cite the following:
@misc{issachar2025dypedynamicpositionextrapolation,
title={DyPE: Dynamic Position Extrapolation for Ultra High Resolution Diffusion},
author={Noam Issachar and Guy Yariv and Sagie Benaim and Yossi Adi and Dani Lischinski and Raanan Fattal},
year={2025},
eprint={2510.20766},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2510.20766},
}