Skip to content

Commit

Permalink
Fallback if webui is an old version without sd_samplers_timesteps, #39
Browse files Browse the repository at this point in the history
  • Loading branch information
AlUlkesh committed Oct 10, 2023
1 parent fba7d9e commit 24c3ce2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/sd_save_intermediate_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
from modules import script_callbacks
from modules.processing import Processed, process_images, fix_seed, create_infotext
from modules.sd_samplers_kdiffusion import KDiffusionSampler
from modules.sd_samplers_timesteps import CompVisSampler as TimestepsSampler, samplers_timesteps
try:
from modules.sd_samplers_timesteps import CompVisSampler as TimestepsSampler, samplers_timesteps
except:
# Fallback if webui is an old version without sd_samplers_timesteps
class TimestepsSampler:
callback_state = None
from modules.sd_samplers_compvis import samplers_data_compvis as samplers_timesteps
from modules.sd_samplers_common import sample_to_image
from modules.images import save_image, FilenameGenerator, get_next_sequence_number
from modules.shared import opts, state, cmd_opts
Expand Down

0 comments on commit 24c3ce2

Please sign in to comment.