Skip to content

Commit

Permalink
[Bug] Alternative img2img error #508
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTOMATIC1111 committed Sep 15, 2022
1 parent 6452fa2 commit 7fe00d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/img2imgalt.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import modules.scripts as scripts
import gradio as gr

from modules import processing, shared, sd_samplers
from modules import processing, shared, sd_samplers, prompt_parser
from modules.processing import Processed
from modules.sd_samplers import samplers
from modules.shared import opts, cmd_opts, state
Expand Down Expand Up @@ -94,7 +94,8 @@ def sample_extra(x, conditioning, unconditional_conditioning):
else:
shared.state.job_count += 1
cond = p.sd_model.get_learned_conditioning(p.batch_size * [original_prompt])
noise = find_noise_for_image(p, cond, unconditional_conditioning, cfg, st)
uncond = p.sd_model.get_learned_conditioning(p.batch_size * [""])
noise = find_noise_for_image(p, cond, uncond, cfg, st)
self.cache = Cached(noise, cfg, st, lat, original_prompt)

sampler = samplers[p.sampler_index].constructor(p.sd_model)
Expand Down

0 comments on commit 7fe00d0

Please sign in to comment.