Spaces:
Running
Running
Commit
·
2e90434
1
Parent(s):
b2aaffb
added hunyuan
Browse files- static/script.js +6 -3
- templates/index.html +1 -0
static/script.js
CHANGED
|
@@ -99,7 +99,8 @@ function handleImageSizeChange() {
|
|
| 99 |
|
| 100 |
// Handle model dropdown change
|
| 101 |
function handleModelChange() {
|
| 102 |
-
const isTextToImage = modelSelect.value === 'fal-ai/bytedance/seedream/v4/text-to-image'
|
|
|
|
| 103 |
|
| 104 |
if (isTextToImage) {
|
| 105 |
promptTitle.textContent = 'Generation Prompt';
|
|
@@ -601,7 +602,8 @@ async function generateEdit() {
|
|
| 601 |
}
|
| 602 |
|
| 603 |
const selectedModel = modelSelect.value;
|
| 604 |
-
const isTextToImage = selectedModel === 'fal-ai/bytedance/seedream/v4/text-to-image'
|
|
|
|
| 605 |
|
| 606 |
// Prepare upload progress UI early if there are base64 uploads
|
| 607 |
const base64Images = uploadedImages.filter(img => img.startsWith('data:'));
|
|
@@ -901,7 +903,8 @@ async function useAsInput(imageId, imageSrc) {
|
|
| 901 |
try {
|
| 902 |
// Switch to edit mode if in text-to-image mode
|
| 903 |
const currentModel = modelSelect.value;
|
| 904 |
-
if (currentModel === 'fal-ai/bytedance/seedream/v4/text-to-image'
|
|
|
|
| 905 |
modelSelect.value = 'fal-ai/bytedance/seedream/v4/edit';
|
| 906 |
handleModelChange();
|
| 907 |
showStatus('Switched to Image Edit mode', 'info');
|
|
|
|
| 99 |
|
| 100 |
// Handle model dropdown change
|
| 101 |
function handleModelChange() {
|
| 102 |
+
const isTextToImage = modelSelect.value === 'fal-ai/bytedance/seedream/v4/text-to-image' ||
|
| 103 |
+
modelSelect.value === 'fal-ai/hunyuan-image/v3/text-to-image';
|
| 104 |
|
| 105 |
if (isTextToImage) {
|
| 106 |
promptTitle.textContent = 'Generation Prompt';
|
|
|
|
| 602 |
}
|
| 603 |
|
| 604 |
const selectedModel = modelSelect.value;
|
| 605 |
+
const isTextToImage = selectedModel === 'fal-ai/bytedance/seedream/v4/text-to-image' ||
|
| 606 |
+
selectedModel === 'fal-ai/hunyuan-image/v3/text-to-image';
|
| 607 |
|
| 608 |
// Prepare upload progress UI early if there are base64 uploads
|
| 609 |
const base64Images = uploadedImages.filter(img => img.startsWith('data:'));
|
|
|
|
| 903 |
try {
|
| 904 |
// Switch to edit mode if in text-to-image mode
|
| 905 |
const currentModel = modelSelect.value;
|
| 906 |
+
if (currentModel === 'fal-ai/bytedance/seedream/v4/text-to-image' ||
|
| 907 |
+
currentModel === 'fal-ai/hunyuan-image/v3/text-to-image') {
|
| 908 |
modelSelect.value = 'fal-ai/bytedance/seedream/v4/edit';
|
| 909 |
handleModelChange();
|
| 910 |
showStatus('Switched to Image Edit mode', 'info');
|
templates/index.html
CHANGED
|
@@ -30,6 +30,7 @@
|
|
| 30 |
<option value="fal-ai/bytedance/seedream/v4/edit">Image Edit</option>
|
| 31 |
<option value="fal-ai/qwen-image-edit-plus">Image Edit (Qwen)</option>
|
| 32 |
<option value="fal-ai/bytedance/seedream/v4/text-to-image">Text to Image</option>
|
|
|
|
| 33 |
</select>
|
| 34 |
<small class="help-text">Select the model for generation</small>
|
| 35 |
</div>
|
|
|
|
| 30 |
<option value="fal-ai/bytedance/seedream/v4/edit">Image Edit</option>
|
| 31 |
<option value="fal-ai/qwen-image-edit-plus">Image Edit (Qwen)</option>
|
| 32 |
<option value="fal-ai/bytedance/seedream/v4/text-to-image">Text to Image</option>
|
| 33 |
+
<option value="fal-ai/hunyuan-image/v3/text-to-image">Text to Image (Hunyuan v3)</option>
|
| 34 |
</select>
|
| 35 |
<small class="help-text">Select the model for generation</small>
|
| 36 |
</div>
|