Skip to content

Commit 76ea053

Browse files
authored
Merge pull request #293 from mrhan1993:patch
- Fix meta_scheme required due to spelling errors - sync v1 endpoint to latest upgrade
2 parents 9be3cdb + fa50724 commit 76ea053

File tree

4 files changed

+198
-149
lines changed

4 files changed

+198
-149
lines changed

fooocusapi/models/common/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class ImageMetaScheme(str, Enum):
9797
A111 = 'a111'
9898

9999

100-
def style_selection_parser(style_selections: str) -> List[str]:
100+
def style_selection_parser(style_selections: str | List[str]) -> List[str]:
101101
"""
102102
Parse style selections, Convert to list
103103
Args:
@@ -136,7 +136,7 @@ def lora_parser(loras: str) -> List[Lora]:
136136
raise RequestValidationError from errs
137137

138138

139-
def outpaint_selections_parser(outpaint_selections: str) -> List[OutpaintExpansion]:
139+
def outpaint_selections_parser(outpaint_selections: str | list[str]) -> List[OutpaintExpansion]:
140140
"""
141141
Parse outpaint selections, Convert to list
142142
Args:

fooocusapi/models/common/requests.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ class CommonRequest(BaseModel):
9292
loras: List[Lora] = Field(default=default_loras_model)
9393
advanced_params: AdvancedParams = AdvancedParams()
9494
save_meta: bool = Field(default=True, description="Save meta data")
95-
meta_scheme: str = Field(defaut='fooocus', description="Meta data scheme, one of [fooocus, a111]")
95+
meta_scheme: str = Field(default='fooocus', description="Meta data scheme, one of [fooocus, a111]")
9696
save_extension: str = Field(default='png', description="Save extension, one of [png, jpg, webp]")
97-
save_name: str = Field(default='', description="Image name for output image, default is a uuid")
97+
save_name: str = Field(default='', description="Image name for output image, default is job id + seq")
9898
read_wildcards_in_order: bool = Field(default=False, description="Read wildcards in order")
9999
require_base64: bool = Field(default=False, description="Return base64 data of generated image")
100100
async_process: bool = Field(default=False, description="Set to true will run async and return job info for retrieve generation result later")

0 commit comments

Comments
 (0)