mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-03-13 17:09:49 +00:00
improve backward combability #936
This commit is contained in:
@@ -39,6 +39,8 @@ class ForgeDiffusionEngine:
|
||||
self.is_sd2 = False
|
||||
self.is_sdxl = False
|
||||
self.is_sd3 = False
|
||||
self.parameterization = 'eps'
|
||||
self.alphas_cumprod = None
|
||||
|
||||
def set_clip_skip(self, clip_skip):
|
||||
pass
|
||||
|
||||
@@ -53,6 +53,7 @@ class StableDiffusion(ForgeDiffusionEngine):
|
||||
# WebUI Legacy
|
||||
self.is_sd1 = True
|
||||
self.first_stage_model = vae.first_stage_model
|
||||
self.alphas_cumprod = unet.model.predictor.alphas_cumprod
|
||||
|
||||
def set_clip_skip(self, clip_skip):
|
||||
self.text_processing_engine.clip_skip = clip_skip
|
||||
|
||||
@@ -53,6 +53,10 @@ class StableDiffusion2(ForgeDiffusionEngine):
|
||||
# WebUI Legacy
|
||||
self.is_sd2 = True
|
||||
self.first_stage_model = vae.first_stage_model
|
||||
self.alphas_cumprod = unet.model.predictor.alphas_cumprod
|
||||
|
||||
if not self.is_inpaint:
|
||||
self.parameterization = 'v'
|
||||
|
||||
def set_clip_skip(self, clip_skip):
|
||||
self.text_processing_engine.clip_skip = clip_skip
|
||||
|
||||
@@ -72,6 +72,7 @@ class StableDiffusionXL(ForgeDiffusionEngine):
|
||||
# WebUI Legacy
|
||||
self.is_sdxl = True
|
||||
self.first_stage_model = vae.first_stage_model
|
||||
self.alphas_cumprod = unet.model.predictor.alphas_cumprod
|
||||
|
||||
def set_clip_skip(self, clip_skip):
|
||||
self.text_processing_engine_l.clip_skip = clip_skip
|
||||
|
||||
Reference in New Issue
Block a user