mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-04-27 01:38:53 +00:00
revise kernel
and add unused files
This commit is contained in:
@@ -58,7 +58,7 @@ def model():
|
||||
model_path = os.path.join(paths.models_path, "VAE-approx", model_name)
|
||||
download_model(model_path, 'https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases/download/v1.0.0-pre/' + model_name)
|
||||
|
||||
loaded_model = VAEApprox(latent_channels=shared.sd_model.latent_channels)
|
||||
loaded_model = VAEApprox(latent_channels=shared.sd_model.forge_objects.vae.latent_channels)
|
||||
loaded_model.load_state_dict(torch.load(model_path, map_location='cpu' if devices.device.type != 'cuda' else None))
|
||||
loaded_model.eval()
|
||||
loaded_model.to(devices.device, devices.dtype)
|
||||
|
||||
Reference in New Issue
Block a user