Spaces:
Runtime error
Runtime error
Update
Browse files66 unmodified lines676869707172737475767778799 unmodified lines8990919293949596979866 unmodified linesstep=1,value=1234,label='Seed')superresolve = gr.Checkbox(value=False,label='Superresolve')run_button = gr.Button('Run')with gr.Column():with gr.Tabs():with gr.TabItem('Result'):result = gr.Image(show_label=False, elem_id='result')with gr.TabItem('Denoising Process'):result_video = gr.Video(show_label=False,elem_id='result-video')9 unmodified linesnum_steps,randomize_seed,seed,superresolve,],outputs=[result,seed,result_video,])66 unmodified lines67686970717273747576777879809 unmodified lines9091929394959697989966 unmodified linesstep=1,value=1234,label='Seed')run_button = gr.Button('Run')with gr.Column():with gr.Tabs():with gr.TabItem('Result (Superresolved)'):result = gr.Image(show_label=False, elem_id='result')with gr.TabItem('Result (Raw)'):result_raw = gr.Image(show_label=False,elem_id='result-raw')with gr.TabItem('Denoising Process'):result_video = gr.Video(show_label=False,elem_id='result-video')9 unmodified linesnum_steps,randomize_seed,seed,],outputs=[result,result_raw,seed,result_video,])
155 unmodified lines156157158159160161162163164165166167168169170171172155 unmodified linesreturn PIL.Image.open(out_file)def run(self, model_name: str, scheduler_type: str, num_steps: int,randomize_seed: bool, seed: int,superresolve: bool) -> tuple[PIL.Image.Image, int, str]:self.set_pipeline(model_name, scheduler_type)if scheduler_type == 'PNDM':num_steps = max(4, min(num_steps, 100))if randomize_seed:seed = self.rng.randint(0, 100000)res, filename = self.generate_with_video(seed, num_steps)if superresolve:res = self.superresolve(res)return res, seed, filename@staticmethoddef to_grid(images: list[PIL.Image.Image],155 unmodified lines156157158159160161162163164165166167168169170171155 unmodified linesreturn PIL.Image.open(out_file)def run(self, model_name: str, scheduler_type: str, num_steps: int,randomize_seed: bool,seed: int) -> tuple[PIL.Image.Image, PIL.Image.Image, int, str]:self.set_pipeline(model_name, scheduler_type)if scheduler_type == 'PNDM':num_steps = max(4, min(num_steps, 100))if randomize_seed:seed = self.rng.randint(0, 100000)res, filename = self.generate_with_video(seed, num_steps)superresolved = self.superresolve(res)return superresolved, res, seed, filename@staticmethoddef to_grid(images: list[PIL.Image.Image],
12 unmodified lines13141516171812 unmodified linesmax-width: 400px;max-height: 400px;}div#result-video {max-width: 400px;max-height: 400px;12 unmodified lines1314151617181920212212 unmodified linesmax-width: 400px;max-height: 400px;}div#result-raw {max-width: 400px;max-height: 400px;}div#result-video {max-width: 400px;max-height: 400px;
app.py+5-4
model.py+4-5
style.css+4