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.
中文文档在这里
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.
- Register for a Cloudflare account.
- Create a Workers script: After logging into your Cloudflare account, go to the "Workers" section and create a new Workers script.
- Copy worker.js: Paste this script into the Workers editor.
- Register for a Hugging Face account and configure your account API key.
- Paste your Hugging Face API key into the appropriate place in the script.
- Ensure that the deployed Workers script is valid at the time of deployment and has sufficient resources to handle requests.
- Be careful not to abuse the service and ensure it is used only for legitimate and appropriate purposes.
- 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.
- Legal Use: Ensure compliance with all applicable laws, regulations, and policies.
- AI Creation: This documentation and parts of the code were created by AI; please be aware of this when using it.
This project is licensed under the GPL-3.0 License - for more details, see the LICENSE.md file.
Attribution rights reserved.
- Cloudflare-Workers-Proxy for providing a reference for the web interface design of this project.
- Cloudflare Workers for providing the service logic.
- Hugging Face for powering the drawing model.
MQSI
2024/06/17