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 -0
pipeline.py
CHANGED
|
@@ -82,6 +82,7 @@ class ValueGuidedDiffuserPipeline(DiffusionPipeline):
|
|
| 82 |
|
| 83 |
def __call__(self, obs, batch_size=64, planning_horizon=32, n_guide_steps=2, scale=0.1):
|
| 84 |
# normalize the observations and create batch dimension
|
|
|
|
| 85 |
obs = self.normalize(obs, "observations")
|
| 86 |
obs = obs[None].repeat(batch_size, axis=0)
|
| 87 |
|
|
|
|
| 82 |
|
| 83 |
def __call__(self, obs, batch_size=64, planning_horizon=32, n_guide_steps=2, scale=0.1):
|
| 84 |
# normalize the observations and create batch dimension
|
| 85 |
+
print("I have added a print statement!!")
|
| 86 |
obs = self.normalize(obs, "observations")
|
| 87 |
obs = obs[None].repeat(batch_size, axis=0)
|
| 88 |
|