Spaces:
Runtime error
Runtime error
Download history_guidance.py from kiwhansong/diffusion-forcing-transformer: direct link, hf CLI and curl.
- Browser
- Download file 744 Bytes
-
https://huggingface.co/spaces/kiwhansong/diffusion-forcing-transformer/resolve/8a4cde99e2e6f578945ad5e4d39344e9d5452b5a/history_guidance.py
- Command line
-
hf download hf://spaces/kiwhansong/diffusion-forcing-transformer@8a4cde99e2e6f578945ad5e4d39344e9d5452b5a/history_guidance.py
-
curl -L -o history_guidance.py https://huggingface.co/spaces/kiwhansong/diffusion-forcing-transformer/resolve/8a4cde99e2e6f578945ad5e4d39344e9d5452b5a/history_guidance.py
744 Bytes
| from algorithms.dfot.history_guidance import HistoryGuidance as _HistoryGuidance | |
| class HistoryGuidance(_HistoryGuidance): | |
| def smart( | |
| cls, | |
| x_angle: float, | |
| y_angle: float, | |
| distance: float, | |
| visualize: bool = False, | |
| ): | |
| if abs(x_angle) < 30 and abs(y_angle) < 30 and distance < 150: | |
| return cls.stabilized_fractional( | |
| guidance_scale=4.0, | |
| stabilization_level=0.02, | |
| freq_scale=0.4, | |
| visualize=visualize, | |
| ) | |
| else: | |
| return cls.stabilized_vanilla( | |
| guidance_scale=4.0, | |
| stabilization_level=0.02, | |
| visualize=visualize, | |
| ) |