Spaces:
vilarin
/
Running on Zero

vilarin commited on
Commit
eb3258d
1 Parent(s): 0cccf69

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from diffusers import DiffusionPipeline, UNet2DConditionModel, LCMScheduler
2
  from huggingface_hub import hf_hub_download
3
  from safetensors.torch import load_file
4
  import spaces
@@ -24,7 +24,7 @@ CSS = """
24
  # Ensure model and scheduler are initialized in GPU-enabled function
25
  if torch.cuda.is_available():
26
  unet = UNet2DConditionModel.from_config(base, subfolder="unet").to("cuda", torch.float16)
27
- pipe = DiffusionPipeline.from_pretrained(base, unet=unet, torch_dtype=torch.float16, variant="fp16").to("cuda")
28
 
29
 
30
  # Function
 
1
+ from diffusers import StableDiffusionXLPipeline, UNet2DConditionModel, LCMScheduler
2
  from huggingface_hub import hf_hub_download
3
  from safetensors.torch import load_file
4
  import spaces
 
24
  # Ensure model and scheduler are initialized in GPU-enabled function
25
  if torch.cuda.is_available():
26
  unet = UNet2DConditionModel.from_config(base, subfolder="unet").to("cuda", torch.float16)
27
+ pipe = StableDiffusionXLPipeline.from_pretrained(base, unet=unet, torch_dtype=torch.float16, variant="fp16").to("cuda")
28
 
29
 
30
  # Function