CLI utility script to generate images using SDXL 1.0 model. It uses the free inference API from Hugging Face.
This is for demonstration and individual use only.
git clone [email protected]:corbin-c/node-sdxl-cli-hf.git
cd node-sdxl-cli-hf
npm i
echo "HF_TOKEN=your hugging face token" > .env
Images will be saved in the output
directory, along with a prompts.txt
file keeping trace of your prompting history.
Simple prompting:
npm run start "your prompt goes here"
Using a negative prompt with -n
:
npm run start "your prompt goes here" -- -n "negative prompt here"
You can display the generated image after it's been saved using the -x
option. Pass it the image viewer of your choice, for example imv
:
npm run start "your prompt goes here" -- -n "negative prompt here" -x imv