Skip to content

Commit

Permalink
Remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
quic-prudhvi committed Oct 18, 2024
1 parent aff9740 commit b21ebab
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,22 @@
#
# =============================================================================

import time
from PIL import Image
import os
import shutil
import cv2
import numpy as np
import torch
from transformers import CLIPTokenizer
from diffusers import DPMSolverMultistepScheduler
from modules import paths, shared, modelloader
from modules import paths
from qai_appbuilder import (
QNNContext,
QNNContextProc,
QNNShareMemory,
Runtime,
LogLevel,
ProfilingLevel,
PerfProfile,
QNNConfig,
timer,
)
from diffusers import UNet2DConditionModel
from diffusers.models.embeddings import get_timestep_embedding, TimestepEmbedding
from diffusers import (
DDIMScheduler,
DPMSolverMultistepScheduler,
EulerAncestralDiscreteScheduler,
EulerDiscreteScheduler,
HeunDiscreteScheduler,
LMSDiscreteScheduler,
PNDMScheduler,
)
import qairt_constants as consts
from pipeline_utils import StableDiffusionInput, download_qualcomm_models_hf, UpscalerPipeline, QPipeline, set_scheduler
from modules.safe import unsafe_torch_load as load
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@
#
# =============================================================================

import time
from PIL import Image
import os
import shutil
import cv2
import numpy as np
import torch
from transformers import CLIPTokenizer
from diffusers import DPMSolverMultistepScheduler
from modules import paths, shared, modelloader
from modules import paths
from qai_appbuilder import (
QNNContext,
Runtime,
Expand All @@ -25,17 +21,7 @@
QNNConfig,
timer,
)
from diffusers import UNet2DConditionModel
from diffusers.models.embeddings import get_timestep_embedding, TimestepEmbedding
from diffusers import (
DDIMScheduler,
DPMSolverMultistepScheduler,
EulerAncestralDiscreteScheduler,
EulerDiscreteScheduler,
HeunDiscreteScheduler,
LMSDiscreteScheduler,
PNDMScheduler,
)
import qairt_constants as consts
from pipeline_utils import StableDiffusionInput, UpscalerPipeline, QPipeline, set_scheduler

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,29 @@
#
# =============================================================================

import time
from PIL import Image
import PIL
import os
import sys
import shutil
import cv2
import numpy as np
import torch
from skimage.transform import resize
from modules.safe import unsafe_torch_load as load
from transformers import CLIPTokenizer, CLIPImageProcessor, CLIPVisionModelWithProjection, CLIPTextModel
from transformers import CLIPTokenizer, CLIPImageProcessor
# from modules import paths, shared, modelloader
from qai_appbuilder import (
QNNContext,
QNNContextProc,
QNNShareMemory,
Runtime,
LogLevel,
ProfilingLevel,
PerfProfile,
QNNConfig,
timer,
)
from diffusers import UNet2DConditionModel, DDPMScheduler
from diffusers.pipelines.stable_diffusion.stable_unclip_image_normalizer import StableUnCLIPImageNormalizer
from diffusers.models.embeddings import get_timestep_embedding, TimestepEmbedding, Timesteps
from diffusers import DDPMScheduler
from diffusers.models.embeddings import get_timestep_embedding, TimestepEmbedding
import install
import common_utils as utils
import qairt_constants as consts
from pipeline_utils import StableDiffusionInput, download_qualcomm_models_hf, UpscalerPipeline, QPipeline, set_scheduler
from pipeline_utils import StableDiffusionInput, UpscalerPipeline, QPipeline, set_scheduler


class TextEncoder(QNNContext):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ def run(self, p: StableDiffusionProcessing, qnn_model_name, enable_upscale, upsc
time_start = time.time()

user_seed = get_fixed_seed(p.seed)
supported_samplers = ["DPM++ 2M"]
# if p.sampler_name not in supported_samplers:
# p.sampler_name = "DPM++ 2M"

sd_input = StableDiffusionInput(
self.is_txt2img,
Expand Down

0 comments on commit b21ebab

Please sign in to comment.