Add files using upload-large-folder tool
Browse filesFiles changed (3)
- README.mdAdded+76
- SEN12 /config.jsonAdded+32
- SEN12 /diffusion_pytorch_model.safetensorsAdded+3
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576---license: mitlanguage: - enpipeline_tag: image-to-imagelibrary_name: pytorchtags: - e3diff - diffusion - sar-to-optical - image-translation - checkpoint---
> [!WARNING] we do not have a full checkpoint conversion validation, if you encounter pipeline loading failure and unsidered output, please contact me via bili_sakura@zju.edu.cn
# BiliSakura/E3Diff-ckpt
Packaged E3Diff checkpoint for use with `examples/community/e3diff` in `pytorch-image-translation-models`.
## Source repository
- E3Diff (official): [DeepSARRS/E3Diff](https://github.com/DeepSARRS/E3Diff)- Community implementation used here: [Bili-Sakura/pytorch-image-translation-models](https://github.com/Bili-Sakura/pytorch-image-translation-models)
## Variants
| Variant directory | Notes || --- | --- || `SEN12 ` | Flat diffusion checkpoint export (`config.json` + `diffusion_pytorch_model.safetensors`) |
## Repository layout
```textE3Diff-ckpt/ SEN12 / config.json diffusion_pytorch_model.safetensors```
## Usage
Load config and weights from the variant directory directly:
- `config`: `SEN12 /config.json`- `weights`: `SEN12 /diffusion_pytorch_model.safetensors`
### Inference demo (pipeline)
```pythonfrom PIL import Image
from examples.community.e3diff import E3DiffPipeline
pipe = E3DiffPipeline.from_pretrained( "/path/to/E3Diff-ckpt/SEN12 ", device="cuda",)
sar = Image.open("/path/to/sar_input.png").convert("RGB")out = pipe(source_image=sar, num_inference_steps=50, eta=0.8, output_type="pil")out.images[0].save("e3diff_output.png")```
## Citation
```bibtex@ARTICLE{10767752, author={Qin, Jiang and Zou, Bin and Li, Haolin and Zhang, Lamei}, journal={IEEE Geoscience and Remote Sensing Letters}, title={Efficient End-to-End Diffusion Model for One-step SAR-to-Optical Translation}, year={2024}, pages={1-1}, doi={10.1109/LGRS.2024.3506566}}```1234567891011121314151617181920212223242526272829303132{ "format_version": 1, "source_checkpoint": "/root/worksapce/models/raw/E3Diff/I700000_E719_gen.pth", "pipeline": "examples.community.e3diff", "artifact": "diffusion", "unet_config": { "out_channel": 3, "inner_channel": 64, "norm_groups": 32, "channel_mults": [ 1, 2, 4, 8, 16 ], "attn_res": [], "res_blocks": 1, "dropout": 0.0, "image_size": 256, "condition_ch": 3 }, "diffusion_config": { "image_size": 256, "channels": 3, "loss_type": "l1", "conditional": true, "xT_noise_r": 0.1, "n_timestep": 1000, "schedule": "linear" }}123version https://git-lfs.github.com/spec/v1oid sha256:9d01828c8071a07fc4ac3817e3ec9dbba3d7fe1f404c548b55c0c92e3143f9e1size 768318660README.mdAdded+76
SEN12 /config.jsonAdded+32
SEN12 /diffusion_pytorch_model.safetensorsAdded+3