Instructions to use bglick13/hopper-medium-v2-value-function-hor32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use bglick13/hopper-medium-v2-value-function-hor32 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("bglick13/hopper-medium-v2-value-function-hor32", 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
Update pipeline.py
Browse files- pipeline.py +1 -1
pipeline.py
CHANGED
|
@@ -7,7 +7,7 @@ from diffusers.utils.dummy_pt_objects import DDPMScheduler
|
|
| 7 |
|
| 8 |
|
| 9 |
class ValueGuidedDiffuserPipeline(DiffusionPipeline):
|
| 10 |
-
def __init__(self, value_function: UNet1DModel, unet: UNet1DModel, scheduler: DDPMScheduler, env
|
| 11 |
super().__init__(*args, **kwargs)
|
| 12 |
self.value_function = value_function
|
| 13 |
self.unet = unet
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
class ValueGuidedDiffuserPipeline(DiffusionPipeline):
|
| 10 |
+
def __init__(self, value_function: UNet1DModel, unet: UNet1DModel, scheduler: DDPMScheduler, env):
|
| 11 |
super().__init__(*args, **kwargs)
|
| 12 |
self.value_function = value_function
|
| 13 |
self.unet = unet
|