Views
No views yet
Shitong Shao, Zikai Zhou, Dian Xie, Yuetong Fang, Tian Ye, Lichen Bai and Zeke Xie*
xLeaf Lab, HKUST (GZ)
*: Corresponding author
python version == 3.8pytorch with cuda versiondiffusersPILbitsandbytesnumpytimmargparseeinopspython environment and installed pytorch with cuda version. Before running the script, ensure you have all the required packages installed. You can install them using:pip install diffusers, PIL, numpy, timm, argparse, einopssample_img.py script with appropriate command-line arguments. Below are the available options:--pipeline: Select the model pipeline (sdxl, sd35). Default is sdxl.--prompt: The textual prompt based on which the image will be generated. Default is "Mickey Mouse painting by Frank Frazetta."--inference-step: Number of inference steps for the diffusion process. Default is 50.--cfg: Classifier-free guidance scale. Default is 5.5.--pretrained-path: Path to the pretrained model weights. Default is a specified path in the script.--size: The size (height and width) of the generated image. Default is 1024.--method: Select the inference method (standard, core, zigzag, z-core)sample_img.py and executing:python sample_img.py --pipeline sdxl --prompt "A banana on the left of an apple." --size 1024