diff --git a/src/router/prediction.py b/src/router/prediction.py index 281afa5..9e37bc9 100644 --- a/src/router/prediction.py +++ b/src/router/prediction.py @@ -126,6 +126,6 @@ async def get_tx_hash(task_id: str): ) return ImageGenerationTxHashResponse( status=data["status"], - tx_hash=data["tx_hash"], + result=data["tx_hash"], updated_at=data["updated_at"], ) diff --git a/src/schemas.py b/src/schemas.py index a53da5a..0fe02e2 100644 --- a/src/schemas.py +++ b/src/schemas.py @@ -22,13 +22,13 @@ class ImageGenerationParams(BaseModel): description="prompt value that you do not want to see in the resulting image", ) steps: int = Field( - default=50, ge=1, le=100, description="more steps can increase quality but will take longer to generate" + default=30, ge=10, le=150, description="more steps can increase quality but will take longer to generate" ) seed: int = Field(default=1, ge=0, le=4294967295) - width: int = Field(default=512, ge=512, le=1024) - height: int = Field(default=512, ge=512, le=1024) + width: int = Field(default=768, ge=512, le=1024) + height: int = Field(default=768, ge=512, le=1024) images: int = Field(2, ge=1, le=4, description="How many images you wish to generate") - guidance_scale: float = Field(7.5, ge=0, le=50, description="how much the prompt will influence the results") + guidance_scale: float = Field(7, ge=0, le=20, description="how much the prompt will influence the results") model_id: ModelEnum = Field(ModelEnum.STABLE_DIFFUSION_V2_1_768, description="diffusion model id") scheduler_type: SchedulerType = Field(SchedulerType.DDIM, description="Scheduler Type") @@ -74,5 +74,5 @@ class ImageGenerationResponse(BaseModel): class ImageGenerationTxHashResponse(BaseModel): status: ResponseStatusEnum = ResponseStatusEnum.PENDING - tx_hash: Dict[ResponseStatusEnum, str] + result: Dict[ResponseStatusEnum, str] updated_at: int = 0