Code Monkey home page Code Monkey logo

stagpt's Introduction

StaGPT

這是一個使用 ChatGPT 模型進行文字轉圖像的工具,它通過一個 HTTP API 提供服務。

使用者可以透過發送訊息到 ChatGPT,並讓 ChatGPT 將敘述轉為特定的指示詞以獲取相應的圖像,

本專案使用了 Huggingface 的 Anything v4.0 模型。

使用

本專案提供了一個 HTTP 接口,可以通過以下 URL 進行調用圖像生成的功能:

GET /gen?parameters

參數

  • prompt(必需): 要提供給 Huggingface 的提示詞,以生成對應的圖像。

  • seed(可選): 用於生成隨機圖像的種子。如果不指定,將使用默認種子。

範例

ChatGPT

$你的 API 網址$ 替換成 API URL 後發送給 ChatGPT.

早上好, ChatGPT, 麻煩您幫我做一件事情, 我將會在每次對話的時候給你一個句子, 
接著您要將這個句子轉為 Stable Diffusion 可用的關鍵詞, 並用網址將圖片顯示, 格式如下:

(圖片品質修飾詞), (角色形容詞), (外觀形容詞), (風景形容詞)
![{輸入}]($你的 API 網址$/gen?prompt=<經過 URL encoded 後的關鍵詞>)

範例如下:

輸入:
一位白色頭髮, 穿著夾克與圍巾, 長著貓耳朵的女孩正行走在街道上, 笑咪咪地看向我.

輸出:
masterpiece, best quality, 1girl, white hair, medium hair, cat ears, closed eyes, looking at viewer, :3, cute, scarf, jacket, outdoors, street

![一位白色頭髮, 穿著夾克與圍巾, 長著貓耳朵的女孩正行走在街道上, 笑咪咪地看向我.]
($你的 API 網址$/gen?prompt=masterpiece,%20best%20quality,%201girl,%20white%20hair,%20medium%20hair,%20cat%20ears,%20closed%20eyes,%20looking%20at%20viewer,%20:3,%20cute,%20scarf,%20jacket,%20outdoors,%20streets)

授權

這個工具是根據 MIT 授權條款開源的,詳細請參考 LICENSE 文件。

stagpt's People

Contributors

nct-skyouo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.