Skip to content

Commit

Permalink
allow webp uploads to img2img tab #991
Browse files Browse the repository at this point in the history
  • Loading branch information
hlky committed Sep 16, 2022
1 parent c465891 commit b856a91
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions scripts/img2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def layout():
image_holder = st.empty()

uploaded_images = st.file_uploader(
"Upload Image", accept_multiple_files=False, type=["png", "jpg", "jpeg"],
"Upload Image", accept_multiple_files=False, type=["png", "jpg", "jpeg", "webp"],
help="Upload an image which will be used for the image to image generation.",
)
if uploaded_images:
Expand All @@ -494,7 +494,7 @@ def layout():
mask_holder = st.empty()

uploaded_masks = st.file_uploader(
"Upload Mask", accept_multiple_files=False, type=["png", "jpg", "jpeg"],
"Upload Mask", accept_multiple_files=False, type=["png", "jpg", "jpeg", "webp"],
help="Upload an mask image which will be used for masking the image to image generation.",
)
if uploaded_masks:
Expand Down
2 changes: 1 addition & 1 deletion scripts/imglab.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def layout():

col1, col2 = st.columns(2)
with col1:
st.session_state['uploaded_file'] = st.file_uploader("Choose an image or images", type=["png", "jpg", "jpeg"],accept_multiple_files=True,on_change=changeImage)
st.session_state['uploaded_file'] = st.file_uploader("Choose an image or images", type=["png", "jpg", "jpeg", "webp"],accept_multiple_files=True,on_change=changeImage)
if 'previewImg' not in st.session_state:
st.session_state['previewImg'] = st.empty()
else:
Expand Down
2 changes: 1 addition & 1 deletion scripts/txt2vid.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ def layout():
height = st.slider("Height:", min_value=64, max_value=2048, value=st.session_state['defaults'].txt2vid.height, step=64)
cfg_scale = st.slider("CFG (Classifier Free Guidance Scale):", min_value=1.0, max_value=30.0, value=st.session_state['defaults'].txt2vid.cfg_scale, step=0.5, help="How strongly the image should follow the prompt.")

#uploaded_images = st.file_uploader("Upload Image", accept_multiple_files=False, type=["png", "jpg", "jpeg"],
#uploaded_images = st.file_uploader("Upload Image", accept_multiple_files=False, type=["png", "jpg", "jpeg", "webp"],
#help="Upload an image which will be used for the image to image generation.")
seed = st.text_input("Seed:", value=st.session_state['defaults'].txt2vid.seed, help=" The seed to use, if left blank a random seed will be generated.")
#batch_count = st.slider("Batch count.", min_value=1, max_value=100, value=st.session_state['defaults'].txt2vid.batch_count, step=1, help="How many iterations or batches of images to generate in total.")
Expand Down
4 changes: 2 additions & 2 deletions scripts/webui_streamlit_old.py
Original file line number Diff line number Diff line change
Expand Up @@ -2432,7 +2432,7 @@ def layout():
image_holder = st.empty()

uploaded_images = st.file_uploader(
"Upload Image", accept_multiple_files=False, type=["png", "jpg", "jpeg"],
"Upload Image", accept_multiple_files=False, type=["png", "jpg", "jpeg", "webp"],
help="Upload an image which will be used for the image to image generation.",
)
if uploaded_images:
Expand All @@ -2443,7 +2443,7 @@ def layout():
mask_holder = st.empty()

uploaded_masks = st.file_uploader(
"Upload Mask", accept_multiple_files=False, type=["png", "jpg", "jpeg"],
"Upload Mask", accept_multiple_files=False, type=["png", "jpg", "jpeg", "webp"],
help="Upload an mask image which will be used for masking the image to image generation.",
)
if uploaded_masks:
Expand Down

0 comments on commit b856a91

Please sign in to comment.