ShoufaChen commited on
Commit
7bf1803
1 Parent(s): b1ec36c
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -14,6 +14,7 @@ import argparse
14
  from tokenizer_image.vq_model import VQ_models
15
  # from models.generate import generate
16
  from serve.llm import LLM
 
17
 
18
  device = "cuda"
19
 
@@ -51,6 +52,7 @@ def load_model(args):
51
 
52
 
53
  def infer(cfg_scale, top_k, top_p, temperature, class_label, seed):
 
54
  args.cfg_scale = cfg_scale
55
  n = 4
56
  latent_size = image_size // args.downsample_size
 
14
  from tokenizer_image.vq_model import VQ_models
15
  # from models.generate import generate
16
  from serve.llm import LLM
17
+ from serve.sampler import Sampler
18
 
19
  device = "cuda"
20
 
 
52
 
53
 
54
  def infer(cfg_scale, top_k, top_p, temperature, class_label, seed):
55
+ llm.llm_engine.model_executor.driver_worker.model_runner.model.sampler = Sampler(cfg_scale)
56
  args.cfg_scale = cfg_scale
57
  n = 4
58
  latent_size = image_size // args.downsample_size