Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -2,7 +2,7 @@ from typing import Dict, List, Any
|
|
2 |
import base64
|
3 |
from PIL import Image
|
4 |
from io import BytesIO
|
5 |
-
from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, AutoencoderKL, StableDiffusionXLControlNetPipeline
|
6 |
import torch
|
7 |
from diffusers.utils import load_image
|
8 |
|
@@ -11,7 +11,7 @@ from diffusers.utils import load_image
|
|
11 |
import numpy as np
|
12 |
import cv2
|
13 |
import controlnet_hinter
|
14 |
-
|
15 |
# set device
|
16 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
17 |
if device.type != 'cuda':
|
|
|
2 |
import base64
|
3 |
from PIL import Image
|
4 |
from io import BytesIO
|
5 |
+
from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, AutoencoderKL, StableDiffusionXLControlNetPipeline, AutoPipelineForText2Image
|
6 |
import torch
|
7 |
from diffusers.utils import load_image
|
8 |
|
|
|
11 |
import numpy as np
|
12 |
import cv2
|
13 |
import controlnet_hinter
|
14 |
+
# ADDED AUTO PIPE, next try replacing
|
15 |
# set device
|
16 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
17 |
if device.type != 'cuda':
|