Easy, fast, effective, and automatic g-code compression!

Overview

# OctoPrint-MeatPack

Getting to the meat of g-code. Easy, fast, effective, and automatic g-code compression! MeatPack nearly doubles the effective data rate of a standard 115,200 baud-rate serial connection to 210,000 baud!

Firmware with MeatPack Support:

NOTICE: If you have a compatible Creality printer for Marlin Firmware Service, please use the latest firmware image (built after 2021-01-27 12:50:00 UTC) from: https://marlin.crc.id.au/. These builds should all have MeatPack support!

OctoPrint Support:

Should be compatible with any OctoPrint installation providing access to the serial_factory_hook(). According to the API documentation, this was intoruced in OctoPrint version 1.2. As far as Python is concerned, as of MeatPack version 1.5.17, it should be compatible back to 2.7, but it is highly recommended to update to Python 3 if you have not yet done so.

Current Features (v1.5.21)

  1. Fully working g-code compression ("MeatPack") support for compatible printer firmwares. Marlin FW now officially supprots MeatPack, but [NOTE] until Prusa approves these changes, please find builds of the official Prusa Firmware with compression support here: https://github.com/scottmudge/Prusa-Firmware-MeatPack

  2. Added extra data to the "State" side-bar content, updated in real time. It shows transmission statistics: image

    • "Packed Tx" - This is the actual amount of data sent over the serial connection. The data that has been packed.
    • "Total Tx" - This is the effective amount of data sent over the serial connection, after it is unpacked on the other end. Should be close to the original (though OctoPrint often adds error checking data to lines of g-code, so it will be a bit higher).
    • "Comp. Ratio" - This is the compression ratio, bascially a measure of how much bandwidth you are gaining/saving. It's the factor by which the data has been effectively shrunk.
    • "TX Rate" - This is a measure of how much data is being sent over the serial connection per second (average). Updated every ~2 seconds.
    • "Packing State"-- Lets you know if MeatPack compression is enabled or not.

    NOTE: This extra text section can be disabled in the plugin options page.

  3. A feature called "Whitespace Removal", which strips away all unnecessary whitespace from outgoing gcode on the serial port. This also allows the 'E' character to be packed in place of the ' ' space character. This effectively boosts the compression ratio down to 0.55!

  4. Added an optional feature (can be enabled in plugin settings) to play a "meatball" song on the printer after a print is completed. See the bottom of the readme why everything is "meat" themed.

NOTE: To use MeatPack, please install an updated build of Marlin Firmware with MeatPack support integrated, or for Prusa printers, install compatible version of the Prusa firmware here:

Prusa Firmware with MeatPack-support (MP-Firmware v1.1.0, based on Prusa FW 3.9.3): https://github.com/scottmudge/Prusa-Firmware-MeatPack/releases/tag/v3.9.3-MP1.1.0

Installation

UPDATE: OctoPrint has approved this plugin for the official plugin repository, so it should be available to install via the in-built plugin manager now. If you'd still rather manually install it, please follow the instructions below.

  1. Install via the OctoPrint plugin manager.

-OR-

  1. Open a terminal or console (or SSH into your Raspberry Pi if using one) and activate OctoPrint's virtual environment (Python). Typically this will be in ~/oprint/. You can activate the virtual environment by using the following command:

source ~/oprint/bin/activate

  1. After activating the OctoPrint environment, run the following command:

pip install https://github.com/scottmudge/OctoPrint-MeatPack/archive/v1.5.9.zip

  1. Restart your OctoPrint server, or restart the machine.

  2. After installation, you should see a "MeatPrint" options page, and a new "TX Statistics" section in the "State" side bar section (if connected to your printer).

Known Limitations:

  1. This requires a minor modification to your printer's firmware! Marlin has officially adopted support, but Prusa is currently reviewing changes. I have currently compiled modified firmware for Prusa's MK3/3S printers, available above.

  2. It doesn't work with the Virtual Printer in OctoPrint. Obviously... it's not a real serial connection.

Why compress/pack G-Code? What is this?

