Giter VIP home page Giter VIP logo

align_sd's People

Contributors

tgxs002 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  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  avatar  avatar  avatar  avatar

align_sd's Issues

Count of non-preferrred images

select_training_images.py gives 42201 non-preferred images, which is inconsistent with 21108 mentioned in paper. Is there any other parameter that can be used to exactly reproduce the count of preferred and non-preferred images?

Reproducing table 2 in the paper

Hey, thanks for the great work!

I am interested in reproducing the numbers from table 2 in your paper. Could you please advise on how to do that? Can I directly use the test.json provided in your repo? What exact metric do you use for these results, it wasn't directly clear from the paper. Thanks!

accelerate config

Thanks for your excellent work! I wonder know how you set your accelerate config , like if you use deepspeed .since I tried to use it, but unfortunately I failed. I would be grateful if you could answer my question!

Please, add a license

Dear Authors,

Thank you for your awesome work! Could you please add a license to your repo?

Conversion for stable-diffusion-webui

Hi, great research! Impressed by the results.

For possibly your own interest, and in case anybody else come across this, you can use this conversion script to get the LoRA models functioning with AUTOMATIC1111/stable-diffusion-webui, the interface majority of the SD community uses. Credit to harrywang for the original script.

import re
import os
import argparse
import torch
from safetensors.torch import save_file

def main(args):
    if torch.cuda.is_available():
        device = 'cuda'
        checkpoint = torch.load(args.file, map_location=torch.device('cuda'))
    else:
        device = 'cpu'
        checkpoint = torch.load(args.file, map_location=torch.device('cpu'))
    
    new_dict = dict()
    for idx, key in enumerate(checkpoint):
        new_key = re.sub('\.processor\.', '_', key)
        new_key = re.sub('mid_block\.', 'mid_block_', new_key)
        new_key = re.sub('_lora.up.', '.lora_up.', new_key)
        new_key = re.sub('_lora.down.', '.lora_down.', new_key)
        new_key = re.sub('\.(\d+)\.', '_\\1_', new_key)
        new_key = re.sub('to_out', 'to_out_0', new_key)
        new_key = 'lora_unet_' + new_key

        new_dict[new_key] = checkpoint[key]

    file_name = os.path.splitext(args.file)[0]
    new_lora_name = file_name + '_converted.safetensors'
    print("Saving " + new_lora_name)
    save_file(new_dict, new_lora_name)

def parse_args():
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--file",
        type=str,
        default=None,
        required=True,
    )
    
    args = parser.parse_args()
    return args

if __name__ == "__main__":
    args = parse_args()
    main(args)

About the validation prompt

Could the authors release the validation_prompt.json file? Thus we can repeat the visualization results and make a comparison with the results reported in the paper.

Thanks

about regularization_images data

I am very interested in your work and currently attempting to reproduce your results. I ran the script download_regularization_images.py to download the provided regularization_images data, which consists of image-text pairs. I would like to know how to preprocess it to incorporate it into the LoRA training.Thanks. @tgxs002

Regarding the validity of the Human Preference Classifier

Hi @tgxs002 , thanks for your work, and making the dataset and classifier open-sourced!

As a sanity check, I evaluated your trained HPC on the examples in the training data that are preferred by humans (S1), and the examples in the training data that are unpreferred by humans (S2).

I found that the average HPS in the setting S1 ~ 21.0 whereas the HPC in the setting S2 ~ 20.26. For a good classifier, I was hoping that the scores in the setting S2 be very low as compared to S1, but it is not the case. Does it mean that the HPC is not trained properly, but it seems contradictory because the paper claims that the HPC has good agreement with humans?

And if my evaluation numbers look too off, can you let me know what you are getting at your end?

Share on Hugging Face

Hi ! Thanks for sharing this dataset :)

I was wondering if you planned to share the dataset on Hugging Face as well ? This way anyone in the research community can visualise it online and even load it in one line of python

Alignment and sorting of images based on text

This is a nice tool. As far as I have understood, it generates sequence of images based on text. But,

for the case, where I have sequence of images - frames and some sentences. Is it possible to match the sequence based on sentence text? If there is any way.

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.