Stability AI changes to models.
> Engine = V2beta Image Generation > Models now shows API models. > Hidden steps, height, etc.
This commit is contained in:
parent
4b356fbc60
commit
84b8f77107
|
@ -368,7 +368,7 @@ function toggleSourceControls() {
|
|||
const source = $(this).data('sd-source').split(',');
|
||||
$(this).toggle(source.includes(extension_settings.sd.source));
|
||||
});
|
||||
const stabilityHiddenControls = $('#sd_steps, #sd_scale, #sd_sampler, #sd_scheduler, #sd_width, #sd_height, #sd_hr_upscaler, #sd_clip_skip');
|
||||
const stabilityHiddenControls = $('#sd_steps, #sd_scale, #sd_sampler, #sd_scheduler, #sd_width, #sd_height, #sd_hr_upscaler, #sd_clip_skip, #sd_steps_value, #sd_scale_value');
|
||||
if (extension_settings.sd.source === sources.stability) {
|
||||
stabilityHiddenControls.hide();
|
||||
$('#sd_resolution').parent().hide();
|
||||
|
@ -1679,21 +1679,29 @@ async function generateStabilityImage(prompt, negativePrompt) {
|
|||
}
|
||||
|
||||
async function loadStabilityModels() {
|
||||
return [
|
||||
{
|
||||
value: 'stable-image-ultra',
|
||||
text: 'Stable Image Ultra',
|
||||
},
|
||||
{
|
||||
value: 'stable-image-core',
|
||||
text: 'Stable Image Core',
|
||||
},
|
||||
{
|
||||
value: 'stable-diffusion-3',
|
||||
text: 'Stable Diffusion 3',
|
||||
},
|
||||
];
|
||||
if (!extension_settings.sd.stability_key) {
|
||||
console.debug('Stability API key is not set.');
|
||||
return [];
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch('/api/sd/stability/models', {
|
||||
method: 'GET',
|
||||
headers: getRequestHeaders(),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('Failed to fetch Stability AI models');
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
return data.map(model => ({ value: model.id, text: model.name }));
|
||||
} catch (error) {
|
||||
console.error('Error fetching Stability AI models:', error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
async function loadPollinationsModels() {
|
||||
return [
|
||||
{
|
||||
|
|
|
@ -207,9 +207,7 @@
|
|||
<div class="flex1">
|
||||
<label for="sd_stability_engine">Engine</label>
|
||||
<select id="sd_stability_engine">
|
||||
<option value="stable-image-ultra">Stable Image Ultra</option>
|
||||
<option value="stable-image-core">Stable Image Core</option>
|
||||
<option value="stable-diffusion-3">Stable Diffusion 3</option>
|
||||
<option value="v2beta">V2beta Image Generation</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex1">
|
||||
|
|
Loading…
Reference in New Issue