repair /docs page

This commit is contained in:
AUTOMATIC1111 2023-08-14 09:48:40 +03:00
parent f37cc5f5e1
commit c7c16f805c
2 changed files with 7 additions and 5 deletions

View File

@ -50,10 +50,12 @@ class PydanticModelGenerator:
additional_fields = None,
):
def field_type_generator(k, v):
# field_type = str if not overrides.get(k) else overrides[k]["type"]
# print(k, v.annotation, v.default)
field_type = v.annotation
if field_type == 'Image':
# images are sent as base64 strings via API
field_type = 'str'
return Optional[field_type]
def merge_class_params(class_):
@ -63,7 +65,6 @@ class PydanticModelGenerator:
parameters = {**parameters, **inspect.signature(classes.__init__).parameters}
return parameters
self._model_name = model_name
self._class_data = merge_class_params(class_instance)
@ -72,7 +73,7 @@ class PydanticModelGenerator:
field=underscore(k),
field_alias=k,
field_type=field_type_generator(k, v),
field_value=v.default
field_value=None if isinstance(v.default, property) else v.default
)
for (k,v) in self._class_data.items() if k not in API_NOT_ALLOWED
]

View File

@ -114,7 +114,7 @@ class StableDiffusionProcessing:
prompt: str = ""
prompt_for_display: str = None
negative_prompt: str = ""
styles: list[str] = field(default_factory=list)
styles: list[str] = None
seed: int = -1
subseed: int = -1
subseed_strength: float = 0
@ -199,6 +199,7 @@ class StableDiffusionProcessing:
print("sampler_index argument for StableDiffusionProcessing does not do anything; use sampler_name", file=sys.stderr)
self.comments = {}
self.styles = []
self.sampler_noise_scheduler_override = None
self.s_min_uncond = self.s_min_uncond if self.s_min_uncond is not None else opts.s_min_uncond