Instructions to use asoderznik/sdx4-upscaler with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use asoderznik/sdx4-upscaler with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("asoderznik/sdx4-upscaler", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Commit ·
43b0eb9
1
Parent(s): 4e4734a
Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -35,7 +35,7 @@ class EndpointHandler():
|
|
| 35 |
|
| 36 |
self.pipe = StableDiffusionUpscalePipeline.from_pretrained(self.path, torch_dtype=torch.float16)
|
| 37 |
self.pipe = self.pipe.to(device)
|
| 38 |
-
self.pipe.enable_xformers_memory_efficient_attention()
|
| 39 |
logger.info('data received %s', data)
|
| 40 |
inputs = data.get("inputs")
|
| 41 |
logger.info('inputs received %s', inputs)
|
|
|
|
| 35 |
|
| 36 |
self.pipe = StableDiffusionUpscalePipeline.from_pretrained(self.path, torch_dtype=torch.float16)
|
| 37 |
self.pipe = self.pipe.to(device)
|
| 38 |
+
#self.pipe.enable_xformers_memory_efficient_attention()
|
| 39 |
logger.info('data received %s', data)
|
| 40 |
inputs = data.get("inputs")
|
| 41 |
logger.info('inputs received %s', inputs)
|