MoinulwithAI commited on
Commit
0631264
Β·
verified Β·
1 Parent(s): c5cc40e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -27,10 +27,10 @@ from modules.model_edit import Step1XParams, Step1XEdit
27
  print("TORCH_CUDA", torch.cuda.is_available())
28
 
29
  examples = [
30
- ["meme.jpg", "turn into an illustration in studio ghibli style",("meme.jpg","ghibli_meme.jpg"),],
31
- ["celeb_meme.jpg", "replace the gray blazer with a leather jacket",("celeb_meme.jpg","leather.jpg")],
32
- ["cookie.png", "remove the cookie",("cookie.png","no_cookie.png")],
33
- ["poster_orig.jpg", "replace 'lambs' with 'llamas'",("poster_orig.jpg","poster.jpg")],
34
  ]
35
 
36
  def generate_examples(init_image, prompt):
@@ -394,7 +394,7 @@ class ImageGenerator:
394
 
395
 
396
  # ζ¨‘εž‹δ»“εΊ“IDοΌˆε¦‚οΌš"bert-base-uncased"οΌ‰
397
- model_repo = "MoinulwithAI/TextToImageEdit/"
398
  # ζœ¬εœ°δΏε­˜θ·―εΎ„
399
  model_path = "./model_weights"
400
  os.makedirs(model_path, exist_ok=True)
@@ -449,13 +449,13 @@ def inference(prompt, ref_images, seed, size_level):
449
  with gr.Blocks() as demo:
450
  gr.Markdown(
451
  """
452
- # TextToImageEdit
453
  """
454
  )
455
  with gr.Row():
456
  with gr.Column():
457
  prompt = gr.Textbox(
458
- label="prompt",
459
  value='Remove the person from the image.',
460
  )
461
  init_image = gr.Image(label="Input Image", type='pil')
 
27
  print("TORCH_CUDA", torch.cuda.is_available())
28
 
29
  examples = [
30
+ ["examples 2/meme.jpg", "turn into an illustration in studio ghibli style",("examples 2/meme.jpg","examples 2/ghibli_meme.jpg"),],
31
+ ["examples 2/celeb_meme.jpg", "replace the gray blazer with a leather jacket",("examples 2/celeb_meme.jpg","examples 2/leather.jpg")],
32
+ ["examples 2/cookie.png", "remove the cookie",("examples 2/cookie.png","examples 2/no_cookie.png")],
33
+ ["examples 2/poster_orig.jpg", "replace 'lambs' with 'llamas'",("examples 2/poster_orig.jpg","examples 2/poster.jpg")],
34
  ]
35
 
36
  def generate_examples(init_image, prompt):
 
394
 
395
 
396
  # ζ¨‘εž‹δ»“εΊ“IDοΌˆε¦‚οΌš"bert-base-uncased"οΌ‰
397
+ model_repo = "stepfun-ai/Step1X-Edit"
398
  # ζœ¬εœ°δΏε­˜θ·―εΎ„
399
  model_path = "./model_weights"
400
  os.makedirs(model_path, exist_ok=True)
 
449
  with gr.Blocks() as demo:
450
  gr.Markdown(
451
  """
452
+ # Step1X-Edit
453
  """
454
  )
455
  with gr.Row():
456
  with gr.Column():
457
  prompt = gr.Textbox(
458
+ label="ηΌ–θΎ‘ζŒ‡δ»€ prompt",
459
  value='Remove the person from the image.',
460
  )
461
  init_image = gr.Image(label="Input Image", type='pil')