I don't know if you'd be able to actually do this, but, it certainly seems like a logical way for the machine to function:
When you put an item in the upcycler, the number and quality of quality modules determines how many resources you need per upgrade. The machine doesn't function until you have at-least one quality one module, and the ratio of inputs is determined by the x setting and your total quality %
x = 100, Normal Quality 1, would be 100
x = 100, Legendary Quality 3, would be 4
x = 200, Legendary Quality 3 would be 8.
Then - have it so quality modules can only be put in the upcycler?