File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ abstract class ImageOptions implements Arrayable
9
9
{
10
10
use Makeable;
11
11
12
+ public ?string $ modelName = null ;
13
+
12
14
public ?string $ schedulerName = null ;
13
15
14
16
public ?int $ numInferenceSteps = null ;
@@ -48,6 +50,7 @@ abstract class ImageOptions implements Arrayable
48
50
public function toArray (): array
49
51
{
50
52
return [
53
+ 'model_name ' => $ this ->modelName ,
51
54
'scheduler_name ' => $ this ->schedulerName ,
52
55
'num_inference_steps ' => $ this ->numInferenceSteps ,
53
56
'guidance_scale ' => $ this ->guidanceScale ,
@@ -63,6 +66,19 @@ public function toArray(): array
63
66
];
64
67
}
65
68
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
+
66
82
/**
67
83
* Set the scheduler name for the image.
68
84
*
Original file line number Diff line number Diff line change 4
4
5
5
class TextToImageWithFaceSwapOptions extends ImageOptions
6
6
{
7
- public ?string $ modelName = null ;
8
-
9
7
public ?float $ startAt = null ;
10
8
11
9
public ?float $ endAt = null ;
@@ -24,7 +22,6 @@ class TextToImageWithFaceSwapOptions extends ImageOptions
24
22
public function toArray (): array
25
23
{
26
24
return [
27
- 'model_name ' => $ this ->modelName ,
28
25
'start_at ' => $ this ->startAt ,
29
26
'end_at ' => $ this ->endAt ,
30
27
'weight ' => $ this ->weight ,
@@ -34,19 +31,6 @@ public function toArray(): array
34
31
];
35
32
}
36
33
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
-
50
34
/**
51
35
* Set the start merge step for the image.
52
36
*
You can’t perform that action at this time.
0 commit comments