How to Level-Up Your Disco Diffusion Game by Using Config Files

BY ZHEN LU - JUNE 30, 2022
It's pretty easy to just click in some settings when you run Disco Diffusion for the first time and get some generally good results. However, if you really want to up your game, then using consistent settings each time and varying them slowly until you get the results you want is key. In this article, we'll go over how to get consistent results and save your progress so you waste less time clicking.

UPDATE: We've swapped to using the disco art container, which is a little different. We'll be publishing a new article on that soon!

*EDIT: We have swapped our default notebook to also use yaml, so all you need to do is copy/paste your yaml into the notebook textbox now. You don't need to mess with command line pathing! You can check out the end of this article for an example.

If you don't know what a YAML file is, no worries! It's just a specific way of formatting a file so that computers can read your data easier. You can learn more at the website, but you don't really need to know much about it to start using it in DD!

In the last Disco Diffusion article, we went over how to start a DD pod on RunPod and start generating image batches with the GUI notebook. This is really awesome if you just want to get started or if you just want to generate in one sitting, but if you want to make your work portable between multiple instances, or if you want to simply make sure that your settings get saved, then it's not an ideal solution. *Note: YAML import export probably coming in the near future

Enter config files: yaml config files are a great feature addition that /u/entmike added to his fork of DD. It allows you to save all of your DD run settings in a configuration file, and then run with that file. This is really awesome if you want to take your settings with you and then run on a different machine, whether that's in the cloud, or locally.

This is what the default yaml file looks like:

RN101: false
RN50: true
RN50x16: false
RN50x4: false
RN50x64: false
ViTB16: true
ViTB32: true
ViTL14: false
ViTL14_336: false
angle: 0:(0)
animation_mode: None
batch_name: TimeToDisco
check_model_SHA: false
clamp_grad: true
clamp_max: 0.05
clip_denoised: false
clip_guidance_scale: 5000
console_preview: false
console_preview_width: 80
cuda_device: cuda:0
cut_ic_pow: 1
cut_icgray_p: '[0.2]*400+[0]*600'
cut_innercut: '[4]*400+[12]*600'
cut_overview: '[12]*400+[4]*600'
cutn_batches: 4
cutout_debug: false
db: null
diffusion_model: 512x512_diffusion_uncond_finetune_008100
diffusion_sampling_mode: ddim
display_rate: 50
eta: 0.8
extract_nth_frame: 2
far_plane: 10000
fov: 40
frames_scale: 1500
frames_skip_steps: 60%
fuzzy_prompt: false
image_prompts: {}
images_out: images_out
init_image: null
init_images: init_images
init_scale: 1000
intermediate_saves: 0
intermediates_in_subfolder: true
interp_spline: Linear
key_frames: true
max_frames: 10000
midas_depth_model: dpt_large
midas_weight: 0.3
models: models2
modifiers: {}
multipliers: {}
n_batches: 50
near_plane: 200
padding_mode: border
per_job_kills: false
perlin_init: false
perlin_mode: mixed
rand_mag: 0.05
randomize_class: true
range_scale: 150
resume_from_frame: latest
resume_run: false
retain_overwritten_frames: false
rotation_3d_x: '0: (0)'
rotation_3d_y: '0: (0)'
rotation_3d_z: '0: (0)'
run_to_resume: latest
sampling_mode: bicubic
sat_scale: 0
save_metadata: false
set_seed: random_seed
simple_nvidia_smi_display: true
skip_augs: false
skip_steps: 10
skip_video_for_run_all: false
steps: 250
symmetry_loss: false
symmetry_loss_scale: 1500
symmetry_switch: 40
  - A beautiful painting of a singular lighthouse, shining its light across a tumultuous
    sea of blood by greg rutkowski and thomas kinkade, Trending on artstation.
  - yellow color scheme
  - This set of prompts start at frame 100
  - This prompt has weight five:5
translation_x: '0: (0)'
translation_y: '0: (0)'
translation_z: '0: (10.0)'
transport: '1'
turbo_mode: false
turbo_preroll: 10
turbo_steps: 3
tv_scale: 0
twilio_account_sid: null
twilio_auth_token: null
twilio_from: null
twilio_to: null
useCPU: false
use_checkpoint: true
use_secondary_model: true
v_symmetry_loss: false
v_symmetry_loss_scale: 1500
v_symmetry_switch: 40
video_init_path: training.mp4
video_init_seed_continuity: true
vr_eye_angle: 0.5
vr_ipd: 5.0
vr_mode: false
- 1280
- 768
zoom: '0: (1), 10: (1.05)'

While this may look daunting at first glance, it's actually just a list of all the DD settings and their values. You can copy this file and save it to your dropbox/google cloud/backblaze account and then you'll always be assured that you're running with the same settings you ran with last time. You can find this file in GitHub, or in your Pod, under the /workspace/disco-diffusion-1/configs folder.

In order to start a run with the yaml file, all you need to do is open a terminal window (Jupyter or SSH) and run something like:

python --config_file=/workspace/disco-diffusion-1/configs/mySpecialConfigFile.yaml

This is assuming that your config file is called mySpecialConfigFile.yaml and it's located in the /workspace/disco-diffusion-1/configs/ folder. If you're running on RunPod, you can check out this backup and restore article on how to quickly shuttle your files around between pods. Just make sure that you're syncing just your /workspace/disco-diffusion-1/configs/ folder, and not the entire /workspace folder unless you really want the entire thing!

Zhen is one of the co-founders of RunPod. He holds a PhD in Computational Chemistry and has lots of experience teaching, coding, and talking to people.

Want to join our growing community?
Chat with us on our Discord Server.
Prefer email? Contact us at