Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 2.74 KB

File metadata and controls

49 lines (34 loc) · 2.74 KB

AI Drawing on Cloudflare Workers

This script is based on Cloudflare Workers and implements a simple AI image generator via the Cloudflare Workers service. It provides a simple web interface where users can input descriptions, which the script then sends to a Hugging Face model to generate and display the corresponding image.
中文文档在这里

image

Drawing Model

image Three models are preset:

This model is all runs on the Hugging Face Inference Server.
You can also add other drawing models from Hugging Face and modify the code accordingly.

Deployment Instructions

  1. Register for a Cloudflare account.
  2. Create a Workers script: After logging into your Cloudflare account, go to the "Workers" section and create a new Workers script.
  3. Copy worker.js: Paste this script into the Workers editor.
  4. Register for a Hugging Face account and configure your account API key.
  5. Paste your Hugging Face API key into the appropriate place in the script.

Notes and Disclaimer

  1. Ensure that the deployed Workers script is valid at the time of deployment and has sufficient resources to handle requests.
  2. Be careful not to abuse the service and ensure it is used only for legitimate and appropriate purposes.
  3. Liability Limitation: Use of this script is at your own risk, and the author is not responsible for any issues that may arise from its use.
  4. Legal Use: Ensure compliance with all applicable laws, regulations, and policies.
  5. AI Creation: This documentation and parts of the code were created by AI; please be aware of this when using it.

License

This project is licensed under the GPL-3.0 License - for more details, see the LICENSE.md file.
Attribution rights reserved.

Acknowledgments


MQSI
2024/06/17