ChenWu98 commited on
Commit
90d82c3
1 Parent(s): 6da2189

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -3,6 +3,7 @@ import gradio as gr
3
  import torch
4
  from PIL import Image
5
  import utils
 
6
 
7
  is_colab = utils.is_google_colab()
8
 
@@ -10,7 +11,9 @@ scheduler = DDIMScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="sca
10
  num_train_timesteps=1000, clip_sample=False, set_alpha_to_one=False)
11
 
12
  model_id_or_path = "CompVis/stable-diffusion-v1-4"
13
- pipe = CycleDiffusionPipeline.from_pretrained(model_id_or_path, scheduler=scheduler).to("cuda")
 
 
14
 
15
  if torch.cuda.is_available():
16
  pipe = pipe.to("cuda")
 
3
  import torch
4
  from PIL import Image
5
  import utils
6
+ import streamlit as st
7
 
8
  is_colab = utils.is_google_colab()
9
 
 
11
  num_train_timesteps=1000, clip_sample=False, set_alpha_to_one=False)
12
 
13
  model_id_or_path = "CompVis/stable-diffusion-v1-4"
14
+ pipe = CycleDiffusionPipeline.from_pretrained(model_id_or_path,
15
+ use_auth_token=st.secrets["USER_TOKEN"],
16
+ scheduler=scheduler)
17
 
18
  if torch.cuda.is_available():
19
  pipe = pipe.to("cuda")