Tramac commited on
Commit
2bc874f
1 Parent(s): 61f257d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,7 +9,8 @@ repo = "Tramac/style-portrait-v1-5"
9
  pipeline = StableDiffusionPipeline.from_pretrained(
10
  repo,
11
  torch_dtype=torch.float16,
12
- ).to("cuda")
 
13
 
14
  @spaces.GPU(enable_queue=True)
15
  def generate_image(prompt, neg_prompt):
 
9
  pipeline = StableDiffusionPipeline.from_pretrained(
10
  repo,
11
  torch_dtype=torch.float16,
12
+ )
13
+ pipeline.enable_model_cpu_offload()
14
 
15
  @spaces.GPU(enable_queue=True)
16
  def generate_image(prompt, neg_prompt):