Skip to content

Commit dddbfcd

Browse files
authored
💄 style(image): optimize UX and fix fal pricing (lobehub#9592)
1 parent 5719e4f commit dddbfcd

File tree

2 files changed

+28
-25
lines changed

2 files changed

+28
-25
lines changed

packages/model-bank/src/aiModels/fal.ts

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,24 @@ export const qwenEditParamsSchema: ModelParamsSchema = {
3939
width: { default: 1328, max: 1536, min: 512, step: 1 },
4040
};
4141

42+
export const huanyuanImageParamsSchema: ModelParamsSchema = {
43+
cfg: { default: 7.5, max: 20, min: 1, step: 0.1 },
44+
prompt: { default: '' },
45+
seed: { default: null },
46+
size: {
47+
default: 'square_hd',
48+
enum: [
49+
'square_hd',
50+
'square',
51+
'portrait_4_3',
52+
'portrait_16_9',
53+
'landscape_4_3',
54+
'landscape_16_9',
55+
],
56+
},
57+
steps: { default: 28, max: 50, min: 1, step: 1 },
58+
};
59+
4260
const falImageModels: AIImageModelCard[] = [
4361
{
4462
description:
@@ -84,23 +102,7 @@ const falImageModels: AIImageModelCard[] = [
84102
displayName: 'HunyuanImage 3.0',
85103
enabled: true,
86104
id: 'fal-ai/hunyuan-image/v3',
87-
parameters: {
88-
cfg: { default: 7.5, max: 20, min: 1, step: 0.1 },
89-
prompt: { default: '' },
90-
seed: { default: null },
91-
size: {
92-
default: 'square_hd',
93-
enum: [
94-
'square_hd',
95-
'square',
96-
'portrait_4_3',
97-
'portrait_16_9',
98-
'landscape_4_3',
99-
'landscape_16_9',
100-
],
101-
},
102-
steps: { default: 28, max: 50, min: 1, step: 1 },
103-
},
105+
parameters: huanyuanImageParamsSchema,
104106
pricing: {
105107
units: [{ name: 'imageGeneration', rate: 0.1, strategy: 'fixed', unit: 'megapixel' }],
106108
},
@@ -197,7 +199,7 @@ const falImageModels: AIImageModelCard[] = [
197199
id: 'fal-ai/qwen-image-edit',
198200
parameters: qwenEditParamsSchema,
199201
pricing: {
200-
units: [{ name: 'imageGeneration', rate: 0.025, strategy: 'fixed', unit: 'image' }],
202+
units: [{ name: 'imageGeneration', rate: 0.03, strategy: 'fixed', unit: 'megapixel' }],
201203
},
202204
releasedAt: '2025-08-19',
203205
type: 'image',

src/app/[variants]/(main)/image/@menu/features/ConfigPanel/components/ImageConfigSkeleton.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ const ImageConfigSkeleton = memo(() => {
1313
<Flexbox gap={32} padding="12px 12px 0 12px" style={{ height: '100%' }}>
1414
{/* Model Selection */}
1515
<Flexbox gap={8}>
16-
<Skeleton.Input size="small" style={{ width: 100 }} />
17-
<Skeleton.Input size="large" style={{ width: '100%' }} />
16+
<Skeleton.Input active size="small" style={{ width: 100 }} />
17+
<Skeleton.Input active size="large" style={{ width: '100%' }} />
1818
</Flexbox>
1919

2020
{/* Image Upload Area */}
2121
<Flexbox gap={8}>
22-
<Skeleton.Input size="small" style={{ width: 60 }} />
22+
<Skeleton.Input active size="small" style={{ width: 60 }} />
2323
<Skeleton.Node
24+
active
2425
style={{
2526
borderRadius: 8,
2627
height: 100,
@@ -32,16 +33,16 @@ const ImageConfigSkeleton = memo(() => {
3233
{/* Parameter Controls */}
3334
{Array.from({ length: 2 }, (_, index) => (
3435
<Flexbox gap={8} key={index}>
35-
<Skeleton.Input size="small" style={{ width: 80 }} />
36-
<Skeleton.Input size="default" style={{ width: '100%' }} />
36+
<Skeleton.Input active size="small" style={{ width: 80 }} />
37+
<Skeleton.Input active size="default" style={{ width: '100%' }} />
3738
</Flexbox>
3839
))}
3940

4041
{/* Image Number Control (Sticky at bottom) */}
4142
<Flexbox padding="12px 0" style={{ marginTop: 'auto' }}>
4243
<Flexbox gap={8}>
43-
<Skeleton.Input size="small" style={{ width: 60 }} />
44-
<Skeleton.Input size="default" style={{ width: '100%' }} />
44+
<Skeleton.Input active size="small" style={{ width: 60 }} />
45+
<Skeleton.Input active size="default" style={{ width: '100%' }} />
4546
</Flexbox>
4647
</Flexbox>
4748
</Flexbox>

0 commit comments

Comments
 (0)