Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import numpy as np
|
|
7 |
from PIL import Image
|
8 |
import spaces
|
9 |
import torch
|
10 |
-
from diffusers import StableDiffusion3Pipeline, DPMSolverMultistepScheduler, AutoencoderKL
|
11 |
from huggingface_hub import snapshot_download
|
12 |
|
13 |
huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
|
@@ -34,7 +34,7 @@ ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD", "0") == "1"
|
|
34 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
35 |
|
36 |
pipe = StableDiffusion3Pipeline.from_pretrained(model_path, torch_dtype=torch.float16)
|
37 |
-
img2img_pipe =
|
38 |
|
39 |
def save_image(img):
|
40 |
unique_name = str(uuid.uuid4()) + ".png"
|
|
|
7 |
from PIL import Image
|
8 |
import spaces
|
9 |
import torch
|
10 |
+
from diffusers import StableDiffusion3Pipeline,StableDiffusion3Img2ImgPipeline, DPMSolverMultistepScheduler, AutoencoderKL
|
11 |
from huggingface_hub import snapshot_download
|
12 |
|
13 |
huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
|
|
|
34 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
35 |
|
36 |
pipe = StableDiffusion3Pipeline.from_pretrained(model_path, torch_dtype=torch.float16)
|
37 |
+
img2img_pipe = StableDiffusion3Img2ImgPipeline.from_pretrained(model_path, torch_dtype=torch.float16)
|
38 |
|
39 |
def save_image(img):
|
40 |
unique_name = str(uuid.uuid4()) + ".png"
|