Compare commits

..

2 commits

Author SHA1 Message Date
Manish Tanwar
618273610b Merge branch 'feature-branch' 2025-12-01 12:50:44 +05:30
Manish Tanwar
0528aec6fb Latest Update 2025-12-01 12:29:22 +05:30
8 changed files with 16 additions and 71 deletions

View file

@ -316,3 +316,6 @@ frontend/
- **Image formats**: All Pillow formats accepted, automatically converted to JPEG
- **Auto-deletion**: Jobs automatically deleted 5 seconds after download (no user action needed)
- **Frontend validation**: No backend auth validation - security relies on frontend MSAL
- **Latest Commit for Update**: 12/01/2025 For Last Frame Image Error.

View file

@ -57,8 +57,6 @@ class Config:
SUPPORTED_IMAGE_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.tif', '.webp', '.ico']
MIN_IMAGE_RESOLUTION = (720, 720) # Minimum 720p
SUPPORTED_ASPECT_RATIOS = ['16:9', '9:16']
SUPPORTED_RESOLUTIONS = ['720p', '1080p']
DEFAULT_RESOLUTION = '720p'
# Webhook Configuration
WEBHOOK_URL = os.getenv('WEBHOOK_URL', 'https://hook.us1.make.celonis.com/8ri1h8b2he4wudp2jku69mgcxumzxf3v')

View file

@ -34,7 +34,7 @@ Jinja2==3.1.6
MarkupSafe==3.0.3
numpy==2.3.4
packaging==25.0
Pillow>=10.4.0
Pillow==10.1.0
priority==2.0.0
proto-plus==1.26.1
protobuf==4.25.8

View file

@ -173,7 +173,6 @@ def generate_video():
return jsonify({'error': 'Invalid video_length_sec value - must be a number'}), 400
aspect_ratio = data.get('aspect_ratio', '16:9')
resolution = data.get('resolution', '720p')
person_generation = data.get('person_generation', 'dont_allow')
seed = data.get('seed')
# Handle empty seed values by setting to None
@ -184,7 +183,6 @@ def generate_video():
print(f"DEBUG: Final video_length_sec value: {video_length_sec} (type: {type(video_length_sec)})")
print(f"DEBUG: aspect_ratio: {aspect_ratio}")
print(f"DEBUG: resolution: {resolution}")
print(f"DEBUG: person_generation: {person_generation}")
print(f"DEBUG: seed: {seed}")
print(f"DEBUG: generate_audio: {generate_audio}")
@ -200,16 +198,6 @@ def generate_video():
except Exception as e:
print(f"DEBUG: Error cleaning up image: {e}")
return jsonify({'error': 'Invalid aspect ratio. Must be "16:9" or "9:16"'}), 400
# Validate resolution
if resolution not in Config.SUPPORTED_RESOLUTIONS:
if image_path and os.path.exists(image_path):
try:
os.remove(image_path)
os.rmdir(os.path.join(Config.TEMP_DOWNLOAD_PATH, f"job_{job_id}"))
except Exception as e:
print(f"DEBUG: Error cleaning up image: {e}")
return jsonify({'error': f'Invalid resolution. Must be one of: {", ".join(Config.SUPPORTED_RESOLUTIONS)}'}), 400
# Validate model selection
if model_name and model_name not in Config.SUPPORTED_MODELS:
@ -272,7 +260,6 @@ def generate_video():
model_name=model_name,
video_length_sec=video_length_sec,
aspect_ratio=aspect_ratio,
resolution=resolution,
sample_count=sample_count,
person_generation=person_generation,
image_path=image_path,

View file

