alfredplpl commited on
Commit
c4a4f41
1 Parent(s): c539588

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
4
  import numpy as np
5
  import random
6
  import torch
7
- import torch
8
  from diffusers import Transformer2DModel, PixArtSigmaPipeline, AutoencoderKL, DPMSolverMultistepScheduler, DDIMScheduler, EulerAncestralDiscreteScheduler, DPMSolverSDEScheduler
9
  from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, QuantoConfig, EetqConfig
10
 
@@ -15,7 +15,8 @@ MAX_SEED = np.iinfo(np.int32).max
15
 
16
  transformer = Transformer2DModel.from_pretrained(
17
  "alfredplpl/commonart-tmp-3",
18
- torch_dtype=weight_dtype
 
19
  )
20
 
21
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=weight_dtype)
 
4
  import numpy as np
5
  import random
6
  import torch
7
+ import os
8
  from diffusers import Transformer2DModel, PixArtSigmaPipeline, AutoencoderKL, DPMSolverMultistepScheduler, DDIMScheduler, EulerAncestralDiscreteScheduler, DPMSolverSDEScheduler
9
  from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, QuantoConfig, EetqConfig
10
 
 
15
 
16
  transformer = Transformer2DModel.from_pretrained(
17
  "alfredplpl/commonart-tmp-3",
18
+ torch_dtype=weight_dtype,
19
+ token=os.environ["TOKEN"]
20
  )
21
 
22
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=weight_dtype)