ritwikraha commited on
Commit
09d39fb
1 Parent(s): 4a2914e

chore: creating app

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import torch
 
2
  from PIL import Image
3
  from diffusers import DiffusionPipeline, AutoencoderKL
4
  from gradio import Interface
@@ -16,7 +17,7 @@ pipe.load_lora_weights("ritwikraha/khabib_sketch_LoRA") # Assuming correct mode
16
  # Move models to CUDA if available (outside of the app function for efficiency)
17
  if torch.cuda.is_available():
18
  pipe.to("cuda")
19
-
20
  @spaces.GPU
21
  def inference(prompt, negative_prompt=None, guidance_scale=3, num_inference_steps=50):
22
  """Generates an image using the Stable Diffusion XL model with LoRA weights.
 
1
  import torch
2
+ import spaces
3
  from PIL import Image
4
  from diffusers import DiffusionPipeline, AutoencoderKL
5
  from gradio import Interface
 
17
  # Move models to CUDA if available (outside of the app function for efficiency)
18
  if torch.cuda.is_available():
19
  pipe.to("cuda")
20
+
21
  @spaces.GPU
22
  def inference(prompt, negative_prompt=None, guidance_scale=3, num_inference_steps=50):
23
  """Generates an image using the Stable Diffusion XL model with LoRA weights.