Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -102,8 +102,8 @@ def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str
|
|
102 |
return p.replace("{prompt}", positive), n + negative
|
103 |
|
104 |
def load_and_prepare_model():
|
105 |
-
vaeX = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", safety_checker=None,use_safetensors=False,token=HF_TOKEN)
|
106 |
-
sched = EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16',token=HF_TOKEN, subfolder='scheduler',beta_schedule="scaled_linear"
|
107 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
108 |
#'John6666/uber-realistic-porn-merge-ponyxl-urpm-ponyxlhybridv1-sdxl',
|
109 |
#'John6666/uber-realistic-porn-merge-xl-urpmxl-v3-sdxl',
|
@@ -138,7 +138,7 @@ def load_and_prepare_model():
|
|
138 |
pipe.vae = vaeX #.to(torch.bfloat16)
|
139 |
#**** NEVER TO BFLOAT BEFORE CUDA****#
|
140 |
|
141 |
-
#pipe.vae.force_upcast
|
142 |
|
143 |
pipe.scheduler = sched
|
144 |
# pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/Fantasy_World_XL.safetensors", adapter_name="fantasy")
|
|
|
102 |
return p.replace("{prompt}", positive), n + negative
|
103 |
|
104 |
def load_and_prepare_model():
|
105 |
+
vaeX = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", safety_checker=None,use_safetensors=False,torch_dtype=torch.float32,token=HF_TOKEN)
|
106 |
+
sched = EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16',token=HF_TOKEN, subfolder='scheduler',beta_schedule="scaled_linear") #, beta_start=0.00085, beta_end=0.012, steps_offset=1,use_karras_sigmas=True)
|
107 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
108 |
#'John6666/uber-realistic-porn-merge-ponyxl-urpm-ponyxlhybridv1-sdxl',
|
109 |
#'John6666/uber-realistic-porn-merge-xl-urpmxl-v3-sdxl',
|
|
|
138 |
pipe.vae = vaeX #.to(torch.bfloat16)
|
139 |
#**** NEVER TO BFLOAT BEFORE CUDA****#
|
140 |
|
141 |
+
#pipe.vae.force_upcast=True
|
142 |
|
143 |
pipe.scheduler = sched
|
144 |
# pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/Fantasy_World_XL.safetensors", adapter_name="fantasy")
|