class_docstr: A sampler for text-to-image generation, but only the prior.
  :param root_dir: directory for model checkpoints.
  :param sampling_type: ["default", "fast"]
class_docstr_tok: ["A","sampler","for","text-to-image","generation",",","but","only","the","prior",".",":","param","root_dir",":","directory","for","model","checkpoints",".",":","param","sampling_type",":","[","``","default","''",",","``","fast","''","]"]
code: def __call__(
      self,
      prompt: str,
      bsz: int,
      progressive_mode=None,
  ) -> Iterator[torch.Tensor]:
      assert progressive_mode in ("loop", "stage", "final")
      with torch.no_grad(), torch.cuda.amp.autocast():
          (
              prompts_batch,
              prior_cf_scales_batch,
              decoder_cf_scales_batch,
              txt_feat,
              txt_feat_seq,
              tok,
              mask,
          ) = self.preprocess(
              prompt,
              bsz,
          )
  
          """ Transform CLIP text feature into image feature """
          img_feat = self._prior(
              txt_feat,
              txt_feat_seq,
              mask,
              prior_cf_scales_batch,
              timestep_respacing=self._prior_sm,
          )
  
          yield img_feat
  
file_path: stablediffusion/ldm/modules/karlo/kakao/sampler.py
imports: from typing import Iterator
  import torch
  import torchvision.transforms.functional
  from torchvision.transforms import InterpolationMode
  from .template import BaseSampler, CKPT_PATH
label_desc: Use image node_id 4 for calling the PriorSampler obj's underlying member method code with example usage: obj.__call__(prompt, bsz, progressive_mode) without return types