airplane194 commited on
Commit
c5afadc
·
1 Parent(s): d909487

Fixing app.py

Browse files
Files changed (2) hide show
  1. app.py +4 -3
  2. comfy/k_diffusion/sampling.py +1 -1
app.py CHANGED
@@ -44,14 +44,15 @@ def infer(prompt, seed=42, randomize_seed=False, aspect_ratio="4:3 landscape 115
44
  # pipe.load_lora_weights(weight_path)
45
  # pipe.fuse_lora()
46
  torch.cuda.empty_cache()
47
- image = python.generate_image(
48
  prompt,
49
  height,
50
  width,
 
51
  aspect_ratio,
52
  seed,
53
- guidance_scale=guidance_scale,
54
- ).images[0]
55
  # Generate images
56
  # for img in pipe.flux_pipe_call_that_returns_an_iterable_of_images(
57
  # prompt=prompt,
 
44
  # pipe.load_lora_weights(weight_path)
45
  # pipe.fuse_lora()
46
  torch.cuda.empty_cache()
47
+ image, seed = python.generate_image(
48
  prompt,
49
  height,
50
  width,
51
+ guidance_scale,
52
  aspect_ratio,
53
  seed,
54
+ num_inference_steps,
55
+ )
56
  # Generate images
57
  # for img in pipe.flux_pipe_call_that_returns_an_iterable_of_images(
58
  # prompt=prompt,
comfy/k_diffusion/sampling.py CHANGED
@@ -737,7 +737,7 @@ def sample_dpmpp_2m(model, x, sigmas, extra_args=None, callback=None, disable=No
737
  t_fn = lambda sigma: sigma.log().neg()
738
  old_denoised = None
739
 
740
- for i in trange(len(sigmas) - 1, disable=disable):
741
  denoised = model(x, sigmas[i] * s_in, **extra_args)
742
  if callback is not None:
743
  callback({'x': x, 'i': i, 'sigma': sigmas[i], 'sigma_hat': sigmas[i], 'denoised': denoised})
 
737
  t_fn = lambda sigma: sigma.log().neg()
738
  old_denoised = None
739
 
740
+ for i in range(len(sigmas) - 1):
741
  denoised = model(x, sigmas[i] * s_in, **extra_args)
742
  if callback is not None:
743
  callback({'x': x, 'i': i, 'sigma': sigmas[i], 'sigma_hat': sigmas[i], 'denoised': denoised})