https://github.com/bytedance/multi-reward-editing

Multi-Reward as Condition for Instruction-Based Image Editing

https://github.com/bytedance/multi-reward-editing

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.9%) to scientific vocabulary

Keywords

research
Last synced: 10 months ago · JSON representation

Repository

Multi-Reward as Condition for Instruction-Based Image Editing

Basic Info
  • Host: GitHub
  • Owner: bytedance
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 242 KB
Statistics
  • Stars: 28
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
research
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Multi-Reward as Condition for Instruction-Based Image Editing

🔮 Welcome to the official code repository for Multi-Reward as Condition for Instruction-Based Image Editing. We're excited to share our work with you, please bear with us as we prepare code. Stay tuned for the reveal!

Architecture

image

Implementation

Dataset Preparation

Download the dataset from Hugging Face

Model Preparation

Download the model from Hugging Face

Requirements

```shell

Python 3.9, PyTorch 2.1.0 with CUDA 12.2

pip3 install -r requirements.txt ```

Training and Evaluation

Please utilize the script provided below: ```shell

Training

python3 -m torch.distributed.launch \ --nnodes $WORKERNUM \ --noderank $ID \ --nprocpernode $WORKERGPU \ --masteraddr $METISWORKER0HOST \ --masterport $PORT \ trainsd15.py \ --stage=2 \ --pretrainedmodelnameorpath=$STAGE1MODELPATH \ --resolution=256 --randomflip \ --trainbatchsize=4 --gradientaccumulationsteps=4 \ --maxtrainsteps=10000 --checkpointingsteps=500 \ --learningrate=5e-5 --lrwarmupsteps=0 \ --conditioningdropoutprob=0.05 \ --imageencoderpath=./CLIP-ViT-H-14-laion2B-s32B-b79K \ --outputdir=$OUTPUTDIR

Evaluation

python3 eval.py --modelpath=$STAGE2MODEL_PATH ```

Citation

If you find this project useful in your research, please consider citing: @article{gu2024multi, title={Multi-Reward as Condition for Instruction-based Image Editing}, author={Gu, Xin and Li, Ming and Zhang, Libo and Chen, Fan and Wen, Longyin and Luo, Tiejian and Zhu, Sijie}, journal={arXiv preprint arXiv:2411.04713}, year={2024} }

Owner

  • Name: Bytedance Inc.
  • Login: bytedance
  • Kind: organization
  • Location: Singapore

GitHub Events

Total
  • Issues event: 10
  • Watch event: 41
  • Issue comment event: 1
  • Push event: 1
  • Public event: 1
Last Year
  • Issues event: 10
  • Watch event: 41
  • Issue comment event: 1
  • Push event: 1
  • Public event: 1

Dependencies

requirements.txt pypi
  • accelerate *
  • bytedlogid *
  • datasets *
  • diffusers ==0.29.0
  • httpx ==0.23.0
  • numpy ==1.23.2
  • openai *
  • sentencepiece ==0.1.99
  • torchmetrics ==1.0.0
  • transformers ==4.43.0
  • xformers ==0.0.22.post7