Open Ox2098 opened 1 year ago
Are you going to deploy SDCN in your private network to manage your Stable Diffusion webui instances?
Anything is possible, it all depends on the needs of the business.
I just want something more flexible and lightweight. I'm planning to use curl to make requests, as it's simpler that way
Anything is possible, it all depends on the needs of the business.
I just want something more flexible and lightweight. I'm planning to use curl to make requests, as it's simpler that way
You could use curl to make requests, but you'll need a little more tools to accomplish the full txt2img processes. The commands below may help you.
I assume you are using macOS.
brew install curl jq
One click solution
curl https://raw.githubusercontent.com/fiatrete/SDCN-Stable-Diffusion-Computing-Network/main/example/params-txt2img.json \
| curl --location --request POST 'https://api.sdcn.info/txt2img' \
--header 'Content-Type: application/json' -d @- \
| jq '.images[0]' |tr -d '\"' | tr -d '\\' | base64 -d > out.png
If you want to do some adjustments, you could download the template first.
curl -O https://raw.githubusercontent.com/fiatrete/SDCN-Stable-Diffusion-Computing-Network/main/example/params-txt2img.json
Another one click solution after modified the json
cat params-txt2img.json \
| curl --location --request POST 'https://api.sdcn.info/txt2img' \
--header 'Content-Type: application/json' -d @- \
| jq '.images[0]' |tr -d '\"' | tr -d '\\' | base64 -d > out.png
I think they are pretty simple. I have generated lots of images via cmd :)
Anything is possible, it all depends on the needs of the business. I just want something more flexible and lightweight. I'm planning to use curl to make requests, as it's simpler that way
You could use curl to make requests, but you'll need a little more tools to accomplish the full txt2img processes. The commands below may help you.
Install the requirements
I assume you are using macOS.
brew install curl jq
Execute img2txt via cmd
One click solution
curl https://raw.githubusercontent.com/fiatrete/SDCN-Stable-Diffusion-Computing-Network/main/example/params-txt2img.json \ | curl --location --request POST 'https://api.sdcn.info/txt2img' \ --header 'Content-Type: application/json' -d @- \ | jq '.images[0]' |tr -d '\"' | tr -d '\\' | base64 -d > out.png
If you want to do some adjustments, you could download the template first.
curl -O https://raw.githubusercontent.com/fiatrete/SDCN-Stable-Diffusion-Computing-Network/main/example/params-txt2img.json
Another one click solution after modified the json
cat params-txt2img.json \ | curl --location --request POST 'https://api.sdcn.info/txt2img' \ --header 'Content-Type: application/json' -d @- \ | jq '.images[0]' |tr -d '\"' | tr -d '\\' | base64 -d > out.png
I think they are pretty simple. I have generated lots of images via cmd :)
Good job! Can I include your sample into the project's document?
Good job! Can I include your sample into the project's document?
Sure you can~
I wanna more images :)
Anything is possible, it all depends on the needs of the business. I just want something more flexible and lightweight. I'm planning to use curl to make requests, as it's simpler that way
You could use curl to make requests, but you'll need a little more tools to accomplish the full txt2img processes. The commands below may help you.
Install the requirements
I assume you are using macOS.
brew install curl jq
Execute img2txt via cmd
One click solution
curl https://raw.githubusercontent.com/fiatrete/SDCN-Stable-Diffusion-Computing-Network/main/example/params-txt2img.json \ | curl --location --request POST 'https://api.sdcn.info/txt2img' \ --header 'Content-Type: application/json' -d @- \ | jq '.images[0]' |tr -d '\"' | tr -d '\\' | base64 -d > out.png
If you want to do some adjustments, you could download the template first.
curl -O https://raw.githubusercontent.com/fiatrete/SDCN-Stable-Diffusion-Computing-Network/main/example/params-txt2img.json
Another one click solution after modified the json
cat params-txt2img.json \ | curl --location --request POST 'https://api.sdcn.info/txt2img' \ --header 'Content-Type: application/json' -d @- \ | jq '.images[0]' |tr -d '\"' | tr -d '\\' | base64 -d > out.png
I think they are pretty simple. I have generated lots of images via cmd :)
Good job! Can I include your sample into the project's document?
Nice!Much more esay than Python.
I'm not sure what mechanism is used to call api.sdcn.info, and I hope that the code will be made open source. I've been studying Stable Diffusion WebUI recently, and since it is a local service, some modifications are required to provide network services. Your project meets my needs.
That's a great suggestion! It would be helpful if you could provide a "requirements.txt" file for easy deployment.
generated by the default param are really impressive!