WeichenFan commited on
Commit
4ffd99e
·
1 Parent(s): fa8374e
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -61,7 +61,7 @@ def generate_content(prompt, model_name, guidance_scale=7.5, num_inference_steps
61
  set_seed(seed)
62
 
63
  is_video_model = "wan-t2v" in model_name
64
-
65
  if is_video_model:
66
  negative_prompt = "Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards"
67
  video1_frames = model(
@@ -102,7 +102,7 @@ def generate_content(prompt, model_name, guidance_scale=7.5, num_inference_steps
102
  zero_steps=zero_steps
103
  ).images[0]
104
 
105
- return image1, image2, None, seed
106
  else:
107
  image = model(
108
  prompt,
@@ -114,9 +114,9 @@ def generate_content(prompt, model_name, guidance_scale=7.5, num_inference_steps
114
  ).images[0]
115
 
116
  if use_cfg_zero_star:
117
- return image, None, None, seed
118
  else:
119
- return None, image, None, seed
120
 
121
  # Gradio UI with left-right layout
122
  with gr.Blocks() as demo:
@@ -146,7 +146,7 @@ with gr.Blocks() as demo:
146
  with gr.Column(scale=2):
147
  out1 = gr.Image(type="pil", label="CFG-Zero* Image")
148
  out2 = gr.Image(type="pil", label="CFG Image")
149
- video = gr.Video(label="Video")
150
  used_seed = gr.Textbox(label="Used Seed")
151
 
152
  def update_params(model_name):
 
61
  set_seed(seed)
62
 
63
  is_video_model = "wan-t2v" in model_name
64
+ print('prompt: ',prompt)
65
  if is_video_model:
66
  negative_prompt = "Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards"
67
  video1_frames = model(
 
102
  zero_steps=zero_steps
103
  ).images[0]
104
 
105
+ return image1, image2, seed
106
  else:
107
  image = model(
108
  prompt,
 
114
  ).images[0]
115
 
116
  if use_cfg_zero_star:
117
+ return image, None, seed
118
  else:
119
+ return None, image, seed
120
 
121
  # Gradio UI with left-right layout
122
  with gr.Blocks() as demo:
 
146
  with gr.Column(scale=2):
147
  out1 = gr.Image(type="pil", label="CFG-Zero* Image")
148
  out2 = gr.Image(type="pil", label="CFG Image")
149
+ #video = gr.Video(label="Video")
150
  used_seed = gr.Textbox(label="Used Seed")
151
 
152
  def update_params(model_name):