Update app.py
Browse files
app.py
CHANGED
@@ -120,7 +120,7 @@ def convert_to_gif(video_path):
|
|
120 |
def plex(prompt,image_input,stips,gscale,seed_value,scale_status,rife_status,progress=gr.Progress(track_tqdm=True)):
|
121 |
seed = seed_value
|
122 |
if seed == -1:
|
123 |
-
seed = random.randint(0,
|
124 |
id_image = np.array(ImageOps.exif_transpose(Image.fromarray(image_input)).convert("RGB"))
|
125 |
id_image = resize_numpy_image_long(id_image, 1024)
|
126 |
id_cond, id_vit_hidden, align_crop_face_image, face_kps = process_face_embeddings(face_helper, face_clip_model, handler_ante, eva_transform_mean, eva_transform_std, face_main_model, device, dtype, id_image, original_id_image=id_image, is_align_face=True, cal_uncond=False)
|
@@ -201,7 +201,7 @@ with gr.Blocks() as demo:
|
|
201 |
with gr.Row():
|
202 |
stips = gr.Slider(label="Steps", minimum=6, step=1, maximum=10, value=10)
|
203 |
gscale = gr.Slider(label="Guidance scale", minimum=1, step=0.1, maximum=20, value=7.0)
|
204 |
-
seed_param = gr.Slider(label="Inference Seed (Leave -1 for random)", minimum=0, step=32, maximum=
|
205 |
with gr.Row():
|
206 |
enable_scale = gr.Checkbox(label="Super-Resolution (720 × 480 -> 2880 × 1920) Real-ESRGAN", value=False, interactive=False)
|
207 |
enable_rife = gr.Checkbox(label="Frame Interpolation (8fps -> 16fps) RIFE", value=True)
|
|
|
120 |
def plex(prompt,image_input,stips,gscale,seed_value,scale_status,rife_status,progress=gr.Progress(track_tqdm=True)):
|
121 |
seed = seed_value
|
122 |
if seed == -1:
|
123 |
+
seed = random.randint(0, np.iinfo(np.int32).max)
|
124 |
id_image = np.array(ImageOps.exif_transpose(Image.fromarray(image_input)).convert("RGB"))
|
125 |
id_image = resize_numpy_image_long(id_image, 1024)
|
126 |
id_cond, id_vit_hidden, align_crop_face_image, face_kps = process_face_embeddings(face_helper, face_clip_model, handler_ante, eva_transform_mean, eva_transform_std, face_main_model, device, dtype, id_image, original_id_image=id_image, is_align_face=True, cal_uncond=False)
|
|
|
201 |
with gr.Row():
|
202 |
stips = gr.Slider(label="Steps", minimum=6, step=1, maximum=10, value=10)
|
203 |
gscale = gr.Slider(label="Guidance scale", minimum=1, step=0.1, maximum=20, value=7.0)
|
204 |
+
seed_param = gr.Slider(label="Inference Seed (Leave -1 for random)", minimum=0, step=32, maximum=np.iinfo(np.int32).max, value=-1)
|
205 |
with gr.Row():
|
206 |
enable_scale = gr.Checkbox(label="Super-Resolution (720 × 480 -> 2880 × 1920) Real-ESRGAN", value=False, interactive=False)
|
207 |
enable_rife = gr.Checkbox(label="Frame Interpolation (8fps -> 16fps) RIFE", value=True)
|