mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-01-26 19:09:45 +00:00
force clipskip to int (#1775)
#1760, original solution by cmdr2. extended to 2 other locations where setting is read. I could replicate the issue only by manually entering a decimal value. Possibly also #1764. Though I don't know how the clipskip setting became a string.
This commit is contained in:
@@ -465,7 +465,7 @@ class StableDiffusionProcessing:
|
||||
cache = caches[0]
|
||||
|
||||
with devices.autocast():
|
||||
shared.sd_model.set_clip_skip(opts.CLIP_stop_at_last_layers)
|
||||
shared.sd_model.set_clip_skip(int(opts.CLIP_stop_at_last_layers))
|
||||
|
||||
cache[1] = function(shared.sd_model, required_prompts, steps, hires_steps, shared.opts.use_old_scheduling)
|
||||
|
||||
@@ -542,7 +542,7 @@ class Processed:
|
||||
self.index_of_first_image = index_of_first_image
|
||||
self.styles = p.styles
|
||||
self.job_timestamp = state.job_timestamp
|
||||
self.clip_skip = opts.CLIP_stop_at_last_layers
|
||||
self.clip_skip = int(opts.CLIP_stop_at_last_layers)
|
||||
self.token_merging_ratio = p.token_merging_ratio
|
||||
self.token_merging_ratio_hr = p.token_merging_ratio_hr
|
||||
|
||||
@@ -714,7 +714,7 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
|
||||
if all_negative_prompts is None:
|
||||
all_negative_prompts = p.all_negative_prompts
|
||||
|
||||
clip_skip = getattr(p, 'clip_skip', opts.CLIP_stop_at_last_layers)
|
||||
clip_skip = int(getattr(p, 'clip_skip', opts.CLIP_stop_at_last_layers))
|
||||
enable_hr = getattr(p, 'enable_hr', False)
|
||||
token_merging_ratio = p.get_token_merging_ratio()
|
||||
token_merging_ratio_hr = p.get_token_merging_ratio(for_hr=True)
|
||||
|
||||
Reference in New Issue
Block a user