Giter Site home page Giter Site logo

1073521013 / subject-diffusion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oppo-mente-lab/subject-diffusion

0.0 0.0 0.0 3.15 MB

Subject-Diffusion:Open Domain Personalized Text-to-Image Generation without Test-time Fine-tuning

Home Page: https://arxiv.org/abs/2307.11410

License: MIT License

Shell 2.06% Python 97.94%

subject-diffusion's Introduction

Subject-Diffusion

[Project Page] [Paper]

Requirements

A suitable conda environment named subject-diffusion can be created and activated with:

conda env create -f environment.yaml
conda activate subject-diffusion

Data Prepare

First, you need install GroundingDINO. Then run:

python data_process.py tar_path tar_index_begin tar_index_end output_path

The first parameter represents the data path of webdataset image text pair. The original data can be downloaded by img2dataset command; The last two parameters represent the beginning and end of the index for webdataset data

Training

bash train.sh 0 8

The first parameter represents the global rank of the current process, used for inter process communication. The host with rank=0 is the master node. and the second parameter is the world size. Please review the detailed parameters of model training with train_en.sh script

Inference

We provide a script to generate images using pretrained checkpoints. run

python test.py

TODOs

  • Release inference code
  • Release training code
  • Release data preparation code
  • Release demo
  • Release training data

Acknowledgements

This repository is built on the code of diffusers library. Additionally, we borrow some code from GLIGEN, FastComposer and GlyphDraw.

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.