ngd1210 commited on
Commit
062a468
·
1 Parent(s): ee3cf74
Files changed (2) hide show
  1. models/text_to_image.py +1 -1
  2. routes/textToImage.py +1 -1
models/text_to_image.py CHANGED
@@ -11,5 +11,5 @@ class TextToImageRequest(BaseModel):
11
  guidance_scale: Optional[float] = Field(None, description="A higher guidance scale value encourages the model to generate images closely linked to the text prompt, but values too high may cause saturation and other artifacts.")
12
  model: Optional[str] = Field(None, description="The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed Inference Endpoint. If not provided, the default recommended text-to-image model will be used.")
13
  scheduler: Optional[str] = Field(None, description="Override the scheduler with a compatible one.")
14
- target_size: Optional[TextToImageTargetSize] = Field(None, description="The size in pixel of the output image")
15
  seed: Optional[int] = Field(None, description="Seed for the random number generator.")
 
11
  guidance_scale: Optional[float] = Field(None, description="A higher guidance scale value encourages the model to generate images closely linked to the text prompt, but values too high may cause saturation and other artifacts.")
12
  model: Optional[str] = Field(None, description="The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed Inference Endpoint. If not provided, the default recommended text-to-image model will be used.")
13
  scheduler: Optional[str] = Field(None, description="Override the scheduler with a compatible one.")
14
+ #target_size: Optional[TextToImageTargetSize] = Field(None, description="The size in pixel of the output image")
15
  seed: Optional[int] = Field(None, description="Seed for the random number generator.")
routes/textToImage.py CHANGED
@@ -16,7 +16,7 @@ async def text_to_image(body: TextToImageRequest):
16
  num_inference_steps=body.num_inference_steps,
17
  guidance_scale=body.guidance_scale,
18
  scheduler=body.scheduler,
19
- target_size=body.target_size,
20
  seed=body.seed
21
  )
22
  img_byte_arr = io.BytesIO()
 
16
  num_inference_steps=body.num_inference_steps,
17
  guidance_scale=body.guidance_scale,
18
  scheduler=body.scheduler,
19
+ # target_size=body.target_size,
20
  seed=body.seed
21
  )
22
  img_byte_arr = io.BytesIO()