Muhammad Waqas commited on
Commit
48e039b
·
1 Parent(s): 3b1b218

Added OmniGen Image to Image

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -193,6 +193,7 @@ def omnigen_image_to_image():
193
  return jsonify({'error': 'Text prompt is required'}), 400
194
 
195
  steps = data.get('steps')
 
196
  if not steps:
197
  steps = 50
198
 
@@ -228,7 +229,7 @@ def omnigen_image_to_image():
228
  # Save base64 image
229
  try:
230
  image_path, image_url = save_base64_image(base64_image)
231
- image_url = "https://drive.google.com/uc?id=1JEHEy0zCVWOob4421hLQIPMbO_ebeCPS&export=download"
232
  except Exception as e:
233
  raise ValueError(f'Invalid base64 image data: {str(e)}')
234
 
@@ -243,7 +244,7 @@ def omnigen_image_to_image():
243
 
244
  # Modify workflow with inputs
245
  workflow["6"]["inputs"]["prompt"] = "in image_1 " + text_prompt
246
- workflow["6"]["inputs"]["num_inference_steps"] = 5
247
  workflow["12"]["inputs"]["url"] = image_url
248
 
249
  # WebSocket connection to queue the prompt
 
193
  return jsonify({'error': 'Text prompt is required'}), 400
194
 
195
  steps = data.get('steps')
196
+
197
  if not steps:
198
  steps = 50
199
 
 
229
  # Save base64 image
230
  try:
231
  image_path, image_url = save_base64_image(base64_image)
232
+ # image_url = "https://drive.google.com/uc?id=1JEHEy0zCVWOob4421hLQIPMbO_ebeCPS&export=download"
233
  except Exception as e:
234
  raise ValueError(f'Invalid base64 image data: {str(e)}')
235
 
 
244
 
245
  # Modify workflow with inputs
246
  workflow["6"]["inputs"]["prompt"] = "in image_1 " + text_prompt
247
+ workflow["6"]["inputs"]["num_inference_steps"] = steps
248
  workflow["12"]["inputs"]["url"] = image_url
249
 
250
  # WebSocket connection to queue the prompt