Update RotEx documentation, Apache license, and inference checkpoint paths
Browse filesFiles changed (8)
- .gitignoreAdded+13
- LICENSEAdded+202
- README.md+40-194
- checkpoints/README.md+8-42
- checkpoints/full/README.md+7-34
- distill_checkpoints/README.md+5-23
- infer_1step_style.py+2-2
- infer_multistep.py+1-1
12345678910111213# Model weights are distributed through Hugging Face.*.pt*.pth*.ckpt*.safetensors
# Python and download caches.__pycache__/*.py[cod].cache/
# Generated inference outputs.outputs/123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.12342 unmodified lines7891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889901 unmodified line92939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831 unmodified line1851861871881891901911921931941951961971981992002012022032042052062072082092102112122132144 unmodified lines2192202212222232242252262272282292302312322332 unmodified lines2362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972984 unmodified lines303304305306# [Official] RotEx: A Rotational Expert Network for Realistic Scene Synthesis Under Illumination Variation<p align="center">📄 <b>Paper: coming soon</b> | 2 unmodified lines</p><p align="center"><img src="demo/RotEx_Proposed.png" alt="Overview of RotEx and its double-stream and single-stream transformer blocks" width="1100"/></p><p align="center"><em>Architecture of RotEx: content and style streams, depth conditioning, and illumination-dependent expert routing.</em></p>> The Hugging Face commands below describe the intended weight layout; they become usable once the checkpoints are uploaded.## Introduction**RotEx** is a transformer-based image-to-image framework for synthesizing scenes under varying illumination conditions. It combines content latents, depth information, style features, and a continuous time-of-day variable to generate illumination variations of an input scene.The model operates in the latent space of a FLUX autoencoder. DINOv2 supplies style features, Depth Anything V2 supplies depth maps, and time-conditioned mixture-of-experts modules adapt the synthesis process to the requested illumination. The release includes both multi-step inference and a distilled one-step inference path.### Key Features- **Continuous illumination control:** Specify a time-of-day value and map it to an angle through `phi = hour * 2π / 24`.- **Illumination-dependent experts:** Route style and image features through experts conditioned on the illumination angle.- **Content and depth conditioning:** Use an encoded content image and its estimated depth map during synthesis.- **Two inference modes:** Use a full checkpoint with a multi-step Heun solver, or a distilled checkpoint with a single model evaluation.- **Image and video processing:** Generate image sequences across hours or vary the target hour across the frames of a video.- **Reference-style conditioning:** Use a separate style image to condition illumination synthesis.## Demo### Illumination Variation<p align="center"><img src="demo/illumination_variation_space.jpg" alt="Scene synthesis across the illumination variation space" width="1000"/></p><p align="center"><em>Illustration of the illumination variation space.</em></p>### Downstream Trajectory Comparison<p align="center"><img src="demo/VLA_Traj.png" alt="AutoVLA trajectory comparison under different image translation methods" width="1100"/></p><p align="center"><em>Qualitative comparison of AutoVLA rollouts using daylight reference images and images produced by different translation methods.</em></p>## Installation and RequirementsThe supplied inference code uses CUDA and imports FlashAttention directly. Use a compatible NVIDIA GPU and a Linux environment with the CUDA toolkit required by your FlashAttention build.| Component | Requirement || --- | --- || Python | 3.10 or later || PyTorch | 2.6.0 or later, as specified in `requirements.txt` || torchvision | A version compatible with the installed PyTorch release; `requirements.txt` specifies 0.19.0 or later || FlashAttention | 2.0.0 or later, with a build compatible with PyTorch, CUDA, and the GPU || Default inference precision | `torch.bfloat16` || Default image resolution | 384 × 384 |### 1. Clone the Repository```shellgit clone https://github.com/val-utehy/RotEx.gitcd RotEx```All commands below run from the directory containing `config.py`, `flux/`, and the inference scripts. If using this code inside the BenchRotEx workspace, that directory is `B/RotEx`.### 2. Create an Environment```shellconda create -n rotex python=3.10 -yconda activate rotexpython -m pip install --upgrade pip```### 3. Install PyTorch and DependenciesInstall a matching CUDA-enabled PyTorch and torchvision pair using the [official PyTorch installation instructions](https://pytorch.org/get-started/locally/). Ensure the selected versions satisfy the requirements above.After installing PyTorch:```shellpython -m pip install packaging ninja psutil1 unmodified linepython -m pip install -r requirements.txt```See the [FlashAttention installation instructions](https://github.com/Dao-AILab/flash-attention#installation-and-features) for supported CUDA/GPU combinations and build requirements.Verify the environment:```shellpython -c "import torch, flash_attn; print('PyTorch:', torch.__version__); print('CUDA:', torch.cuda.is_available()); print('BF16:', torch.cuda.is_bf16_supported())"```### 4. Prepare the Auxiliary ModelsThe inference scripts load these pretrained components:| Component | Source | Local behavior || --- | --- | --- || FLUX autoencoder | [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev), `ae.safetensors` | Loaded from `checkpoints/ae.safetensors`; downloaded there if missing || DINOv2 Base | [facebook/dinov2-base](https://huggingface.co/facebook/dinov2-base) | Downloaded through Transformers and stored in the Hugging Face cache || Depth Anything V2 Small | [depth-anything/Depth-Anything-V2-Small-hf](https://huggingface.co/depth-anything/Depth-Anything-V2-Small-hf) | Downloaded through Transformers and stored in the Hugging Face cache |An internet connection is needed for the first download. If access to an auxiliary model requires authentication or approval, complete the access process on its model page and log in with `hf auth login`.To download the autoencoder explicitly:```shellhf download black-forest-labs/FLUX.1-dev ae.safetensors --local-dir checkpoints```## Pretrained ModelsRotEx weights will be distributed through [Hugging Face](https://huggingface.co/val-utehy/RotEx). Download the checkpoint matching the inference mode you intend to run.| Checkpoint | Purpose | Expected local path || --- | --- | --- || Full model, best checkpoint | Multi-step image and video inference | `checkpoints/full/best.pt` || Full model, final checkpoint | Alternative full-model checkpoint | `checkpoints/full/last.pt` || Distilled model, best checkpoint | One-step inference | `distill_checkpoints/best_distill.pt` |Once the model repository is published with this directory structure, download the required weights from the project root:```shellhf download val-utehy/RotEx checkpoints/full/best.pt --local-dir .hf download val-utehy/RotEx distill_checkpoints/best_distill.pt --local-dir .```The final full-model checkpoint is optional:```shellhf download val-utehy/RotEx checkpoints/full/last.pt --local-dir .```The `hf` command is provided by `huggingface_hub`. See the [Hugging Face CLI guide](https://huggingface.co/docs/huggingface_hub/guides/cli) for download and authentication options.Additional placement instructions are available in [checkpoints/README.md](checkpoints/README.md), [checkpoints/full/README.md](checkpoints/full/README.md), and [distill_checkpoints/README.md](distill_checkpoints/README.md).> [!NOTE]> The scripts still contain paths from the original development environment. Pass explicit paths to the multi-step scripts and update the configuration constants in `infer_1step_style.py`. The model configuration is defined in `config.py`; these scripts do not use an `opt.pkl` file.## Usage Guide### 1. Model TrainingThis release contains model components and inference scripts. A standalone training entry point and a distillation training entry point are not included in this directory.### 2. Choosing an Inference Script| Script | Checkpoint | Style input | Output || --- | --- | --- | --- || `infer_1step_style.py` | Distilled | One fixed reference image | One PNG per image and hour for each configured input/output pair; hours 1–24 by default || `infer_multistep.py` | Full | Every image in a style directory | One labeled strip per content/style pair; hours 0–24 by default || `infer_multistep_vid.py` | Full | One fixed reference image | One MP4 with the target hour interpolated across frames |All image-directory scripts read `.jpg`, `.jpeg`, and `.png` files directly inside the configured folders. They do not search subdirectories recursively.### 3. Multi-Step Image InferencePrepare separate content and style directories, for example:```textinputs/├── content/│ ├── scene_001.png│ └── scene_002.jpg└── style/└── night_reference.jpg```Run:```shellpython infer_multistep.py \1 unmodified line--content_dir inputs/content \--style_dir inputs/style \--output_dir outputs/multistep \--denoise_steps 50 \--image_size 384 \--depth_size 48 \--num_seeds 1 \--device cuda \--dtype bfloat16```Each content image is combined with every style image. Results are saved as `<content_stem>__sty_<style_stem>.png`. Each result is a horizontal strip containing the content image, style reference, depth visualization, and generated images for hours 0 through 24. Existing output files are skipped.| Argument | Default | Description || --- | --- | --- || `--denoise_steps` | `50` | Number of Heun integration steps; each step evaluates the model twice || `--image_size` | `384` | Square image resolution used for content and style preprocessing || `--depth_size` | `48` | Depth-map resolution supplied to the model || `--num_seeds` | `1` | Number of independently sampled outputs to average per hour, in decoded image space || `--device` | `cuda` | Device used for inference || `--dtype` | `bfloat16` | Use `bfloat16` for the supplied default GPU path |The hour list is set inside `run_inference()` and is not exposed as a command-line argument. The legacy `--noise_alpha` argument is unused; initialization is sampled from Gaussian noise. The image solver clamps latents to `[-20, 20]` during integration and `[-15, 15]` before decoding.### 4. One-Step Image Inference with a Fixed StyleOpen `infer_1step_style.py` and configure the distilled checkpoint, style image, and dataset paths:```pythonCHECKPOINT = "distill_checkpoints/best_distill.pt"4 unmodified linesHOURS = list(range(1, 25))```Run:```shellpython infer_1step_style.py```The reference style is encoded once and reused for all configured image folders. Outputs follow the `<image_stem>_hXX.png` naming convention. The script writes to the configured output paths and can overwrite existing images with the same names.### 5. Multi-Step Video Inference```shellpython infer_multistep_vid.py \2 unmodified lines--style_path inputs/style/night_reference.jpg \--output_dir outputs/video \--denoise_steps 50 \--image_size 384 \--depth_size 48 \--max_height 384 \--hour_start 0 \--hour_end 24 \--device cuda \--dtype bfloat16 \--no_audio```The script encodes the style reference once, reuses a base noise tensor across frames, and interpolates the target hour from `--hour_start` to `--hour_end` over the input video. The output is named `<video_stem>_chronflux.mp4` and uses the input video's reported frame rate.`--image_size` controls the square resolution used for model inference. `--max_height` controls output resizing, with output dimensions aligned to multiples of 16. The video solver uses latent clamps of `[-8, 8]` during integration and `[-6, 6]` before decoding, which differ from the image solver.The example produces a silent video. Audio transfer is optional and requires MoviePy, which is not included in `requirements.txt`; the script falls back to saving the video without audio if transfer fails.### 6. Illumination Control and ReproducibilityThe scripts map hours to the model's illumination angle as follows:```pythonphi = hour * (2 * math.pi / 24.0)```Hours 0 and 24 correspond to the endpoints of one full cycle. The image scripts use discrete hour lists, while the video script supplies intermediate hour values across frames. To render fractional hours in an image script, edit its hour list; the one-step filename formatting must also be adapted if the values are not integers.The image scripts sample new Gaussian noise for each output and do not expose a seed argument. Repeated runs can therefore produce different results. Increasing `--num_seeds` in the multi-step image script averages decoded outputs and increases computation; it is separate from increasing the number of solver steps.## Repository Structure```textRotEx/��── README.md├── config.py├── requirements.txt├── infer_1step_style.py├── infer_multistep.py├── infer_multistep_vid.py├── flux/ # Model, autoencoder, encoders, and utilities├── demo/ # Architecture and qualitative figures├── checkpoints/│ ├── README.md│ ├── ae.safetensors # Download separately│ └── full/│ ├── README.md│ ├── best.pt # Download from the RotEx model repository│ └── last.pt # Optional alternative full checkpoint└── distill_checkpoints/├── README.md└── best_distill.pt # Download from the RotEx model repository```The Python implementation retains internal names such as `ChronFlux` and the `q1_paper` configuration preset. These are the identifiers used by the current inference scripts.## CitationPaper details and the official BibTeX entry will be added when available.## References4 unmodified lines## LicenseA project license has not yet been included in this release. The license will be specified when the repository is published. Consult the respective upstream repositories and model cards for the terms governing pretrained components.12342 unmodified lines789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354551 unmodified line575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001 unmodified line1021031041051061071081091101111121134 unmodified lines1181191201211221231241251261271282 unmodified lines1311321331341351361371381391401411421431444 unmodified lines149150151152# [Official] RotEx: A Rotational Expert Network for Realistic Scene Illumination Variation Synthesis<p align="center">📄 <b>Paper: coming soon</b> | 2 unmodified lines</p><p align="center"><img src="demo/RotEx_Proposed.png" alt="RotEx architecture" width="1100"/></p>## Introduction**RotEx** is a transformer-based image-to-image framework for synthesizing scenes under varying illumination conditions. It combines content latents, depth information, style features, and a continuous time-of-day variable to generate illumination variations of an input scene.### Key Features- **Continuous illumination control:** Generate scene variations across different times of the day.- **Illumination-dependent experts:** Adapt style and image features through time-conditioned expert routing.- **Content and depth conditioning:** Guide synthesis using content latents and estimated scene depth.- **Multi-step and one-step inference:** Support full-model sampling and distilled single-step generation.- **Image and video processing:** Process image directories and videos with reference-style conditioning.## Demo### Illumination Variation<p align="center"><img src="demo/illumination_variation_space.jpg" alt="Illumination variation" width="1000"/></p>### Downstream Trajectory Comparison<p align="center"><img src="demo/VLA_Traj.png" alt="AutoVLA trajectory comparison" width="1100"/></p>## Installation**Requirements:** Python ≥ 3.10, PyTorch ≥ 2.6, a compatible torchvision version, FlashAttention ≥ 2.0, and an NVIDIA GPU with CUDA.```shellgit clone https://github.com/val-utehy/RotEx.gitcd RotExconda create -n rotex python=3.10 -yconda activate rotexpython -m pip install --upgrade pip```Install CUDA-enabled PyTorch and torchvision following the [PyTorch instructions](https://pytorch.org/get-started/locally/), then run:```shellpython -m pip install packaging ninja psutil1 unmodified linepython -m pip install -r requirements.txt```## Pretrained ModelsDownload weights from [Hugging Face](https://huggingface.co/val-utehy/RotEx/tree/main):| Model | Download | Save to || --- | --- | --- || Multi-step | [best.pt](https://huggingface.co/val-utehy/RotEx/resolve/main/checkpoints/full/best.pt?download=true) | `checkpoints/full/best.pt` || Multi-step, final | [last.pt](https://huggingface.co/val-utehy/RotEx/resolve/main/checkpoints/full/last.pt?download=true) | `checkpoints/full/last.pt` || One-step | [best_distill.pt](https://huggingface.co/val-utehy/RotEx/resolve/main/distill_checkpoints/best_distill.pt?download=true) | `distill_checkpoints/best_distill.pt` |```shellhf download val-utehy/RotEx checkpoints/full/best.pt --local-dir .hf download val-utehy/RotEx distill_checkpoints/best_distill.pt --local-dir .hf download black-forest-labs/FLUX.1-dev ae.safetensors --local-dir checkpoints```DINOv2 and Depth Anything V2 are downloaded automatically. Run `hf auth login` if model access requires authentication.### Expected Weights Structure```textRotEx/├── checkpoints/│ ├── ae.safetensors│ └── full/│ ├── best.pt│ └── last.pt # Optional└── distill_checkpoints/└── best_distill.pt```## Usage### 1. TrainingWill be updated soon.### 2. Multi-Step Image Inference```shellpython infer_multistep.py \1 unmodified line--content_dir inputs/content \--style_dir inputs/style \--output_dir outputs/multistep \--denoise_steps 50```### 3. One-Step Image InferenceSet these paths in `infer_1step_style.py`:```pythonCHECKPOINT = "distill_checkpoints/best_distill.pt"4 unmodified linesHOURS = list(range(1, 25))``````shellpython infer_1step_style.py```### 4. Multi-Step Video Inference```shellpython infer_multistep_vid.py \2 unmodified lines--style_path inputs/style/night_reference.jpg \--output_dir outputs/video \--denoise_steps 50 \--hour_start 0 \--hour_end 24 \--no_audio```## Citation<!-- Paper details and the official BibTeX entry will be added when available. -->## References4 unmodified lines## LicenseThis project is licensed under the [Apache License 2.0](LICENSE). Third-party components retain their respective licenses.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253# Pretrained CheckpointsRotEx model weights will be hosted on **Hugging Face**:[RotEx model repository](https://huggingface.co/val-utehy/RotEx)The commands below assume the uploaded files preserve the directory structure shown here.## Directory Layout```textcheckpoints/├── README.md├── ae.safetensors└── full/├── README.md├── best.pt└── last.pt````best.pt` and `last.pt` are full-model checkpoints for `infer_multistep.py` and `infer_multistep_vid.py`. Use the distilled model in [`../distill_checkpoints/`](../distill_checkpoints/README.md) for `infer_1step_style.py`.## Download the Full ModelRun from the project root, the directory containing `config.py`:```shellhf download val-utehy/RotEx checkpoints/full/best.pt --local-dir .```Optionally download the final full-model checkpoint:```shellhf download val-utehy/RotEx checkpoints/full/last.pt --local-dir .```Pass `--checkpoint checkpoints/full/best.pt` to either multi-step inference script. See [`full/README.md`](full/README.md) for examples.## Download the AutoencoderThe FLUX autoencoder is distributed separately by its original provider:[black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev)```shellhf download black-forest-labs/FLUX.1-dev ae.safetensors --local-dir checkpoints```If authentication is required, complete the model's access process and run `hf auth login` first. The inference loader also attempts to download `ae.safetensors` automatically when it is absent from this directory.DINOv2 and Depth Anything V2 are loaded through Transformers into the Hugging Face cache; their weights do not need to be copied into this folder.See the [main README](../README.md) for installation and inference instructions.12345678910111213141516171819# Pretrained CheckpointsWeights: [Hugging Face](https://huggingface.co/val-utehy/RotEx/tree/main).| File | Download | Save to || --- | --- | --- || Full model, best | [best.pt](https://huggingface.co/val-utehy/RotEx/resolve/main/checkpoints/full/best.pt?download=true) | `checkpoints/full/best.pt` || Full model, final | [last.pt](https://huggingface.co/val-utehy/RotEx/resolve/main/checkpoints/full/last.pt?download=true) | `checkpoints/full/last.pt` |Run from the project root:```shellhf download val-utehy/RotEx checkpoints/full/best.pt --local-dir .hf download black-forest-labs/FLUX.1-dev ae.safetensors --local-dir checkpoints```One-step weights: [distill_checkpoints](../distill_checkpoints/README.md).Usage: [main README](../README.md).
123456789101112131 unmodified line1516171819202122232425262728293031323334353637383940414243444546474849# Full-Model WeightsDownload full-model checkpoints from the [RotEx Hugging Face repository](https://huggingface.co/val-utehy/RotEx).Downloads become available after the files are uploaded.| File | Use || --- | --- || `best.pt` | Best full-model checkpoint || `last.pt` | Final full-model checkpoint; optional alternative |Run from the project root:1 unmodified linehf download val-utehy/RotEx checkpoints/full/best.pt --local-dir .```To download the alternative checkpoint:```shellhf download val-utehy/RotEx checkpoints/full/last.pt --local-dir .```The expected local paths are `checkpoints/full/best.pt` and `checkpoints/full/last.pt`.## Image Inference```shellpython infer_multistep.py \--checkpoint checkpoints/full/best.pt \--content_dir inputs/content \--style_dir inputs/style \--output_dir outputs/multistep```## Video Inference```shellpython infer_multistep_vid.py \--checkpoint checkpoints/full/best.pt \--video_path inputs/video.mp4 \--style_path inputs/style/night_reference.jpg \--output_dir outputs/video \--no_audio```These checkpoints are intended for the multi-step scripts. For one-step inference, download `distill_checkpoints/best_distill.pt` and follow the [distilled-checkpoint instructions](../../distill_checkpoints/README.md).See the [main README](../../README.md) for dependencies, auxiliary models, and inference options.1234567891 unmodified line111213141516171819202122# Multi-Step Weights| File | Download || --- | --- || Best checkpoint | [best.pt](https://huggingface.co/val-utehy/RotEx/resolve/main/checkpoints/full/best.pt?download=true) || Final checkpoint | [last.pt](https://huggingface.co/val-utehy/RotEx/resolve/main/checkpoints/full/last.pt?download=true) |Run from the project root:1 unmodified linehf download val-utehy/RotEx checkpoints/full/best.pt --local-dir .```Optional final checkpoint:```shellhf download val-utehy/RotEx checkpoints/full/last.pt --local-dir .```Use with `infer_multistep.py` or `infer_multistep_vid.py`.Usage: [main README](../../README.md).
1234567891011121314151617181920212223242526272829303132333435# Distilled One-Step WeightsDownload the distilled checkpoint from the [RotEx Hugging Face repository](https://huggingface.co/val-utehy/RotEx).Downloads become available after the checkpoint is uploaded.Run from the project root, the directory containing `config.py`:```shellhf download val-utehy/RotEx distill_checkpoints/best_distill.pt --local-dir .```The expected local path is:```textdistill_checkpoints/best_distill.pt```## UsageSet the checkpoint constant in `infer_1step_style.py`:```pythonCHECKPOINT = "distill_checkpoints/best_distill.pt"```Configure the input/output paths in the script, then run:```shellpython infer_1step_style.py````infer_1step_style.py` requires a fixed reference image configured through `FIXED_STYLE_PATH` and input/output folders configured through `DATA_PAIRS`.The script also needs the FLUX autoencoder, DINOv2, and Depth Anything V2 described in the [main README](../README.md). Full-model weights for multi-step inference belong in [`../checkpoints/full/`](../checkpoints/full/README.md).1234567891011121314151617# One-Step WeightsDownload: [best_distill.pt](https://huggingface.co/val-utehy/RotEx/resolve/main/distill_checkpoints/best_distill.pt?download=true).Run from the project root:```shellhf download val-utehy/RotEx distill_checkpoints/best_distill.pt --local-dir .```In `infer_1step_style.py`:```pythonCHECKPOINT = "distill_checkpoints/best_distill.pt"```Usage: [main README](../README.md).
17 unmodified lines18192021222324182 unmodified lines20720820921017 unmodified linesPI = math.pi# ===== MODEL =====CHECKPOINT = "/workspace/ChronFLUX/ChronFlux-v1/distill_checkpoints/rift_1step_epoch_5.pt"# ===== DATA (FIXED MAPPING) =====DATA_PAIRS = [182 unmodified linesif __name__ == "__main__":main()17 unmodified lines18192021222324182 unmodified lines20720820921017 unmodified linesPI = math.pi# ===== MODEL =====CHECKPOINT = "distill_checkpoints/best_distill.pt"# ===== DATA (FIXED MAPPING) =====DATA_PAIRS = [182 unmodified linesif __name__ == "__main__":main()
193 unmodified lines194195196197198199200193 unmodified linesdef main():parser = argparse.ArgumentParser(description="ChronFlux 24-hour inference")parser.add_argument("--checkpoint", type=str, default="/workspace/RIFT-9226/checkpoints/rift_epoch_30.pt")parser.add_argument("--content_dir", type=str, default="/workspace/RIFT/rafael_ds_ver2/img_test/cnt")parser.add_argument("--style_dir", type=str, default="/workspace/RIFT/rafael_ds_ver2/img_test/sty")parser.add_argument("--output_dir", type=str, default="/workspace/RIFT-9226/inference_outputs")193 unmodified lines194195196197198199200193 unmodified linesdef main():parser = argparse.ArgumentParser(description="ChronFlux 24-hour inference")parser.add_argument("--checkpoint", type=str, default="checkpoints/full/best.pt")parser.add_argument("--content_dir", type=str, default="/workspace/RIFT/rafael_ds_ver2/img_test/cnt")parser.add_argument("--style_dir", type=str, default="/workspace/RIFT/rafael_ds_ver2/img_test/sty")parser.add_argument("--output_dir", type=str, default="/workspace/RIFT-9226/inference_outputs")
.gitignoreAdded+13
LICENSEAdded+202
README.md+40-194
checkpoints/README.md+8-42
checkpoints/full/README.md+7-34
distill_checkpoints/README.md+5-23
infer_1step_style.py+2-2
infer_multistep.py+1-1