@ -287,7 +287,6 @@ def generate_video_async(
model_name: str = None,
video_length_sec: int = 8,
aspect_ratio: str = "16:9",
resolution: str = "720p",
sample_count: int = 1,
person_generation: str = "dont_allow",
image_path: str = None,
@ -338,7 +337,6 @@ def generate_video_async(
'model_name': model_name,
'video_length_sec': video_length_sec,
'aspect_ratio': aspect_ratio,
'resolution': resolution,
'person_generation': person_generation,
'seed': seed,
'generate_audio': generate_audio
@ -368,7 +366,6 @@ def process_video_generation(job_id: str) -> None:
model_name = job['model_name']
video_length_sec = job['video_length_sec']
aspect_ratio = job['aspect_ratio']
resolution = job.get('resolution', '720p')
sample_count = job['videos_requested']
person_generation = job['person_generation']
image_path = job['local_image_path']
@ -624,7 +621,6 @@ def process_video_generation(job_id: str) -> None:
config_kwargs = {
'person_generation': person_generation,
'aspect_ratio': aspect_ratio,
'resolution': resolution,
'output_gcs_uri': output_gcs_uri,
'duration_seconds': video_length_sec,
'generate_audio': generate_audio

View file

@ -1918,8 +1918,7 @@
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"license": "MIT"
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/available-typed-arrays": {
"version": "1.0.7",
@ -1937,13 +1936,12 @@
}
},
"node_modules/axios": {
"version": "1.13.5",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz",
"integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==",
"license": "MIT",
"version": "1.12.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz",
"integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==",
"dependencies": {
"follow-redirects": "^1.15.11",
"form-data": "^4.0.5",
"follow-redirects": "^1.15.6",
"form-data": "^4.0.4",
"proxy-from-env": "^1.1.0"
}
},
@ -2139,7 +2137,6 @@
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"license": "MIT",
"dependencies": {
"delayed-stream": "~1.0.0"
},
@ -2312,7 +2309,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"license": "MIT",
"engines": {
"node": ">=0.4.0"
}
@ -2950,10 +2946,9 @@
}
},
"node_modules/form-data": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
"integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
"license": "MIT",
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
"integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
@ -3740,11 +3735,10 @@
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"node_modules/js-yaml": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"
},
@ -3893,7 +3887,6 @@
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
@ -3902,7 +3895,6 @@
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"license": "MIT",
"dependencies": {
"mime-db": "1.52.0"
},

View file

@ -32,7 +32,6 @@ const VideoForm = ({ onSubmit, isGenerating, userJobs = [] }) => {
prompt: '',
video_length_sec: 8,
aspect_ratio: '16:9',
resolution: '720p',
person_generation: 'allow_adult',
model_name: 'veo-3.1-generate-preview',
seed: '',
@ -634,32 +633,6 @@ const VideoForm = ({ onSubmit, isGenerating, userJobs = [] }) => {
</FormControl>
</Grid>
<Grid item xs={12} sm={6}>
<FormControl fullWidth>
<InputLabel>Resolution</InputLabel>
<Select
value={formData.resolution}
onChange={handleChange('resolution')}
label="Resolution"
>
{VIDEO_GENERATION_OPTIONS.resolutions.map((option) => (
<MenuItem key={option.value} value={option.value}>
<Box>
<Typography variant="body1">
{option.label}
{option.recommended && (
<Typography component="span" variant="caption" color="primary" sx={{ ml: 1, fontWeight: 'bold' }}>
RECOMMENDED
</Typography>
)}
</Typography>
</Box>
</MenuItem>
))}
</Select>
</FormControl>
</Grid>
<Grid item xs={12} sm={6}>
<FormControl fullWidth>
<InputLabel>Person Generation</InputLabel>

View file

@ -6,10 +6,6 @@ export const VIDEO_GENERATION_OPTIONS = {
{ value: '16:9', label: '16:9 (Landscape)' },
{ value: '9:16', label: '9:16 (Portrait)' }
],
resolutions: [
{ value: '720p', label: '720p (Standard)', recommended: true },
{ value: '1080p', label: '1080p (High Quality)' }
],
models: [
// Veo 3.1 Models Only
{