Skip to content

Commit 9c0cda4

Browse files
committed
Move model key to imageoptions
1 parent fc39ebb commit 9c0cda4

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

src/Requests/Images/Data/ImageOptions.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ abstract class ImageOptions implements Arrayable
99
{
1010
use Makeable;
1111

12+
public ?string $modelName = null;
13+
1214
public ?string $schedulerName = null;
1315

1416
public ?int $numInferenceSteps = null;
@@ -48,6 +50,7 @@ abstract class ImageOptions implements Arrayable
4850
public function toArray(): array
4951
{
5052
return [
53+
'model_name' => $this->modelName,
5154
'scheduler_name' => $this->schedulerName,
5255
'num_inference_steps' => $this->numInferenceSteps,
5356
'guidance_scale' => $this->guidanceScale,
@@ -63,6 +66,19 @@ public function toArray(): array
6366
];
6467
}
6568

69+
/**
70+
* Set the model name for the image.
71+
*
72+
* @param string|null $modelName
73+
* @return $this
74+
*/
75+
public function setModelName(?string $modelName): self
76+
{
77+
$this->modelName = $modelName;
78+
79+
return $this;
80+
}
81+
6682
/**
6783
* Set the scheduler name for the image.
6884
*

src/Requests/Images/Data/TextToImageWithFaceSwapOptions.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
class TextToImageWithFaceSwapOptions extends ImageOptions
66
{
7-
public ?string $modelName = null;
8-
97
public ?float $startAt = null;
108

119
public ?float $endAt = null;
@@ -24,7 +22,6 @@ class TextToImageWithFaceSwapOptions extends ImageOptions
2422
public function toArray(): array
2523
{
2624
return [
27-
'model_name' => $this->modelName,
2825
'start_at' => $this->startAt,
2926
'end_at' => $this->endAt,
3027
'weight' => $this->weight,
@@ -34,19 +31,6 @@ public function toArray(): array
3431
];
3532
}
3633

37-
/**
38-
* Set the model name for the image.
39-
*
40-
* @param string|null $modelName
41-
* @return $this
42-
*/
43-
public function setModelName(?string $modelName): self
44-
{
45-
$this->modelName = $modelName;
46-
47-
return $this;
48-
}
49-
5034
/**
5135
* Set the start merge step for the image.
5236
*

0 commit comments

Comments
 (0)