It's been often reported that using OctoPrint's serial interface can often cause performance bottlenecks for printer firmware. Many popular printers (e.g., Prusa's MK3) are limited to ~115200 baud. For many simple prints, this works fine. But for prints with numerous, small, or quickly-traversed curves, this can pose a problem.

In g-code, these many small curves are broken down into very short line-segments. These line segments are each described as cartesian points, for instance:

...
G1 X125.824 Y95.261 E0.00907
G1 X125.496 Y95.249 E0.01145
G1 X123.181 Y92.934 E0.11420
...

All this text might describe only a couple hundred microns of travel. When printing at higher speeds, you can see how much text actually needs to be transferred over the serial connection.

This can cause stuttering or other issues while printing, leading to sub-par print quality.

There have been a few attempts to get around this problem in the past. One example, Arc Welder, replaces these linear line segments with close-approximate arc equivalents (radians + radius). This does solve the problem of reducing g-code size, but not all printer firmwares are compatible with these arc-type g-codes, and it is left up to the printer firmware to linearize these arcs back into cartesian line segments. Not all firmwares do this well, and often the firmware CPU can be bogged down with this costly computation.

So what does MeatPack do?

MeatPack takes a different approach. Instead of modifying the g-code or replacing commands, it insteads uses a more efficient way of transferring the data from PC/Host to Firmware.

G-code at its core is a fairly simple language, which uses a restricted alphabet. There are only a few characters which are actually being used to represent a vast majority of g-code -- numbers, decimal point, a few letters ('G', 'M', 'E', etc.), and other utilitiy characters (newline, space, etc.).

I performed a basic histographic analysis of about a dozen g-code files, and found that ~93% of all g-code uses the same 15 characters! And yet we are using characters sized to fit a potential 256-character alphabet!

So what MeatPack does is get to the meat of the g-code! At its core, MeatPack is dynamically packing 2 characters into a single 8-bits/1-byte, effectively doubling data density. Using a lookup table, MeatPack is able to represent any character from the list of the 15-most-common found in g-code with only 4-bits.

Why only 15-most common if 4-bits allows 16 possible characters? Well I also needed a way to send full-width characters in the event that any character does not fall into the list of the 15-most common. So the 16th permutation (0b1111) is used as a flag to tell the unpacker that it should expect a full-width character at some point.

MeatPack also provides for a rudimentary communication/control layer by using a special character (0xFF) sent in a specific sequence. 0XFF is virtually never found naturally in g-code, so it is can be considered a reserved character.

How does it work?

Here is an example. Take the following "G1" command.

G1 X113.214 Y91.45 E1.3154

Unpacked, it is sent as distinct bytes (B):

(G) (1) ( ) (X) (1) (1) (3) (.) (2) (1) (4) ( ) (Y) (9) (1) (.) (4) (5) ( ) (E) (1) (.) (3) (1) (5) (4) (\n)

In total, 27 bytes.

It is effectively packed as the following -- note that parenthetical groups (XX) indicate that the contents are packed as a single byte:

(G1) ( X) (11) (3.) (21) (4 ) (9#)* (Y) (1.) (45) (# )* (E) (1.) (31) (54) (\n)

or with "Whitespace Removal" active:

(G1) (X1) (13) (.2) (14) (9#) (Y) (1.) (45) (E1) (.3) (15) (4\n)

* these bytes don't show character order, but bit order. Higher order bits on left, lower order bits on right. See below. The other characters are sequential and only show how they are paired in bytes.

The packer reorders some characters if the full width character is surrounded by packable characters. The # here is a flag (0b1111) which tells the unpacker where the following full width character should go.

In this way, 4 bits aren't wasted telling the packer that only one full width character is coming up. 0xFF (0b11111111) tells the unpacker that the next 2 bytea are full width.

If 0b1111 is in the lower 4 bits, the full width character is immediately following, and the packed character in the upper 4 bits goes after the full width character. If it's in the higher 4 bits, the full width character goes after the character packed in the lower 4 bits. And if both upper and lower 4 bits are set to 1111, the next 2 characters are full width.

So 16 bytes in this example (13 bytes with Whitespace Removal active). This is on-par or better than binary packing. With whitespace removal active, the packed command is less than half the size of the original command.

This minor reordering is undone in the unpacking stage in the firmware. A little more complex, but it allows slightly more data to be packed.

This is also why the command sequence is 2 0xFF bytes in a row, followed by a command byte. If packing is enabled, 0xFF means the next character is some standard ASCII character (or at the very least not 0xFF), so 2 0xFF bytes in a row would never occur naturally except in these control/command sequences. And if packing is disabled, 0xFF is an invalid g-code character (the Prusa firmware even discards all bytes higher than 127U). This command signal preamble can be increased to 3 or more 0xFF bytes if some firmwares tend to have these bytes in error more frequently. But from what I've seen, it's generally 0x0 or null bytes which are received or sent in error. For instance, in noisy or unshielded connections.

Why "Meat"?

My cat's name is Meatball, I thought it sounded fun.

Obligatory cat photo:

photo

Comments
  • can't connect to ender 3 v2 with meatpack plugin installed

    can't connect to ender 3 v2 with meatpack plugin installed

    I'm running octoprint Version 1.5.3 on octopi Version 0.17.0, running on Raspberry Pi 4 Model B Rev 1.2. When I install meatpack 1.5.14 I can't connect to the printer via USB anymore. I have tried disabling the gcode compression and whitespace options. I've also tried with a marlin firmware version from https://marlin.crc.id.au/firmware/Ender%203%20V2%20-%20v4.2.7%20Board%20-%20BLTouch/ .. If I use the previous version without meatpack or the new version with meatpack both have the same problem. If the plugin is installed for meatpack I can't connect to the printer. If I remove the plugin I can connect to the printer just fine. I'm connecting to /ttyUSB0 @ 115200 with no problem. RIght now I removed the plugin and using the EEPROM editor plugin for octoprint I can see the meatpack option is set to true (and was false on the previous version) .. I'll submit this and make sure I clean up the plugin (I had tried installing 1.5.9 earlier and it wasn't working.. I tried again and it installed 1.5.14 but I didn't do a fresh install.. I'll try that.)

    opened by swheettaos 36
  • MeatPack with Causes 175% cpu usage and crashes octoprint/serial during PID tuning

    MeatPack with Causes 175% cpu usage and crashes octoprint/serial during PID tuning

    This makes the PID "fail" as you never get the terminal output values so you can put them into eeprom.

    Some times octo recovers and unfreezes, but you miss the pid info as the terminal doesn't output during the high cpu usage.

    With meatpack disabled PID works fine CPU never goes above 8% usage @800mhz total. Meatpack on as you can see below its CPU flogged up to 175% cpu on a single thread @1.2GHz cores.

    image

    When Octoprint does manage to recover the Webui is responsive but the terminal stops accepting commands/gcode so the Octoprint service has to be restarted

    Not sure if its the plugin or octo but its sure giving me grief.

    As a side note Printing with Meatpack on is flawless, its only when PID tuning.

    here is the example of my PID tune command.

    M303 C25 E-1 S60 U

    opened by GhostlyCrowd 23
  • Checksum errors when using Remove All Whitespace (

    Checksum errors when using Remove All Whitespace ("G" Commands Only)

    When this option is enabled, the checksum for commands fails - I believe because the spaces have been removed, the checksums need to be updated to reflect this.

    Built with:

    #define MEATPACK
    #define MEATPACK_LOOKUP_TABLE
    

    Octoprint terminal log:

    Changing monitoring state from "Operational" to "Starting"
    Send: N0 M110 N0*125
    Recv: ok N0 P15 B3
    Send: N1 G28 O*125
    [...]
    Printer seems to support the busy protocol, will adjust timeouts and set busy interval accordingly
    [...]
    Recv: X:151.00 Y:115.00 Z:11.80 E:0.00 Count X:12080 Y:9200 Z:4720
    Recv: ok N1 P15 B3
    Send: N2 M113 S2*99
    Recv: ok N2 P15 B3
    Send: N3 G29 O*126
    [...]
    Recv: Bilinear Leveling Grid:
    Recv:       0      1      2      3      4
    Recv:  0 +0.082 +0.075 +0.053 +0.058 +0.058
    Recv:  1 +0.025 +0.048 +0.020 +0.013 +0.030
    Recv:  2 +0.028 +0.025 +0.020 +0.005 +0.023
    Recv:  3 +0.038 +0.035 +0.020 +0.015 +0.028
    Recv:  4 +0.055 +0.055 +0.045 +0.035 +0.045
    Recv: 
    Recv: X:220.00 Y:220.00 Z:11.80 E:0.00 Count X:17600 Y:17600 Z:4720
    Recv: ok N3 P15 B3
    Send: N4 M500*34
    [...]
    Recv: ok N4 P15 B3
    Send: N5 M420 S1*98
    Recv: echo:Bed Leveling ON
    Recv: echo:Fade Height 10.00
    Recv: ok N5 P15 B3
    Changing monitoring state from "Starting" to "Printing"
    Send: N6 M201 X500 Y500 Z100 E5000*12
    [...]
    Recv: Error:checksum mismatch, Last Line: 5
    Recv: Resend: 6
    Recv: ok N2 P15 B4
    Send: N6 M201 X500 Y500 Z100 E5000*12
    Recv: Error:checksum mismatch, Last Line: 5
    Recv: Resend: 6
    Recv: ok N2 P15 B4
    Send: N6 M201 X500 Y500 Z100 E5000*12
    Recv: Error:checksum mismatch, Last Line: 5
    Recv: Resend: 6
    Recv: ok N2 P15 B4
    Send: N6 M201 X500 Y500 Z100 E5000*12
    Recv: Error:checksum mismatch, Last Line: 5
    Recv: Resend: 6
    Recv: ok N2 P15 B4
    Send: N6 M201 X500 Y500 Z100 E5000*12
    Recv: Error:checksum mismatch, Last Line: 5
    Recv: Resend: 6
    Recv: ok N2 P15 B4
    Send: N6 M201 X500 Y500 Z100 E5000*12
    Recv: Error:checksum mismatch, Last Line: 5
    Recv: Resend: 6
    Recv: ok N2 P15 B4
    Send: N6 M201 X500 Y500 Z100 E5000*12
    Recv: Error:checksum mismatch, Last Line: 5
    Recv: Resend: 6
    Recv: ok N2 P15 B4
    Send: N6 M201 X500 Y500 Z100 E5000*12
    Recv: Error:checksum mismatch, Last Line: 5
    Recv: Resend: 6
    Recv: ok N2 P15 B4
    Send: N6 M201 X500 Y500 Z100 E5000*12
    Recv: Error:checksum mismatch, Last Line: 5
    Recv: Resend: 6
    Recv: ok N2 P15 B4
    Send: N6 M201 X500 Y500 Z100 E5000*12
    Recv: Error:checksum mismatch, Last Line: 5
    Recv: Resend: 6
    Recv: ok N2 P15 B4
    Send: N6 M201 X500 Y500 Z100 E5000*12
    Recv: Error:checksum mismatch, Last Line: 5
    Recv: Resend: 6
    Printer keeps requesting line 6 again and again, communication stuck
    Changing monitoring state from "Printing" to "Error: Printer keeps requesting line 6 again and again, communication stuck"
    Send: M112
    Send: N7 M112*38
    Send: N8 M104 T0 S0*41
    Send: N9 M140 S0*108
    Changing monitoring state from "Error: Printer keeps requesting line 6 again and again, communication stuck" to "Offline (Error: Printer keeps requesting line 6 again and again, communication stuck)"
    Connection closed, closing down monitor
    Closing down send loop
    
    opened by CRCinAU 17
  • Error Loading MeatPack plugin

    Error Loading MeatPack plugin

    Hello - having issues trying to load the MeatPack Plugin into OctoPrint after installing via terminal approach, per the documentation provided. I am using a Raspberry Pi Zero W, and my printer is a Prusa i3 MK3S.

    I am able to successfully instal the plugin, but after rebooting OctoPrint I am receiving the following errors:

    2021-01-26 16:32:07,610 - octoprint.plugin.core - ERROR - Error loading plugin meatpack File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint_MeatPack/__init__.py", line 10, in <module> from OctoPrint_MeatPack.packing_serial import PackingSerial File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint_MeatPack/packing_serial.py", line 24 Thanks for your help.

    opened by dsundt 11
  • Can't connect to printer with Marlin built after 25/01/2021

    Can't connect to printer with Marlin built after 25/01/2021

    Hi! I'm using the firmware from the Marlin Firmware Service, built on 26/01/2021 on my Ender3v2 with BLTouch. (The service builtds the the bugfix-2.0 branch daily)

    After installing MeatPack, connection attempts to my printer fail. This issue can be fixed by disabling MeatPack. As far as I understand (based on the readme), this should work, although I couldn't find the merged PR.

    I suspect that this is due to the compression not being compatible with the firmware. Hopefully it's temporary, just wanted to let you know that others might be encountering the same issue.

    Thanks for the plugin!

    opened by daemuth 7
  • Suggestion / Comment: Pre-process files rather than compressing on the fly

    Suggestion / Comment: Pre-process files rather than compressing on the fly

    While reading the description of this plugin, one thing that occurred to me is that this plugin is directly in the path for every serial send (unless I misunderstood). While the compression itself may take very little CPU, having something else "in the way" could be the source of problems (see DisplayLayerProgress's github for issues about layers shift as an example of something that gets called often potentially being a problem). Some folks have a lot of things running on their RPi, and it's not exactly a real time OS.

    Instead of processing the g-code stream live, you could do it beforehand, similar to how ArcWelder does it. With ArcWelder, the output file can overwrite the original, or just create a new file.

    opened by kellybyrd 5
  • Illustration Suggestion

    Illustration Suggestion

    Could you possibly please give a few examples of before and after gcodes? It's faster to understand what you are doing by just seeing the direct result than by tryna read code to understand what is happening. Picture's worth a thousand words as they say.

    opened by yash-fn 5
  • No settings or TX statistics

    No settings or TX statistics

    The title says it all. MeatPack shows up as an installed plugin, but there is no options page nor statistics visible in the web interface. I've installed the plugin twice and rebooted the Pi and printer. What could have gone wrong here? Anyone else with the same issue?

    System info:

    • Raspberry Pi Zero W Rev 1.1
    • Prusa MK3S with MeatPack-firmware 3.9.3
    • Octoprint version 1.5.2
    • MeatPack 1.2.11
    opened by robdan7 4
  • Error Marlin\src\feature\meatpack.cpp:48:1: error: stray '@' in program compiling Marlin2

    Error Marlin\src\feature\meatpack.cpp:48:1: error: stray '@' in program compiling Marlin2

    I've tried to compile adding a #define MEATPACK command line into config.h and adding meatpack.h and meatpack.cpp into the src/features folder but i get this error. It seems that PlatformIO doen't like @ maybe it's a stupid question but i don't know how to fix it (attention newbie onlne!) meatpack.h and .cpp was merely capied and paste into new files into the folder mentioned above.

    opened by davbcr 2
  • [Enhancement] Dynamic size display adjustment

    [Enhancement] Dynamic size display adjustment

    Hi! I have some code you might be able to use to improve the UI display a tiny bit. Check out this code to adjust the units (b, kB, MB, GB, etc..) based on the supplied size in bytes and precision. If it's not something you want/need, that's fine, but I thought you might be interested.

    Anyway, I like your plugin, and am hoping your PR gets accepted. If you can't get it into the prusa code, I think you should try the Marlin github. Seems like a no brainer.

    opened by FormerLurker 2
  • OctoPrint Repository

    OctoPrint Repository

    I tried finding this on the public OctoPrint Repo (https://plugins.octoprint.org/) and did not have any luck. Are there plans to post it there or is manual install going to be the only method for using this plugin?

    opened by Cjkeenan 2
  • Javascript console errors during loading

    Javascript console errors during loading

    I'm not having any issues with Meatpack so far, but I noticed that it always throws some errors when loading: image

    I'm not sure if that affects performance or the functioning anyhow.

    opened by luizbgomide 0
  • Longest command byte count

    Longest command byte count

    Since this plugin effectively reduces the per-line byte count, it would be useful to figure out how many bytes are required to hold the longest possible valid compressed Gcode command; that way receive buffers can be sized appropriately on the printer. e.g. marlin's MAX_CMD_SIZE

    opened by DickyMcCockpants 0
  • Keeps disconecting during prints

    Keeps disconecting during prints

    It couldn't connect to the printer at first but after manually setting the port and the baudrate now I can connect to it, but it keeps disconnecting from time to time also during prints...

    opened by jbrandek 0
  • Cleanup of js UI and settings

    Cleanup of js UI and settings

    Fixed the js console bug: Javascript/console errors #21 Added an option to move meatpack stats into its own panel (Move MeatPack stats into a sidebar tab #15) Did a bit of improvements on the locale strings. Removed unused viewmodels and overloading of knockout - now more vanilla js (ahh jquery) updating.

    opened by LazeMSS 0
  • Javascript/console errors

    Javascript/console errors

    I see a lot of these:

    packed_core.js?2d5b3bfb:1186 Error calling onStartup on view model MeatPackViewModel : TypeError: Cannot set properties of null (setting 'innerHTML')
        at MeatPackViewModel.self.updateAllText (http://localhost:5000/static/webassets/packed_plugins.js?34f3337b:6779:88)
        at MeatPackViewModel.self.onStartup.self.onUserLoggedIn (http://localhost:5000/static/webassets/packed_plugins.js?34f3337b:6765:26)
        at callViewModelIf (http://localhost:5000/static/webassets/packed_core.js?2d5b3bfb:1185:126)
        at http://localhost:5000/static/webassets/packed_core.js?2d5b3bfb:1179:138
        at Pn (http://localhost:5000/static/webassets/packed_libs.js?1fe9f29c:30:530)
        at Function.<anonymous> (http://localhost:5000/static/webassets/packed_libs.js?1fe9f29c:51:66)
        at callViewModelsIf (http://localhost:5000/static/webassets/packed_core.js?2d5b3bfb:1179:95)
        at callViewModels (http://localhost:5000/static/webassets/packed_core.js?2d5b3bfb:1178:56)
        at fetchSettings (http://localhost:5000/static/webassets/packed_core.js?2d5b3bfb:1252:282)
        at sentryWrapped (http://localhost:5000/static/webassets/packed_core.js?2d5b3bfb:630:45619)
    

    It's this line: https://github.com/scottmudge/OctoPrint-MeatPack/blob/master/OctoPrint_MeatPack/static/js/meatpack.js#L150 I think you need to move the updates of the UI into the onAllBound

    packed_core.js?2d5b3bfb:1248 Could not bind view model MeatPackViewModel to target #meatpack_total_tx_string : Error: You cannot apply bindings multiple times to the same element.
        at p (http://localhost:5000/static/webassets/packed_libs.js?1fe9f29c:131:3221)
        at k (http://localhost:5000/static/webassets/packed_libs.js?1fe9f29c:131:2747)
        at Object.a.vc (http://localhost:5000/static/webassets/packed_libs.js?1fe9f29c:132:3231)
        at http://localhost:5000/static/webassets/packed_core.js?2d5b3bfb:1247:8
        at Pn (http://localhost:5000/static/webassets/packed_libs.js?1fe9f29c:30:530)
        at Function.<anonymous> (http://localhost:5000/static/webassets/packed_libs.js?1fe9f29c:51:66)
        at http://localhost:5000/static/webassets/packed_core.js?2d5b3bfb:1242:26
        at Pn (http://localhost:5000/static/webassets/packed_libs.js?1fe9f29c:30:530)
        at Function.<anonymous> (http://localhost:5000/static/webassets/packed_libs.js?1fe9f29c:51:66)
        at bindViewModels (http://localhost:5000/static/webassets/packed_core.js?2d5b3bfb:1233:106)
        at sentryWrapped (http://localhost:5000/static/webassets/packed_core.js?2d5b3bfb:630:45619)
    

    Not sure about this one

    opened by LazeMSS 2
Releases(v1.5.21)
  • v1.5.21(Jan 27, 2021)

    Version 1.5.21 - Marlin Fixes

    Minor changes to fix compatibility with updated Marlin builds.

    NOTICE:

    If you have a compatible Creality printer for Marlin Firmware Service, please use the latest firmware image (built after 2021-01-27 12:50:00 UTC) from: https://marlin.crc.id.au/. These builds should all have MeatPack support!

    For Prusa MK3 printers with Einsy boards, you can find a custom build of the firmware (with MeatPack firmware module edition v1.1.0) here: https://github.com/scottmudge/Prusa-Firmware-MeatPack/releases/tag/v3.9.3-MP1.1.0

    Installation

    The plugin should be available from the OctoPrint plugin repository now!

    NOTE:

    I have extensively tested this release without issue on my own MK3S, but use this firmware at your own risk. I am not responsible for anything that may happen due to incorrect firmware flashing, incorrect software usage, etc.

    Source code(tar.gz)
    Source code(zip)
  • v1.5.18(Jan 27, 2021)

    Version 1.5.18 - Whitespace Removal Changes

    Whitespace removal has been explicitly restricted to "G" commands for compatibility.

    NOTE:

    You will need a compatible firmware for this. Marlin merged support a couple days ago, so you will need a build that has been created since then. For Prusa MK3 printers with Einsy boards, you can find a custom build of the firmware (with MeatPack firmware module edition v1.1.0) here: https://github.com/scottmudge/Prusa-Firmware-MeatPack/releases/tag/v3.9.3-MP1.1.0

    Installation

    The plugin should be available from the OctoPrint plugin repository now!

    NOTE:

    I have extensively tested this release without issue on my own MK3S, but use this firmware at your own risk. I am not responsible for anything that may happen due to incorrect firmware flashing, incorrect software usage, etc.

    Source code(tar.gz)
    Source code(zip)
  • v1.5.17(Jan 27, 2021)

    Version 1.5.17 - Compatibility Update Again, Python 2.7

    Further compatibility updates for Python 2.7. I'm pretty sure everything should be working now. It appears to run fine in a virtual printer/test environment.

    If you have installed Version 1.5.14 and have Python 2.7.X, please install this version.

    NOTE:

    You will need a compatible firmware for this. Marlin merged support a couple days ago, so you will need a build that has been created since then. For Prusa MK3 printers with Einsy boards, you can find a custom build of the firmware (with MeatPack firmware module edition v1.1.0) here: https://github.com/scottmudge/Prusa-Firmware-MeatPack/releases/tag/v3.9.3-MP1.1.0

    Installation

    The plugin should be available from the OctoPrint plugin repository now!

    NOTE:

    I have extensively tested this release without issue on my own MK3S, but use this firmware at your own risk. I am not responsible for anything that may happen due to incorrect firmware flashing, incorrect software usage, etc.

    Source code(tar.gz)
    Source code(zip)
  • v1.5.9(Jan 26, 2021)

    Version 1.5.9 - Compatibility Update

    This update is to improve compatibility with older versions of Python. I have tested on Python 3.5 and 3.7, but according to a code inspection tool, it should in theory be compatible back to 2.7. HOWEVER, it is HIGHLY recommended to upgrade to Python 3! Python 2.7 is quickly becoming a fading memory.

    NOTE:

    You will need a compatible firmware for this. Marlin merged support a couple days ago, so you will need a build that has been created since then. For Prusa MK3 printers with Einsy boards, you can find a custom build of the firmware (with MeatPack firmware module edition v1.1.0) here: https://github.com/scottmudge/Prusa-Firmware-MeatPack/releases/tag/v3.9.3-MP1.1.0

    Installation

    The plugin should be available from the OctoPrint plugin repository now!

    NOTE:

    I have extensively tested this release without issue on my own MK3S, but use this firmware at your own risk. I am not responsible for anything that may happen due to incorrect firmware flashing, incorrect software usage, etc.

    Source code(tar.gz)
    Source code(zip)
  • v1.4.3(Jan 26, 2021)

    Version 1.4.3 - Minor Update

    This update is minor. Included is the removal of unused control commands, and minor rearrangement of the settings page.

    NOTE:

    It is highly recommended to use the updated firmware with this release! Otherwise the "Whitespace Removal" feature will not work! Please get the updated version of the v3.9.3 Prusa MK3 firmware (with MeatPack firmware module edition v1.1.0) here: https://github.com/scottmudge/Prusa-Firmware-MeatPack/releases/tag/v3.9.3-MP1.1.0

    Installation

    (I am still waiting for OctoPrint to approve this plugin, but for the time being, follow the instructions below)

    1. Ensure you have installed the updated firmware linked above!

    2. Open a terminal or console (or SSH into your Raspberry Pi if using one) and activate OctoPrint's virtual environment (Python). Typically this will be in ~/oprint/. You can activate the virtual environment by using the following command:

    source ~/oprint/bin/activate

    1. After activating the OctoPrint environment, run the following command:

    pip install https://github.com/scottmudge/OctoPrint-MeatPack/archive/v1.4.3.zip

    1. Restart your OctoPrint server, or restart the machine.

    2. After installation, you should see a "MeatPrint" options page, and a new "TX Statistics" section in the "State" side bar section (if connected to your printer).


    NOTE:

    I have extensively tested this release without issue on my own MK3S, but use this firmware at your own risk. I am not responsible for anything that may happen due to incorrect firmware flashing, incorrect software usage, etc.

    Source code(tar.gz)
    Source code(zip)
  • v1.4.1(Jan 21, 2021)

    Version 1.4.1 - "Compression Ratio 0.55" Edition

    This release includes a new "Whitespace Removal" option, which strips away whitespace (spaces) from "G" type commands. This saves a few bytes, and replaces the ' ' space character with 'E' in the packing table. The result is a compression ratio of 0.55, boosting the standard 115,200 baud rate to an effective rate of ~210,000 baud!

    Also included are a number of minor bug fixes, and the inclusion of a "protocol version" check, to aid in backward compatibility of older firmware versions should new features be added in the future.

    NOTE:

    It is highly recommended to use the updated firmware with this release! Otherwise the "Whitespace Removal" feature will not work! Please get the updated version of the v3.9.3 Prusa MK3 firmware (with MeatPack firmware module edition v1.1.0) here: https://github.com/scottmudge/Prusa-Firmware-MeatPack/releases/tag/v3.9.3-MP1.1.0

    Installation

    (I am still waiting for OctoPrint to approve this plugin, but for the time being, follow the instructions below)

    1. Ensure you have installed the updated firmware linked above!

    2. Open a terminal or console (or SSH into your Raspberry Pi if using one) and activate OctoPrint's virtual environment (Python). Typically this will be in ~/oprint/. You can activate the virtual environment by using the following command:

    source ~/oprint/bin/activate

    1. After activating the OctoPrint environment, run the following command:

    pip install https://github.com/scottmudge/OctoPrint-MeatPack/archive/v1.4.1.zip

    1. Restart your OctoPrint server, or restart the machine.

    2. After installation, you should see a "MeatPrint" options page, and a new "TX Statistics" section in the "State" side bar section (if connected to your printer).


    NOTE:

    I have extensively tested this release without issue on my own MK3S, but use this firmware at your own risk. I am not responsible for anything that may happen due to incorrect firmware flashing, incorrect software usage, etc.

    Source code(tar.gz)
    Source code(zip)
  • v1.2.11(Jan 12, 2021)

    Version 1.2.11 - Performance Changes

    The lookup table/dictionary was replaced with a standard, wrapped "C" array. Before, in the plugin each character was being converted to a key/hash and then looked up iteratively though the table.

    Now they're simply addressed by their character ordinal, which should be quite a bit faster.

    Overt performance should be roughly the same, but it should mean less CPU usage for slower RPis.

    Installation

    1. Open a terminal or console (or SSH into your Raspberry Pi if using one) and activate OctoPrint's virtual environment (Python). Typically this will be in ~/oprint/. You can activate the virtual environment by using the following command:

    source ~/oprint/bin/activate

    1. After activating the OctoPrint environment, run the following command:

    pip install https://github.com/scottmudge/OctoPrint-MeatPack/archive/v1.2.11.zip

    1. Restart your OctoPrint server, or restart the machine.

    2. After installation, you should see a "MeatPrint" options page, and a new "TX Statistics" section in the "State" side bar section (if connected to your printer).

    Note

    I have submitted the plugin to the official OctoPrint repository, but it is still under review.

    Source code(tar.gz)
    Source code(zip)
  • v1.2.6(Jan 9, 2021)

    Version 1.2.6 - Easter-egg Update

    Image

    My wife informed me that I needed to change the (optional) song/chime at the end of a print (code M84) to be the "Meatball" song, as she called it. You know, the one that goes 🎵 "On top of spaghettiiii, all covered with cheeeese..." 🎵 . I suppose she's right that it's on theme...

    I implemented a more robust and flexible song playing class, so I may add more songs in the future.

    I also disabled the end-print song by default, so you'll have to enable it in the settings if you want it. I figured it might drive some people nuts.

    Beyond that, just minor changes.

    Installation

    1. Open a terminal or console (or SSH into your Raspberry Pi if using one) and activate OctoPrint's virtual environment (Python). Typically this will be in ~/oprint/. You can activate the virtual environment by using the following command:

    source ~/oprint/bin/activate

    1. After activating the OctoPrint environment, run the following command:

    pip install https://github.com/scottmudge/OctoPrint-MeatPack/archive/v1.2.6.zip

    1. Restart your OctoPrint server, or restart the machine.

    2. After installation, you should see a "MeatPrint" options page, and a new "TX Statistics" section in the "State" side bar section (if connected to your printer).

    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Jan 8, 2021)

    MeatPack OctoPrint Plugin - Version 1.2.0

    This release contains the following features:

    • Fully working g-code compression ("MeatPack") support for compatible Prusa printers. Please find builds of the official Prusa Firmware with compression support here: https://github.com/scottmudge/Prusa-Firmware-MeatPack
    • Added extra data to the "State" side-bar content, updated in real time. It shows transmission statistics: image This can be disabled in the plugin options page.
    • Added an optional feature (can be disabled in plugin settings) to play a "Mario coin" noise on the printer after a print is completed.
    Source code(tar.gz)
    Source code(zip)
Owner
Scott Mudge
Senior Software Engineer working in computer vision, 3D reconstruction, artificial intelligence, and medical imaging.
Scott Mudge
Official code repository of the paper Linear Transformers Are Secretly Fast Weight Programmers.

Linear Transformers Are Secretly Fast Weight Programmers This repository contains the code accompanying the paper Linear Transformers Are Secretly Fas

Imanol Schlag 77 Dec 19, 2022
p-tuning for few-shot NLU task

p-tuning_NLU Overview 这个小项目是受乐于分享的苏剑林大佬这篇p-tuning 文章启发,也实现了个使用P-tuning进行NLU分类的任务, 思路是一样的,prompt实现方式有不同,这里是将[unused*]的embeddings参数抽取出用于初始化prompt_embed后

3 Dec 29, 2022
Leon is an open-source personal assistant who can live on your server.

Leon Your open-source personal assistant. Website :: Documentation :: Roadmap :: Contributing :: Story 👋 Introduction Leon is an open-source personal

Leon AI 11.7k Dec 30, 2022
Gathers machine learning and Tensorflow deep learning models for NLP problems, 1.13 < Tensorflow < 2.0

NLP-Models-Tensorflow, Gathers machine learning and tensorflow deep learning models for NLP problems, code simplify inside Jupyter Notebooks 100%. Tab

HUSEIN ZOLKEPLI 1.7k Dec 30, 2022
用Resnet101+GPT搭建一个玩王者荣耀的AI

基于pytorch框架用resnet101加GPT搭建AI玩王者荣耀 本源码模型主要用了SamLynnEvans Transformer 的源码的解码部分。以及pytorch自带的预训练模型"resnet101-5d3b4d8f.pth"

冯泉荔 2.2k Jan 03, 2023
Use AutoModelForSeq2SeqLM in Huggingface Transformers to train COMET

Training COMET using seq2seq setting Use AutoModelForSeq2SeqLM in Huggingface Transformers to train COMET. The codes are modified from run_summarizati

tqfang 9 Dec 17, 2022
Python package to easily retrain OpenAI's GPT-2 text-generating model on new texts

gpt-2-simple A simple Python package that wraps existing model fine-tuning and generation scripts for OpenAI's GPT-2 text generation model (specifical

Max Woolf 3.1k Jan 07, 2023
本插件是pcrjjc插件的重置版,可以独立于后端api运行

pcrjjc2 本插件是pcrjjc重置版,不需要使用其他后端api,但是需要自行配置客户端 本项目基于AGPL v3协议开源,由于项目特殊性,禁止基于本项目的任何商业行为 配置方法 环境需求:.net framework 4.5及以上 jre8 别忘了装jre8 别忘了装jre8 别忘了装jre8

132 Dec 26, 2022
A design of MIDI language for music generation task, specifically for Natural Language Processing (NLP) models.

MIDI Language Introduction Reference Paper: Pop Music Transformer: Beat-based Modeling and Generation of Expressive Pop Piano Compositions: code This

Robert Bogan Kang 3 May 25, 2022
Mycroft Core, the Mycroft Artificial Intelligence platform.

Mycroft Mycroft is a hackable open source voice assistant. Table of Contents Getting Started Running Mycroft Using Mycroft Home Device and Account Man

Mycroft 6.1k Jan 09, 2023
Searching keywords in PDF file folders

keyword_searching Steps to use this Python scripts: (1)Paste this script into the file folder containing the PDF files you need to search from; (2)Thi

1 Nov 08, 2021
Predict the spans of toxic posts that were responsible for the toxic label of the posts

toxic-spans-detection An attempt at the SemEval 2021 Task 5: Toxic Spans Detection. The Toxic Spans Detection task of SemEval2021 required participant

Ilias Antonopoulos 3 Jul 24, 2022
A PyTorch implementation of paper "Learning Shared Semantic Space for Speech-to-Text Translation", ACL (Findings) 2021

Chimera: Learning Shared Semantic Space for Speech-to-Text Translation This is a Pytorch implementation for the "Chimera" paper Learning Shared Semant

Chi Han 43 Dec 28, 2022
Fast, general, and tested differentiable structured prediction in PyTorch

Torch-Struct: Structured Prediction Library A library of tested, GPU implementations of core structured prediction algorithms for deep learning applic

HNLP 1.1k Dec 16, 2022
FedNLP: A Benchmarking Framework for Federated Learning in Natural Language Processing

FedNLP is a research-oriented benchmarking framework for advancing federated learning (FL) in natural language processing (NLP). It uses FedML repository as the git submodule. In other words, FedNLP

FedML-AI 216 Nov 27, 2022
Research code for "What to Pre-Train on? Efficient Intermediate Task Selection", EMNLP 2021

efficient-task-transfer This repository contains code for the experiments in our paper "What to Pre-Train on? Efficient Intermediate Task Selection".

AdapterHub 26 Dec 24, 2022
ZUNIT - Toward Zero-Shot Unsupervised Image-to-Image Translation

ZUNIT Dependencies you can install all the dependencies by pip install -r requirements.txt Datasets Download CUB dataset. Unzip the birds.zip at ./da

Chen Yuanqi 9 Jun 24, 2022
TTS is a library for advanced Text-to-Speech generation.

TTS is a library for advanced Text-to-Speech generation. It's built on the latest research, was designed to achieve the best trade-off among ease-of-training, speed and quality. TTS comes with pretra

Mozilla 6.5k Jan 08, 2023
Natural language computational chemistry command line interface.

nlcc Install pip install nlcc Must have Open-AI Codex key: export OPENAI_API_KEY=your key here then nlcc key bindings ctrl-w copy to clipboard (Note

Andrew White 37 Dec 14, 2022
Almost State-of-the-art Text Generation library

Ps: we are adding transformer model soon Text Gen 🐐 Almost State-of-the-art Text Generation library Text gen is a python library that allow you build

Emeka boris ama 63 Jun 24, 2022