code: def model_and_diffusion_defaults():
      """
      Defaults for image training.
      """
      res = dict(
          image_size=64,
          num_channels=128,
          num_res_blocks=2,
          num_heads=4,
          num_heads_upsample=-1,
          num_head_channels=-1,
          attention_resolutions="16,8",
          channel_mult="",
          dropout=0.0,
          class_cond=False,
          use_checkpoint=False,
          use_scale_shift_norm=True,
          resblock_updown=False,
          use_fp16=False,
          use_new_attention_order=False,
      )
      res.update(diffusion_defaults())
      return res
  
file_path: PaddleHub/modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/model/script_util.py
imports: import argparse
  import inspect
  from .None import gaussian_diffusion
  from .respace import space_timesteps
  from .respace import SpacedDiffusion
  from .unet import EncoderUNetModel
  from .unet import SuperResModel
  from .unet import UNetModel
label_desc: Use image node_id 2 for calling a global function with example usage: model_and_diffusion_defaults() and returns: res