Skip to content

Commit 86ef242

Browse files
committed
Readded missing lora parameters on image requests
1 parent 3518325 commit 86ef242

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/Requests/Images/Data/ImageOptions.php

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

2020
public ?int $priority = null;
2121

22+
public ?string $loraWeightName = null;
23+
24+
public ?float $loraScale = null;
25+
2226
/**
2327
* This is only needed on model: bodies-xl-00001.safetensors, when we switch to the new model that Boris is training (expected to
2428
* arrive on October 2nd), we can clear this. This model doesn't need a negative prompt. It also doesn't need Lora's probably
@@ -42,6 +46,8 @@ public function toArray(): array
4246
'webhook_urls' => $this->webhookUrls,
4347
'priority' => $this->priority,
4448
'negative_prompt' => $this->negativePrompt,
49+
'lora_weight_name' => $this->loraWeightName,
50+
'lora_scale' => $this->loraScale,
4551
];
4652
}
4753

@@ -126,4 +132,30 @@ public function setNegativePrompt(?string $negativePrompt): self
126132

127133
return $this;
128134
}
135+
136+
/**
137+
* Set the lora weight name for the image.
138+
*
139+
* @param string|null $loraWeightName
140+
* @return $this
141+
*/
142+
public function setLoraWeightName(?string $loraWeightName): self
143+
{
144+
$this->loraWeightName = $loraWeightName;
145+
146+
return $this;
147+
}
148+
149+
/**
150+
* Set the lora scale for the image.
151+
*
152+
* @param float|null $loraScale
153+
* @return $this
154+
*/
155+
public function setLoraScale(?float $loraScale): self
156+
{
157+
$this->loraScale = $loraScale;
158+
159+
return $this;
160+
}
129161
}

0 commit comments

Comments
 (0)