Instructions to use wkqin/robotransfer-high-resolution with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use wkqin/robotransfer-high-resolution with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("wkqin/robotransfer-high-resolution", 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
Upload guider.py
Browse files- normal_guider_net/guider.py +19 -0
normal_guider_net/guider.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch.nn as nn
|
| 2 |
+
from diffusers.configuration_utils import ConfigMixin, register_to_config
|
| 3 |
+
from diffusers.models.modeling_utils import ModelMixin
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
class GuiderNet(ModelMixin, ConfigMixin):
|
| 7 |
+
@register_to_config
|
| 8 |
+
def __init__(self, in_channels=3, mid_channels=4, out_channels=8):
|
| 9 |
+
super().__init__()
|
| 10 |
+
self.layers = nn.Sequential(
|
| 11 |
+
nn.Conv2d(in_channels, mid_channels, 4, 2, 1),
|
| 12 |
+
nn.SiLU(),
|
| 13 |
+
nn.Conv2d(mid_channels, mid_channels, 4, 2, 1),
|
| 14 |
+
nn.SiLU(),
|
| 15 |
+
nn.Conv2d(mid_channels, out_channels, 4, 2, 1),
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
+
def forward(self, x):
|
| 19 |
+
return self.layers(x)
|