Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.0.5 #8

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions ai-atelier-cn.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
from kora.xattr import get_id
import deepl

from setup import textsynth_completion
from setup import deeplSetup
# from setup import textsynth_completion
# from setup import deeplSetup
# # For debug in mac
# from setup_mac import textsynth_completion
# from setup_mac import deeplSetup
Expand Down Expand Up @@ -299,6 +299,31 @@ def text_main():
with placeholder.container():
st.write(" ")



def add_scene(scene_num):
with st.expander("场景"+scene_num+"参数设置"):
col1, col2 = st.columns([3,1])
steps_num_1 = col1.number_input(
"场景一迭代次数",
value=1,
help="调整CLIP如何用评估图像特征提取量(cutout)的批(batches)数量。数值越高,细节往往越丰富,但你的生成时间也将更长。(默认值 4|范围 1-8) ",
)
if col1.button('🗑️ 删除'):
st.write(" ")
scene_num += 1

return scene_num

scene_dict = {"scene1":[],"scene2":[],"scene3":[]}
if st.button("添加场景1"):
scene_dict['scene1']='ok'
if st.button('🗑️ 删除'):
st.write(" ")

st.write(scene_dict)


st.subheader('🎨 让AI画画   [文本生成图像]')
page_names = ["[完成度更高] CLIP Guided Diffusion", "[更有创造力] VQGAN+CLIP"]

Expand Down Expand Up @@ -484,7 +509,7 @@ def dimensions_compatibility(type, after):
)
)
uploaded_file = st.file_uploader(
"上传你的图片并作为初始图像 (可选)",
"上传你的图片并作为初始参考图像 (可选)",
type=["png", "jpg"],
help="除了默认的随机图像,还可以选择上传一张你喜欢的图像开始你的创作。"
)
Expand All @@ -495,12 +520,12 @@ def dimensions_compatibility(type, after):
value=1000,
)
skipseedtimesteps = col2.number_input(
"Skip timesteps - 允许图像与guided-diffusio的样本混合的timesteps",
"Skip timesteps - 允许图像与guided-diffusio的样本混合的时间步数timesteps",
value=150,
)
if num_steps <= skipseedtimesteps:
col2.error(
"The number of steps has to be higher than the timesteps skipped"
"总生成的时间步数不能少于上传图像与模型混合的时间步数"
)
else:
initscale = 1000
Expand Down
2 changes: 1 addition & 1 deletion ai-atelier.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import webbrowser
from kora.xattr import get_id

from setup import textsynth_completion
# from setup import textsynth_completion
# For debug in mac
# from setup_mac import textsynth_completion

Expand Down