JingyeChen22 commited on
Commit
83b9e65
1 Parent(s): 6fbba84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -55,7 +55,7 @@ text_encoder = CLIPTextModel.from_pretrained(
55
  'JingyeChen22/textdiffuser2-full-ft', subfolder="text_encoder"
56
  ).cuda().half()
57
  tokenizer = CLIPTokenizer.from_pretrained(
58
- 'runwayml/stable-diffusion-v1-5', subfolder="tokenizer"
59
  )
60
 
61
  #### additional tokens are introduced, including coordinate tokens and character tokens
@@ -71,7 +71,7 @@ for c in alphabet:
71
  print(len(tokenizer))
72
  print('***************')
73
 
74
- vae = AutoencoderKL.from_pretrained('runwayml/stable-diffusion-v1-5', subfolder="vae").half().cuda()
75
  unet = UNet2DConditionModel.from_pretrained(
76
  'JingyeChen22/textdiffuser2-full-ft', subfolder="unet"
77
  ).half().cuda()
@@ -372,7 +372,7 @@ def text_to_image(guest_id, prompt,keywords,positive_prompt,radio,slider_step,sl
372
  prompts_cond = torch.Tensor(prompts_cond).long().cuda()
373
  prompts_nocond = torch.Tensor(prompts_nocond).long().cuda()
374
 
375
- scheduler = DDPMScheduler.from_pretrained('runwayml/stable-diffusion-v1-5', subfolder="scheduler")
376
  scheduler.set_timesteps(slider_step)
377
  noise = torch.randn((slider_batch, 4, 64, 64)).to("cuda").half()
378
  input = noise
 
55
  'JingyeChen22/textdiffuser2-full-ft', subfolder="text_encoder"
56
  ).cuda().half()
57
  tokenizer = CLIPTokenizer.from_pretrained(
58
+ 'botp/stable-diffusion-v1-5', subfolder="tokenizer"
59
  )
60
 
61
  #### additional tokens are introduced, including coordinate tokens and character tokens
 
71
  print(len(tokenizer))
72
  print('***************')
73
 
74
+ vae = AutoencoderKL.from_pretrained('botp/stable-diffusion-v1-5', subfolder="vae").half().cuda()
75
  unet = UNet2DConditionModel.from_pretrained(
76
  'JingyeChen22/textdiffuser2-full-ft', subfolder="unet"
77
  ).half().cuda()
 
372
  prompts_cond = torch.Tensor(prompts_cond).long().cuda()
373
  prompts_nocond = torch.Tensor(prompts_nocond).long().cuda()
374
 
375
+ scheduler = DDPMScheduler.from_pretrained('botp/stable-diffusion-v1-5', subfolder="scheduler")
376
  scheduler.set_timesteps(slider_step)
377
  noise = torch.randn((slider_batch, 4, 64, 64)).to("cuda").half()
378
  input = noise