update README.md
Browse files
    	
        README.md
    CHANGED
    
    | @@ -18,4 +18,82 @@ tags: | |
| 18 | 
             
            - effectiveness
         | 
| 19 | 
             
            - generalization
         | 
| 20 | 
             
            - weak-to-strong guidance
         | 
| 21 | 
            -
            ---
         | 
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 18 | 
             
            - effectiveness
         | 
| 19 | 
             
            - generalization
         | 
| 20 | 
             
            - weak-to-strong guidance
         | 
| 21 | 
            +
            ---
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            # The Official Implementation of our Arxiv 2025 paper:
         | 
| 24 | 
            +
             | 
| 25 | 
            +
            > **[CoRe^2: _Collect, Reflect and Refine_ to Generate Better and Faster](https://arxiv.org/abs/2503.09662)** <br>
         | 
| 26 | 
            +
             | 
| 27 | 
            +
            Authors:
         | 
| 28 | 
            +
             | 
| 29 | 
            +
            >**<em>Shitong Shao, Zikai Zhou, Dian Xie, Yuetong Fang, Tian Ye, Lichen Bai</em> and <em>Zeke Xie*</em>** <br>
         | 
| 30 | 
            +
            > xLeaf Lab, HKUST (GZ) <br>
         | 
| 31 | 
            +
            > *: Corresponding author
         | 
| 32 | 
            +
             | 
| 33 | 
            +
            ## New
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            - [x] Release the inference code of SD3.5 and SDXL.
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            - [ ] Release the inference code of FLUX.
         | 
| 38 | 
            +
             | 
| 39 | 
            +
            - [ ] Release the inference code of LlamaGen.
         | 
| 40 | 
            +
             | 
| 41 | 
            +
            - [ ] Release the implementation of the Collect phase.
         | 
| 42 | 
            +
             | 
| 43 | 
            +
            - [ ] Release the implementation of the Reflect phase.
         | 
| 44 | 
            +
             | 
| 45 | 
            +
             | 
| 46 | 
            +
            ## Overview
         | 
| 47 | 
            +
             | 
| 48 | 
            +
            This guide provides instructions on how to use the CoRe^2.
         | 
| 49 | 
            +
             | 
| 50 | 
            +
            Here we provide the inference code which supports different models like ***Stable Diffusion XL, Stable Diffusion 3.5 Large.***
         | 
| 51 | 
            +
             | 
| 52 | 
            +
            ## Requirements
         | 
| 53 | 
            +
             | 
| 54 | 
            +
            - `python version == 3.8`
         | 
| 55 | 
            +
            - `pytorch with cuda version`
         | 
| 56 | 
            +
            - `diffusers`
         | 
| 57 | 
            +
            - `PIL`
         | 
| 58 | 
            +
            - `bitsandbytes`
         | 
| 59 | 
            +
            - `numpy`
         | 
| 60 | 
            +
            - `timm`
         | 
| 61 | 
            +
            - `argparse`
         | 
| 62 | 
            +
            - `einops`
         | 
| 63 | 
            +
             | 
| 64 | 
            +
            ## Installation🚀️
         | 
| 65 | 
            +
             | 
| 66 | 
            +
            Make sure you have successfully built `python` environment and installed `pytorch` with cuda version. Before running the script, ensure you have all the required packages installed. You can install them using:
         | 
| 67 | 
            +
             | 
| 68 | 
            +
            ```bash
         | 
| 69 | 
            +
            pip install diffusers, PIL, numpy, timm, argparse, einops
         | 
| 70 | 
            +
            ```
         | 
| 71 | 
            +
             | 
| 72 | 
            +
            ## Usage👀️ 
         | 
| 73 | 
            +
             | 
| 74 | 
            +
            To use the CoRe^2 pipeline, you need to run the `sample_img.py` script with appropriate command-line arguments. Below are the available options:
         | 
| 75 | 
            +
             | 
| 76 | 
            +
            ### Command-Line Arguments
         | 
| 77 | 
            +
             | 
| 78 | 
            +
            - `--pipeline`: Select the model pipeline (`sdxl`, `sd35`). Default is `sdxl`.
         | 
| 79 | 
            +
            - `--prompt`: The textual prompt based on which the image will be generated. Default is "Mickey Mouse painting by Frank Frazetta."
         | 
| 80 | 
            +
            - `--inference-step`: Number of inference steps for the diffusion process. Default is 50.
         | 
| 81 | 
            +
            - `--cfg`: Classifier-free guidance scale. Default is 5.5.
         | 
| 82 | 
            +
            - `--pretrained-path`: Path to the pretrained model weights. Default is a specified path in the script.
         | 
| 83 | 
            +
            - `--size`: The size (height and width) of the generated image. Default is 1024.
         | 
| 84 | 
            +
            - `--method`: Select the inference method (`standard`, `core`, `zigzag`, `z-core`)
         | 
| 85 | 
            +
             | 
| 86 | 
            +
            ### Running the Script
         | 
| 87 | 
            +
             | 
| 88 | 
            +
            Run the script from the command line by navigating to the directory containing `sample_img.py` and executing:
         | 
| 89 | 
            +
             | 
| 90 | 
            +
            ```
         | 
| 91 | 
            +
            python sample_img.py --pipeline sdxl --prompt "A banana on the left of an apple." --size 1024
         | 
| 92 | 
            +
            ```
         | 
| 93 | 
            +
             | 
| 94 | 
            +
            This command will generate an image based on the prompt using the Stable Diffusion XL model with an image size of 1024x1024 pixels.
         | 
| 95 | 
            +
             | 
| 96 | 
            +
            ### Output🎉️ 
         | 
| 97 | 
            +
             | 
| 98 | 
            +
            The script will save one image.
         | 
| 99 | 
            +
             | 
    	
        readme.md
    DELETED
    
    | @@ -1,83 +0,0 @@ | |
| 1 | 
            -
            # The Official Implementation of our Arxiv 2025 paper:
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            > **[CoRe^2: _Collect, Reflect and Refine_ to Generate Better and Faster](https://arxiv.org/abs/2503.09662)** <br>
         | 
| 4 | 
            -
             | 
| 5 | 
            -
            Authors:
         | 
| 6 | 
            -
             | 
| 7 | 
            -
            >**<em>Shitong Shao, Zikai Zhou, Dian Xie, Yuetong Fang, Tian Ye, Lichen Bai</em> and <em>Zeke Xie*</em>** <br>
         | 
| 8 | 
            -
            > xLeaf Lab, HKUST (GZ) <br>
         | 
| 9 | 
            -
            > *: Corresponding author
         | 
| 10 | 
            -
             | 
| 11 | 
            -
            ## New
         | 
| 12 | 
            -
             | 
| 13 | 
            -
            - [x] Release the inference code of SD3.5 and SDXL.
         | 
| 14 | 
            -
             | 
| 15 | 
            -
            - [ ] Release the inference code of FLUX.
         | 
| 16 | 
            -
             | 
| 17 | 
            -
            - [ ] Release the inference code of LlamaGen.
         | 
| 18 | 
            -
             | 
| 19 | 
            -
            - [ ] Release the implementation of the Collect phase.
         | 
| 20 | 
            -
             | 
| 21 | 
            -
            - [ ] Release the implementation of the Reflect phase.
         | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
            ## Overview
         | 
| 25 | 
            -
             | 
| 26 | 
            -
            This guide provides instructions on how to use the CoRe^2.
         | 
| 27 | 
            -
             | 
| 28 | 
            -
            Here we provide the inference code which supports different models like ***Stable Diffusion XL, Stable Diffusion 3.5 Large.***
         | 
| 29 | 
            -
             | 
| 30 | 
            -
            ## Requirements
         | 
| 31 | 
            -
             | 
| 32 | 
            -
            - `python version == 3.8`
         | 
| 33 | 
            -
            - `pytorch with cuda version`
         | 
| 34 | 
            -
            - `diffusers`
         | 
| 35 | 
            -
            - `PIL`
         | 
| 36 | 
            -
            - `bitsandbytes`
         | 
| 37 | 
            -
            - `numpy`
         | 
| 38 | 
            -
            - `timm`
         | 
| 39 | 
            -
            - `argparse`
         | 
| 40 | 
            -
            - `einops`
         | 
| 41 | 
            -
             | 
| 42 | 
            -
            ## Installation🚀️
         | 
| 43 | 
            -
             | 
| 44 | 
            -
            Make sure you have successfully built `python` environment and installed `pytorch` with cuda version. Before running the script, ensure you have all the required packages installed. You can install them using:
         | 
| 45 | 
            -
             | 
| 46 | 
            -
            ```bash
         | 
| 47 | 
            -
            pip install diffusers, PIL, numpy, timm, argparse, einops
         | 
| 48 | 
            -
            ```
         | 
| 49 | 
            -
             | 
| 50 | 
            -
            ## Usage👀️ 
         | 
| 51 | 
            -
             | 
| 52 | 
            -
            To use the CoRe^2 pipeline, you need to run the `sample_img.py` script with appropriate command-line arguments. Below are the available options:
         | 
| 53 | 
            -
             | 
| 54 | 
            -
            ### Command-Line Arguments
         | 
| 55 | 
            -
             | 
| 56 | 
            -
            - `--pipeline`: Select the model pipeline (`sdxl`, `sd35`). Default is `sdxl`.
         | 
| 57 | 
            -
            - `--prompt`: The textual prompt based on which the image will be generated. Default is "Mickey Mouse painting by Frank Frazetta."
         | 
| 58 | 
            -
            - `--inference-step`: Number of inference steps for the diffusion process. Default is 50.
         | 
| 59 | 
            -
            - `--cfg`: Classifier-free guidance scale. Default is 5.5.
         | 
| 60 | 
            -
            - `--pretrained-path`: Path to the pretrained model weights. Default is a specified path in the script.
         | 
| 61 | 
            -
            - `--size`: The size (height and width) of the generated image. Default is 1024.
         | 
| 62 | 
            -
            - `--method`: Select the inference method (`standard`, `core`, `zigzag`, `z-core`)
         | 
| 63 | 
            -
             | 
| 64 | 
            -
            ### Running the Script
         | 
| 65 | 
            -
             | 
| 66 | 
            -
            Run the script from the command line by navigating to the directory containing `sample_img.py` and executing:
         | 
| 67 | 
            -
             | 
| 68 | 
            -
            ```
         | 
| 69 | 
            -
            python sample_img.py --pipeline sdxl --prompt "A banana on the left of an apple." --size 1024
         | 
| 70 | 
            -
            ```
         | 
| 71 | 
            -
             | 
| 72 | 
            -
            This command will generate an image based on the prompt using the Stable Diffusion XL model with an image size of 1024x1024 pixels.
         | 
| 73 | 
            -
             | 
| 74 | 
            -
            ### Output🎉️ 
         | 
| 75 | 
            -
             | 
| 76 | 
            -
            The script will save one image:
         | 
| 77 | 
            -
             | 
| 78 | 
            -
            ## Pre-trained Weights Download❤️
         | 
| 79 | 
            -
             | 
| 80 | 
            -
            We provide the pre-trained CoRe^2 weights of Stable Diffusion XL, and Stable Diffusion 3.5 Large with https://drive.google.com/drive/folders/1alJco6X3cFw4oHTD9SifvS7apc3AwG8I?usp=drive_link
         | 
| 81 | 
            -
             | 
| 82 | 
            -
             | 
| 83 | 
            -
             | 
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 

