From 220c842d22f282544e4d12d277a40f39f85d3c35 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 4 Mar 2023 15:08:51 +0100 Subject: Added Perlin noise to training --- pipelines/stable_diffusion/vlpn_stable_diffusion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pipelines') diff --git a/pipelines/stable_diffusion/vlpn_stable_diffusion.py b/pipelines/stable_diffusion/vlpn_stable_diffusion.py index f02dd72..5f4fc38 100644 --- a/pipelines/stable_diffusion/vlpn_stable_diffusion.py +++ b/pipelines/stable_diffusion/vlpn_stable_diffusion.py @@ -22,7 +22,7 @@ from diffusers import ( PNDMScheduler, ) from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion import StableDiffusionPipelineOutput -from diffusers.utils import logging, randn_tensor +from diffusers.utils import logging from transformers import CLIPTextModel, CLIPTokenizer from models.clip.util import unify_input_ids, get_extended_embeddings @@ -308,7 +308,7 @@ class VlpnStableDiffusion(DiffusionPipeline): def prepare_image(self, batch_size, width, height, dtype, device, generator=None): noise = perlin_noise( - batch_size, width, height, res=1, octaves=4, generator=generator, dtype=dtype, device=device + batch_size, 1, width, height, res=1, octaves=4, generator=generator, dtype=dtype, device=device ).expand(batch_size, 3, width, height) return (1.4 * noise).clamp(-1, 1) -- cgit v1.2.3-70-g09d2