Spaces:
Sleeping
Sleeping
fk
Browse files- models/text_to_image.py +2 -2
models/text_to_image.py
CHANGED
@@ -5,8 +5,8 @@ from typing import List, Optional
|
|
5 |
class TextToImageRequest(BaseModel):
|
6 |
prompt: str = Field(..., description="The prompt to generate an image from.")
|
7 |
negative_prompt: Optional[List[str]] = Field(None, description="One or several prompts to guide what NOT to include in image generation.")
|
8 |
-
height: Optional[
|
9 |
-
width: Optional[
|
10 |
num_inference_steps: Optional[int] = Field(None, description="The number of denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference.", ge=1, le=500)
|
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.", ge=1, le=20)
|
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.")
|
|
|
5 |
class TextToImageRequest(BaseModel):
|
6 |
prompt: str = Field(..., description="The prompt to generate an image from.")
|
7 |
negative_prompt: Optional[List[str]] = Field(None, description="One or several prompts to guide what NOT to include in image generation.")
|
8 |
+
height: Optional[int] = Field(None, description="The height in pixels of the image to generate.", ge=64, le=2048)
|
9 |
+
width: Optional[int] = Field(None, description="The width in pixels of the image to generate.", ge=64, le=2048)
|
10 |
num_inference_steps: Optional[int] = Field(None, description="The number of denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference.", ge=1, le=500)
|
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.", ge=1, le=20)
|
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.")
|