xulh commited on
Commit
433854d
·
1 Parent(s): 61f43ff

代码初始化

Browse files
Files changed (1) hide show
  1. picture/generalImg.py +1 -1
picture/generalImg.py CHANGED
@@ -11,7 +11,7 @@ routerImg = APIRouter()
11
  async def generate_image(token: str = Body(...), prompt: str = Body(...)):
12
  try:
13
  # 创建InferenceClient
14
- client = InferenceClient("stabilityai/stable-diffusion", token=token)
15
  # 使用text_to_image方法生成图片
16
  image = client.text_to_image(prompt=prompt, height=256, width=256,
17
  negative_prompt="low quality, blurry, bad anatomy")
 
11
  async def generate_image(token: str = Body(...), prompt: str = Body(...)):
12
  try:
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, height=256, width=256,
17
  negative_prompt="low quality, blurry, bad anatomy")