xulh
commited on
Commit
·
1a3a6e5
1
Parent(s):
9a0053e
代码初始化
Browse files- picture/generalImg.py +1 -1
picture/generalImg.py
CHANGED
@@ -13,7 +13,7 @@ async def generate_image(token: str = Body(...), prompt: str = Body(...)):
|
|
13 |
# 创建InferenceClient
|
14 |
client = InferenceClient("stabilityai/stable-diffusion-3-medium-diffusers", token=token)
|
15 |
# 使用text_to_image方法生成图片
|
16 |
-
image = client.text_to_image(prompt=prompt
|
17 |
|
18 |
# 将PIL.Image对象转换为byte数据
|
19 |
buffered = BytesIO()
|
|
|
13 |
# 创建InferenceClient
|
14 |
client = InferenceClient("stabilityai/stable-diffusion-3-medium-diffusers", token=token)
|
15 |
# 使用text_to_image方法生成图片
|
16 |
+
image = client.text_to_image(prompt=prompt)
|
17 |
|
18 |
# 将PIL.Image对象转换为byte数据
|
19 |
buffered = BytesIO()
|