Spaces:
Configuration error
Configuration error
naomiKenKorem
commited on
Commit
•
d14fa82
1
Parent(s):
73c090b
Update app.py
Browse files
app.py
CHANGED
@@ -31,34 +31,27 @@ css = """
|
|
31 |
"""
|
32 |
|
33 |
examples = [
|
34 |
-
#
|
35 |
[
|
36 |
-
"
|
37 |
-
"
|
38 |
-
"
|
39 |
-
512, 512, 32, "
|
40 |
],
|
41 |
-
#
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
#
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
# # 4-EpicRealism
|
56 |
-
# [
|
57 |
-
# "epiCRealismNaturalSin.safetensors",
|
58 |
-
# "photo of coastline, rocks, storm weather, wind, waves, lightning, 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3",
|
59 |
-
# "blur, haze, deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers, deformed, distorted, disfigured, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation",
|
60 |
-
# 512, 512, 32, "13100322578370451493"
|
61 |
-
# ]
|
62 |
]
|
63 |
print(f"### Cleaning cached examples ...")
|
64 |
os.system(f"rm -rf gradio_cached_examples/")
|
@@ -89,7 +82,7 @@ class AnimateController:
|
|
89 |
self.vae = AutoencoderKL.from_pretrained(pretrained_model_path, subfolder="vae").cuda()
|
90 |
self.text_encoder = CLIPTextModel.from_pretrained(pretrained_model_path, subfolder="text_encoder").cuda()
|
91 |
self.unet = UNet3DConditionModel.from_pretrained_2d(pretrained_model_path, subfolder="unet", unet_additional_kwargs=OmegaConf.to_container(self.inference_config.unet_additional_kwargs)).cuda()
|
92 |
-
self.base_model_list = ['
|
93 |
self.motion_module_list = ['lt_long_mm_32_frames.ckpt']
|
94 |
|
95 |
print(self.base_model_list[0])
|
@@ -135,7 +128,7 @@ class AnimateController:
|
|
135 |
|
136 |
def animate(
|
137 |
self,
|
138 |
-
base_model_dropdown,
|
139 |
prompt_textbox,
|
140 |
negative_prompt_textbox,
|
141 |
width_slider,
|
@@ -143,7 +136,7 @@ class AnimateController:
|
|
143 |
video_length,
|
144 |
seed_textbox,
|
145 |
):
|
146 |
-
if base_model_dropdown != self.selected_base_model: self.update_base_model(base_model_dropdown)
|
147 |
# if motion_module_dropdown != self.selected_motion_module: self.update_motion_module(motion_module_dropdown)
|
148 |
|
149 |
if is_xformers_available(): self.unet.enable_xformers_memory_efficient_attention()
|
@@ -215,11 +208,11 @@ def ui():
|
|
215 |
)
|
216 |
with gr.Row():
|
217 |
with gr.Column():
|
218 |
-
base_model_dropdown = gr.Dropdown( label="Base DreamBooth Model", choices=controller.base_model_list, value=controller.base_model_list[0], interactive=True )
|
219 |
-
motion_module_dropdown = gr.Dropdown( label="Motion Module", choices=controller.motion_module_list, value=controller.motion_module_list[0], interactive=True )
|
220 |
|
221 |
-
base_model_dropdown.change(fn=controller.update_base_model, inputs=[base_model_dropdown], outputs=[base_model_dropdown])
|
222 |
-
motion_module_dropdown.change(fn=controller.update_motion_module, inputs=[motion_module_dropdown], outputs=[motion_module_dropdown])
|
223 |
|
224 |
prompt_textbox = gr.Textbox( label="Prompt", lines=3 )
|
225 |
negative_prompt_textbox = gr.Textbox( label="Negative Prompt", lines=3, value="worst quality, low quality, nsfw, logo")
|
|
|
31 |
"""
|
32 |
|
33 |
examples = [
|
34 |
+
# 12-EpicRealism
|
35 |
[
|
36 |
+
"epiCRealismNaturalSin.safetensors",
|
37 |
+
"photo of coastline, rocks, storm weather, wind, waves, lightning, 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3",
|
38 |
+
"blur, haze, deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers, deformed, distorted, disfigured, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation",
|
39 |
+
512, 512, 32, "1490157606650685400"
|
40 |
],
|
41 |
+
# 2-EpicRealism
|
42 |
+
[
|
43 |
+
"epiCRealismNaturalSin.safetensors",
|
44 |
+
"a young man is dancing in a paris nice street",
|
45 |
+
"wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation render, illustration, deformed, distorted, disfigured, doll, poorly drawn, bad anatomy, wrong anatomy deformed, naked, nude, breast (worst quality low quality: 1.4)",
|
46 |
+
512, 512, 32, "1"
|
47 |
+
],
|
48 |
+
# 3-EpicRealism
|
49 |
+
[
|
50 |
+
"epiCRealismNaturalSin.safetensors",
|
51 |
+
"photo of coastline, rocks, storm weather, wind, waves, lightning, 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3",
|
52 |
+
"blur, haze, deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers, deformed, distorted, disfigured, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation",
|
53 |
+
512, 512, 32, "13100322578370451493"
|
54 |
+
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
]
|
56 |
print(f"### Cleaning cached examples ...")
|
57 |
os.system(f"rm -rf gradio_cached_examples/")
|
|
|
82 |
self.vae = AutoencoderKL.from_pretrained(pretrained_model_path, subfolder="vae").cuda()
|
83 |
self.text_encoder = CLIPTextModel.from_pretrained(pretrained_model_path, subfolder="text_encoder").cuda()
|
84 |
self.unet = UNet3DConditionModel.from_pretrained_2d(pretrained_model_path, subfolder="unet", unet_additional_kwargs=OmegaConf.to_container(self.inference_config.unet_additional_kwargs)).cuda()
|
85 |
+
self.base_model_list = ['epiCRealismNaturalSin.safetensors']
|
86 |
self.motion_module_list = ['lt_long_mm_32_frames.ckpt']
|
87 |
|
88 |
print(self.base_model_list[0])
|
|
|
128 |
|
129 |
def animate(
|
130 |
self,
|
131 |
+
# base_model_dropdown,
|
132 |
prompt_textbox,
|
133 |
negative_prompt_textbox,
|
134 |
width_slider,
|
|
|
136 |
video_length,
|
137 |
seed_textbox,
|
138 |
):
|
139 |
+
# if base_model_dropdown != self.selected_base_model: self.update_base_model(base_model_dropdown)
|
140 |
# if motion_module_dropdown != self.selected_motion_module: self.update_motion_module(motion_module_dropdown)
|
141 |
|
142 |
if is_xformers_available(): self.unet.enable_xformers_memory_efficient_attention()
|
|
|
208 |
)
|
209 |
with gr.Row():
|
210 |
with gr.Column():
|
211 |
+
# base_model_dropdown = gr.Dropdown( label="Base DreamBooth Model", choices=controller.base_model_list, value=controller.base_model_list[0], interactive=True )
|
212 |
+
# motion_module_dropdown = gr.Dropdown( label="Motion Module", choices=controller.motion_module_list, value=controller.motion_module_list[0], interactive=True )
|
213 |
|
214 |
+
# base_model_dropdown.change(fn=controller.update_base_model, inputs=[base_model_dropdown], outputs=[base_model_dropdown])
|
215 |
+
# motion_module_dropdown.change(fn=controller.update_motion_module, inputs=[motion_module_dropdown], outputs=[motion_module_dropdown])
|
216 |
|
217 |
prompt_textbox = gr.Textbox( label="Prompt", lines=3 )
|
218 |
negative_prompt_textbox = gr.Textbox( label="Negative Prompt", lines=3, value="worst quality, low quality, nsfw, logo")
|