mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-08 18:21:49 -08:00
resolve some of circular import issues for kohaku
This commit is contained in:
parent
09165916fa
commit
f0c1063a70
5 changed files with 17 additions and 15 deletions
|
|
@ -30,6 +30,7 @@ from ldm.models.diffusion.ddpm import LatentDepth2ImageDiffusion
|
|||
from einops import repeat, rearrange
|
||||
from blendmodes.blend import blendLayers, BlendType
|
||||
|
||||
decode_first_stage = sd_samplers_common.decode_first_stage
|
||||
|
||||
# some of those options should not be changed at all because they would break the model, so I removed them from options.
|
||||
opt_C = 4
|
||||
|
|
@ -572,12 +573,6 @@ def decode_latent_batch(model, batch, target_device=None, check_for_nans=False):
|
|||
return samples
|
||||
|
||||
|
||||
def decode_first_stage(model, x):
|
||||
x = model.decode_first_stage(x.to(devices.dtype_vae))
|
||||
|
||||
return x
|
||||
|
||||
|
||||
def get_fixed_seed(seed):
|
||||
if seed is None or seed == '' or seed == -1:
|
||||
return int(random.randrange(4294967294))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue