Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/router/prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)
10 changes: 5 additions & 5 deletions src/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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