# 'Deforum' plugin for Automatic1111's Stable Diffusion WebUI. # Copyright (C) 2023 Artem Khrapov (kabachuha) and Deforum team listed in AUTHORS.md # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # Contact the dev team: https://discord.gg/deforum def get_samplers_list(): return { 'euler a': 'Euler a', 'euler': 'Euler', 'lms': 'LMS', 'heun': 'Heun', 'dpm2': 'DPM2', 'dpm2 a': 'DPM2 a', 'dpm++ 2s a': 'DPM++ 2S a', 'dpm++ 2m': 'DPM++ 2M', 'dpm++ sde': 'DPM++ SDE', 'dpm fast': 'DPM fast', 'dpm adaptive': 'DPM adaptive', 'lms karras': 'LMS Karras', 'dpm2 karras': 'DPM2 Karras', 'dpm2 a karras': 'DPM2 a Karras', 'dpm++ 2s a karras': 'DPM++ 2S a Karras', 'dpm++ 2m karras': 'DPM++ 2M Karras', 'dpm++ sde karras': 'DPM++ SDE Karras' } def DeforumAnimPrompts(): return r"""{ "0": "tiny cute swamp bunny, highly detailed, intricate, ultra hd, sharp photo, crepuscular rays, in focus, by tomasz alen kopera", "30": "anthropomorphic clean cat, surrounded by fractals, epic angle and pose, symmetrical, 3d, depth of field, ruan jia and fenghua zhong", "60": "a beautiful coconut --neg photo, realistic", "90": "a beautiful durian, trending on Artstation" } """ # Guided images defaults def get_guided_imgs_default_json(): return '''{ "0": "https://deforum.github.io/a1/Gi1.png", "max_f/4-5": "https://deforum.github.io/a1/Gi2.png", "max_f/2-10": "https://deforum.github.io/a1/Gi3.png", "3*max_f/4-15": "https://deforum.github.io/a1/Gi4.jpg", "max_f-20": "https://deforum.github.io/a1/Gi1.png" }''' def get_hybrid_info_html(): return """

Hybrid Video Compositing in 2D/3D Mode by reallybigname

Hybrid Video Schedules Click Here for more info/ a Guide. """ def get_composable_masks_info_html(): return """ """ def get_parseq_info_html(): return """

Use a Parseq manifest for your animation (leave blank to ignore).

Fields managed in your Parseq manifest override the values and schedules set in other parts of this UI. You can select which values to override by using the "Managed Fields" section in Parseq.

""" def get_prompts_info_html(): return """ """ def get_guided_imgs_info_html(): return """

You can use this as a guided image tool or as a looper depending on your settings in the keyframe images field. Set the keyframes and the images that you want to show up. Note: the number of frames between each keyframe should be greater than the tweening frames.

Prerequisites and Important Info:

Looping recommendations:

The Guided images mode exposes the following variables for the prompts and the schedules:

""" def get_main_info_html(): return """

StableDiffusion WebUI-based re-implementation of deforum.github.io maintained by kabachuha & hithereai

FOR HELP CLICK HERE

If you liked this extension, please give it a star on GitHub! 😊 """ def get_frame_interpolation_info_html(): return """ Use RIFE / FILM Frame Interpolation to smooth out, slow-mo (or both) any video.

Supported engines:

Important notes:

""" def get_frames_to_video_info_html(): return """

Important Notes:

""" def get_gradio_html(section_name): if section_name.lower() == 'hybrid_video': return get_hybrid_info_html() elif section_name.lower() == 'composable_masks': return get_composable_masks_info_html() elif section_name.lower() == 'parseq': return get_parseq_info_html() elif section_name.lower() == 'prompts': return get_prompts_info_html() elif section_name.lower() == 'guided_imgs': return get_guided_imgs_info_html() elif section_name.lower() == 'main': return get_main_info_html() elif section_name.lower() == 'frame_interpolation': return get_frame_interpolation_info_html() elif section_name.lower() == 'frames_to_video': return get_frames_to_video_info_html() else: return None mask_fill_choices=['fill', 'original', 'latent noise', 'latent nothing']