Skip to content

Commit 3518325

Browse files
committed
Moved negative prompt back to general image options
1 parent d1e2aed commit 3518325

File tree

2 files changed

+24
-31
lines changed

2 files changed

+24
-31
lines changed

src/Requests/Images/Data/ImageOptions.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ abstract class ImageOptions implements Arrayable
1919

2020
public ?int $priority = null;
2121

22+
/**
23+
* This is only needed on model: bodies-xl-00001.safetensors, when we switch to the new model that Boris is training (expected to
24+
* arrive on October 2nd), we can clear this. This model doesn't need a negative prompt. It also doesn't need Lora's probably
25+
* (contact Boris for more information on this)
26+
*
27+
* @var string|null
28+
*/
29+
public ?string $negativePrompt = null;
30+
2231
/**
2332
* Return the array representation of the character options.
2433
*
@@ -32,6 +41,7 @@ public function toArray(): array
3241
'guidance_scale' => $this->guidanceScale,
3342
'webhook_urls' => $this->webhookUrls,
3443
'priority' => $this->priority,
44+
'negative_prompt' => $this->negativePrompt,
3545
];
3646
}
3747

@@ -103,4 +113,17 @@ public function setPriority(?int $priority): self
103113

104114
return $this;
105115
}
116+
117+
/**
118+
* Set the negative prompt for the image.
119+
*
120+
* @param string|null $negativePrompt
121+
* @return $this
122+
*/
123+
public function setNegativePrompt(?string $negativePrompt): self
124+
{
125+
$this->negativePrompt = $negativePrompt;
126+
127+
return $this;
128+
}
106129
}

src/Requests/Images/Data/TextToImageOptions.php

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,4 @@
22

33
namespace IntelligentsDev\AiaConnector\Requests\Images\Data;
44

5-
class TextToImageOptions extends ImageOptions
6-
{
7-
/**
8-
* This is only needed on model: bodies-xl-00001.safetensors, when we switch to the new model that Boris is training (expected to
9-
* arrive on October 2nd), we can clear this. This model doesn't need a negative prompt. It also doesn't need Lora's probably
10-
* (contact Boris for more information on this)
11-
*
12-
* @var string|null
13-
*/
14-
public ?string $negativePrompt = null;
15-
16-
public function toArray(): array
17-
{
18-
return [
19-
'negative_prompt' => $this->negativePrompt,
20-
];
21-
}
22-
23-
/**
24-
* Set the negative prompt for the image.
25-
*
26-
* @param string|null $negativePrompt
27-
* @return $this
28-
*/
29-
public function setNegativePrompt(?string $negativePrompt): self
30-
{
31-
$this->negativePrompt = $negativePrompt;
32-
33-
return $this;
34-
}
35-
}
5+
class TextToImageOptions extends ImageOptions {}

0 commit comments

Comments
 (0)