1inkusFace commited on
Commit
a007724
·
verified ·
1 Parent(s): c2001aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -75,14 +75,15 @@ def upload_to_ftp(filename):
75
 
76
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
77
  #vae=AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", use_safetensors=True, subfolder='vae',token=True)
78
- #vaeX=AutoencoderKL.from_pretrained("ford442/stable-diffusion-3.5-large-fp32", safety_checker=None, use_safetensors=True, subfolder='vae', low_cpu_mem_usage=False, torch_dtype=torch.float32, token=True)
79
 
80
  pipe = StableDiffusion3Pipeline.from_single_file(
81
  "https://huggingface.co/1inkus/sd35-large-UltraReal-bf16-DDUF/blob/main/sd3-bf16-large.dduf",
82
  #tokenizer_3=T5TokenizerFast.from_pretrained("ford442/stable-diffusion-3.5-large-bf16", add_prefix_space=False, use_fast=True, subfolder="tokenizer_3"),
83
  use_safetensors=True,
 
84
  #devive_map='auto',
85
- ).to(device=device, dtype=torch.bfloat16)
86
 
87
  ### pipe = StableDiffusion3Pipeline.from_pretrained(
88
  #"stabilityai # stable-diffusion-3.5-large",
@@ -111,8 +112,9 @@ pipe = StableDiffusion3Pipeline.from_single_file(
111
  #pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/UltraReal.safetensors")
112
 
113
  #pipe.to(device=device) #, dtype=torch.bfloat16)
114
- #pipe.to(device)
115
- #pipe.vae=vaeX.to('cpu')
 
116
  upscaler_2 = UpscaleWithModel.from_pretrained("Kim2091/ClearRealityV1").to(torch.device('cuda'))
117
 
118
  MAX_SEED = np.iinfo(np.int32).max
 
75
 
76
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
77
  #vae=AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", use_safetensors=True, subfolder='vae',token=True)
78
+ vaeX=AutoencoderKL.from_pretrained("ford442/stable-diffusion-3.5-large-fp32", safety_checker=None, use_safetensors=True, subfolder='vae', low_cpu_mem_usage=False, torch_dtype=torch.float32, token=True)
79
 
80
  pipe = StableDiffusion3Pipeline.from_single_file(
81
  "https://huggingface.co/1inkus/sd35-large-UltraReal-bf16-DDUF/blob/main/sd3-bf16-large.dduf",
82
  #tokenizer_3=T5TokenizerFast.from_pretrained("ford442/stable-diffusion-3.5-large-bf16", add_prefix_space=False, use_fast=True, subfolder="tokenizer_3"),
83
  use_safetensors=True,
84
+ dtype=torch.bfloat16,
85
  #devive_map='auto',
86
+ ) #.to(device=device)
87
 
88
  ### pipe = StableDiffusion3Pipeline.from_pretrained(
89
  #"stabilityai # stable-diffusion-3.5-large",
 
112
  #pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/UltraReal.safetensors")
113
 
114
  #pipe.to(device=device) #, dtype=torch.bfloat16)
115
+ pipe.vae=vaeX #.to('cpu')
116
+
117
+ pipe.to(device)
118
  upscaler_2 = UpscaleWithModel.from_pretrained("Kim2091/ClearRealityV1").to(torch.device('cuda'))
119
 
120
  MAX_SEED = np.iinfo(np.int32).max