Git Product home page Git Product logo

ai-self-training-dpo-sdxl's Introduction

Github stats Top langs

Hi there ๐Ÿ‘‹

  • ๐ŸŽ“ I am an undergraduate student from Huazhong University of Science and Technology.
  • โœจ My area of interest lies in large language models as well as image and video generation.
  • โš—๏ธ I am interning as an AIGC Algorithm Engineer at Tuzhan AI, where I am responsible for the development of image generation algorithms. I am also interning at PKU YuanGroup.

ai-self-training-dpo-sdxl's People

Contributors

qqingzheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ai-self-training-dpo-sdxl's Issues

data question

this work means much to me and thanks! I'm not familiar with image, just curious, for --good_image_column="good_jpg"
--bad_image_column="bad_jpg", is good_jpg and bad_jpg the same picture but with goo/bad fidelity/detail or they can be completely different picture? or is bad_jpg model generated ones or can it be real picture but just with bad quality?

learning rate adjustment

Hello, thank you for your open source. How did you adjust the learning rate? The paper suggests 1e-8 while you used 1e-5, which is quite a big difference. Could you share your adjustment strategy(including some other hyperparameters) ?

Poor dpo_beta default?

The training script uses a default dpo_beta=1, which is far lower than the range suggested by the paper (2000-5000). Is this intentional/oversight?

image

3 parameters in build_dataset.py but 6 parameters in train.py

This is the code in build_dataset.py
def gen():
for key, value in results.items():
yield {
"caption": value["prompt"],
"good_jpg": os.path.join(args.image_dir, f"{key}{value['win']}.png"),
"bad_jpg": os.path.join(args.image_dir, f"{key}
{value['lose']}.png"),
}

This is the code in train.py
def collate_fn(examples):
print(examples[0])
good_model_input = torch.stack(
[torch.tensor(example[args.good_image_column + "_model_input"]) for example in examples]
)
bad_model_input = torch.stack(
[torch.tensor(example[args.bad_image_column + "_model_input"]) for example in examples]
)
original_sizes = [example[args.good_image_column + "_original_sizes"] for example in examples]
crop_top_lefts = [example[args.good_image_column + "_crop_top_lefts"] for example in examples]

    prompt_embeds = torch.stack(
        [torch.tensor(example["prompt_embeds"]) for example in examples]
    )
    pooled_prompt_embeds = torch.stack(
        [torch.tensor(example["pooled_prompt_embeds"]) for example in examples]
    )

    return {
        "good_model_input": good_model_input,
        "bad_model_input": bad_model_input,
        "prompt_embeds": prompt_embeds,
        "pooled_prompt_embeds": pooled_prompt_embeds,
        "original_sizes": original_sizes,
        "crop_top_lefts": crop_top_lefts,
    }

Hello, thank you very much for your code. I have some questions.. Is the data processing method in build_dataset.py different from here? Is there any complete code that can be aligned with the data processing here?
I found that the data in build_dataset.py has three processed parameters, but there are indeed 6 parameters in train.py. Is there a complete code?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.