Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -57,8 +57,8 @@ pipeline = AutoPipelineForImage2Image.from_pretrained(
|
|
57 |
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
|
58 |
)
|
59 |
pipeline.load_lora_weights('pytorch_lora_weights_00.safetensors')
|
60 |
-
|
61 |
-
|
62 |
|
63 |
# Define the image generation function
|
64 |
def generate_image(prompt, image_url):
|
|
|
57 |
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True
|
58 |
)
|
59 |
pipeline.load_lora_weights('pytorch_lora_weights_00.safetensors')
|
60 |
+
_ = pipeline.to("cuda")
|
61 |
+
pipeline.enable_model_cpu_offload()
|
62 |
|
63 |
# Define the image generation function
|
64 |
def generate_image(prompt, image_url):
|